Start Workflow Task
"type" : "START_WORKFLOW"
Start Workflow is an operator task used to start another workflow from an existing workflow. Unlike a sub-workflow task, a start workflow task doesn’t create a relationship between the current workflow and the newly started workflow. That means it doesn’t wait for the started workflow to get completed.
A start workflow task is considered successful when the requested workflow begins or, more precisely, when the requested workflow is in the RUNNING state.
The start workflow task comes into use when you need to only start another workflow from a current workflow and need not necessarily complete the started workflow.
A start workflow task can be defined as
“type” : “START_WORKFLOW”. To proceed with the workflow creation, you must specify the input parameters:
|startWorkflow||Provide the workflow name to be started.|
|version||If the workflow has different versions, you can provide the version to be started here. If not specified, the latest version runs.|
|workflowId||Displays the ID of the started workflow.|
Let’s see a sample JSON file for the start workflow task:
"description": "Sample Workflow to start a new workflow.",
Here the input parameters are defined as:
This would start your workflow named “your_workflow_name_to_be_started” with the version being 3.
The output shows the generated workflow ID of the started workflow.
From the workflow executions page, you can click on Start Workflow on the Summary tab to see the newly started workflow status.
Even if the started workflow is not completed, the main workflow would be completed, i.e., in this case, even if the workflow your_workflow_name_to_started is not completed, the main workflow sample_start_workflow would be completed.