Sub Workflow Task
"type" : "SUB_WORKFLOW"
Sub Workflow task allows for nesting a workflow within another workflow.
Suppose we want to include another workflow inside our current workflow. In that case, Sub Workflow Task would be used.
Do-WhileTask does not allow nested
Do-Whiletasks. But it does permit a subworkflow that can have a
Do-Whileloop inside it.
Dynamic Forkscan only contain one task. But that one task can be a subworkflow containing many additional tasks.
Sub Workflow task is defined directly inside the workflow with
|subWorkflowParam||Map[String, Any]||See below|
|inputParameters||Map[String, Any]||The task inputParameters become the input parameters for the workflow.|
|name||String||Name of the workflow to execute|
|version||Integer||Version of the workflow to execute|
|taskToDomain||Map[String, String]||Allows scheduling the sub workflow's tasks per given mappings. See Task Configurations for instructions to configure taskDomains.|
|workflowDefinition||WorkflowDefinition||Allows starting a subworkflow with a dynamic workflow definition.|
|subWorkflowId||String||Subworkflow execution Id generated when running the subworkflow|
The output of the workflow is also supplied in the output of the subworkflow.
Imagine that a colleague has created a address verification workflow:
If you wanted to add this functionality to another workflow, it would be possible to copy all 201 lines of JSON and insert it into your workflow. However, any updates made by your colleague will not be reflected in your workflow - you have a "frozen in time" version of the code.
Instead, we can call the existing workflow as a
Not only is your workflow more readable, with easier to edit JSON, but it will update with the
- Order Fulfillment: Dynamic tasks can have only one task per fork, but a SubWorkflow is allowed allowing for many tasks to be run.