Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Create factory class for Workflow Steps #41

Closed
dbwiddis opened this issue Sep 16, 2023 · 0 comments · Fixed by #47
Closed

[FEATURE] Create factory class for Workflow Steps #41

dbwiddis opened this issue Sep 16, 2023 · 0 comments · Fixed by #47
Assignees
Labels
enhancement New feature or request

Comments

@dbwiddis
Copy link
Member

dbwiddis commented Sep 16, 2023

Is your feature request related to a problem?

Continuation of work started in #26.

While parsing a template, we create a ProcessNode that will manage the actual execution of the WorkflowStep with some optional initial WorkflowData. There is a placeholder conditional doing this for a demo "create index" step, but this needs to be more scalable.

What solution would you like?

  1. Add two fields to the nodes in the template:
    • one identifies the class type to generate.
    • one identifies input data needed.
  2. Pass this class type string to a factory class that creates an instance of the corresponding class.
  3. Parse the input data field (if any) to generate a WorkflowData anonymous subclass.
  4. Use these elements when instantiating a ProcessNode.

What alternatives have you considered?

Several more complex ways of handling it such as using injection, reflection, pre-parsing the template to populate a map, etc. Since multiple nodes may share the same class type, singletons or map lookups won't work.

Do you have any additional context?

We may iterate over this design and modify it later, but it seems the best direction to start wtih.

@dbwiddis dbwiddis added enhancement New feature or request untriaged labels Sep 16, 2023
@dbwiddis dbwiddis self-assigned this Sep 16, 2023
@dbwiddis dbwiddis changed the title [FEATURE] Create generator class for Workflow Steps [FEATURE] Create factory class for Workflow Steps Sep 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant