-
Notifications
You must be signed in to change notification settings - Fork 19
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
Example creating workflow programmatically #56
Comments
Is the following approach correct? I have two issues with serialization:
|
Hi @esanzgar, sorry for the late reply. I will admit the API behind the workflow model isn't the prettiest or most consistent, I've mostly been developing it to satisfy the needs of the Rabix Composer. The lack of documentation is also unfortunately. There are specific ways in which the Composer creates a WorkflowModel which aren't the easiest/most convenient to replicate programmatically. The philosophy behind workflow creation in the composer is as follows:
That being said, the example you show could also work. The issue you have with requirements is actually a bug, as we haven't had a need for adding/serializing requirements in the Composer so the functionality was never added. I'm not sure I understand the issue related to serializing inputs and outputs, though. Workflow.inputs and Workflow.outputs are always serialized as an array out of habit, they could easily be a map<id, input> as this is just a syntax sugar. |
Maya, Thank you for your reply. Would you mind posting an example of a Composer workflow creation approach (with the addStepFromProcess, createInputFromPort and createOutputFromPort)? |
Regarding the potential bug (serialising requirements), would you like me to create an independent issue? |
Sorry, my explanation about MultipleInputFeatureRequirement was not accurate. If I define the input of a step in this way:
It is serialized in this way:
However, I was expecting this:
Because source is an array I have to add the requirement MultipleInputFeatureRequirement (linkMerge defaults to "merge_nested") to make it work. Because there is a problem serialising requirements I am in a little predicament. Thanks |
Workaround to serialise requirements:
|
Please, could you provide an example of how to create a workflow from scratch?
It would be nice if it contained some of these:
Thanks!
The text was updated successfully, but these errors were encountered: