Skip to main content

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.

Definitions

  {
"name": "start_workflow",
"taskReferenceName": "start_workflow_task_ref",
"inputParameters": {
"startWorkflow": {
"name": "name_of_the_workflow_to_be_started",
"version": 1
}
},
"type": "START_WORKFLOW"
}
note

A start workflow task is considered successful when the requested workflow begins or, more precisely, when the requested workflow is in the RUNNING state.

Input Parameters

AttributeDescription
startWorkflowProvide the workflow name to be started.
versionIf the workflow has different versions, you can provide the version to be started here. If not specified, the latest version runs.

Output Parameters

AttributeDescription
workflowIdDisplays the ID of the started workflow.

Examples



  1. Add task type Start Workflow Task.
  2. Select the workflow to start.
  3. Select version if required.
  4. Add the input params to the workflow.

Adding wait task

Complete Example

Let’s see a sample JSON file for the start workflow task:

    {
"name": "sample_start_workflow",
"description": "Sample Workflow to start a new workflow.",
"tasks": [
{
"name": "start",
"taskReferenceName": "start_ref",
"inputParameters": {
"startWorkflow": {
"name": "your_workflow_name_to_be_started",
"version": 3,
"input": {}
}
},
"type": "START_WORKFLOW"
}
]
}

Here the input parameters are defined as:

    "inputParameters": {
"startWorkflow": {
"name": "your_workflow_name_to_be_started",
"version": 3
}
},

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.

    {
"workflowId": "8ca4184e-6a52-11ed-aaf5-f62716e2ae41"
}

From the workflow executions page, you can click on Start Workflow on the Summary tab to see the newly started workflow status.

Completed start workflow type

Even if the started workflow is not completed, the main workflow would be completed, i.e., in this case, even if your_workflow_name_to_started is not completed, the main workflow sample_start_workflow would be completed.