Sub Workflow
The Sub Workflow task executes another workflow within the current workflow. This allows you to reuse common workflows across multiple workflows. Unlike the Start Workflow task, the Sub Workflow task provides synchronous execution.
The Sub Workflow task can also be used to overcome the limitations of other tasks:
- Use it in a Do While task to achieve nested Do While loops.
- Use it in a Dynamic Fork task to execute more than one task in each fork.
Task parameters
Configure these parameters for the Sub Workflow task.
Parameter | Description | Required/ Optional |
---|---|---|
subWorkflowParam | A map that includes the sub-workflow’s configuration, such as the name, version, task-to-domain mapping, idempotency key, and priority. | Required. |
subWorkflowParam. name | The name of the workflow to be executed. This workflow should have a pre-existing definition in Conductor. | Required. |
subWorkflowParam. version | The version of the workflow to be executed. If unspecified or set to 0, the latest version will be used. | Required. |
subWorkflowParam. taskToDomain | A map of sub-workflow tasks to specific domains. The keys are the task reference names and the values are the domain names. If unspecified, the taskToDomain of the executing parent workflow will take over. | Optional. |
subWorkflowParam. priority | The priority of the subworkflow. Supports values from 0-99 and can be passed as a dynamic input. If set, this priority overrides the parent workflow’s priority. If not, it inherits the parent workflow’s priority. | Optional. |
subWorkflowParam. idempotencyKey | A unique, user-generated key to prevent duplicate workflow executions. Idempotency data is retained for the life of the workflow execution. | Optional. |
subWorkflowParam. idempotencyStrategy | The idempotency strategy for handling duplicate requests. Supported values:
|