Executing workflows dynamically using Java SDK #27
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
We will dynamically form this JSON based on mediation rules
(Check the input of this Workflow those will be our mediation rules ,based on this .We will dynamically form workflow)
https://events-test.orkesconductor.io/execution/408b97d4-3dfa-11ef-a272-ea44bab73e42
Changes in this PR :
Created Necessary Pojo classes for Mediation Rules
Added a Simple worker to execute an another workflow named
dynamic_workflow
and pass input to this workflow asWorkflowDef
. We generated workflowDefinition usingcreateDynamicSubworkflow()
method which is basically a dynamic definition of subworkflow which we want to execute. If you check there is no workflow with definitiondynamic_subworkflows_series
exist ,since this subworkflow will be executed dynamically without definition. We can added as many steps increateDynamicSubworkflow()
as we want and make thedynamic_subworkflows_series
dynamic.Sample executions : https://play.orkes.io/execution/abf1fac4-3a1d-11ef-9236-1aff359c3247
Check this execution and keep on expanding subworkflows in this workflow and the child workflows as well.
Note : I have changed some naming convention, workflow and variable names in code for readability
Screenshot :-