Skip to main content

Start Workflow

The Start Workflow task starts another workflow from the current workflow. Unlike the Sub Workflow task, the workflow triggered by the Start Workflow task executes asynchronously; the current workflow proceeds to its next task without waiting for the started workflow to complete.

A Start Workflow task is considered successful when the requested workflow enters the RUNNING state, regardless of the final status of the workflow that was started.

Task parameters

Configure these parameters for the Start Workflow task.

ParameterDescriptionRequired/ Optional
inputParameters. startWorkflowA map that includes the requested workflow’s configuration, such as the name and version.Required.
inputParameters. startWorkflow. nameThe name of the workflow to be executed. This workflow should have a pre-existing definition in Conductor.Required.
inputParameters. startWorkflow. versionThe version of the workflow to be executed. If unspecified, the latest version will be used.Optional.
inputParameters. startWorkflow. correlationIdA unique identifier for the workflow execution, used to correlate the current workflow instance with other workflows.Optional.
inputParameters. startWorkflow. idempotencyKeyA unique, user-generated key to prevent duplicate workflow executions. Idempotency data is retained for the life of the workflow execution.Optional.
inputParameters. startWorkflow. idempotencyStrategyThe idempotency strategy for handling duplicate requests. Supported values:
  • RETURN_EXISTING—Return the workflowId of the workflow instance with the same idempotency key.
  • FAIL—Start a new workflow instance only if there are no workflow executions with the same idempotency key.
  • FAIL_ON_RUNNING—Start a new workflow instance only if there are no RUNNING or PAUSED workflows with the same idempotency key. Completed workflows can run again.
Required if idempotencyKey is used.
inputParameters. startWorkflow. inputDefines the input parameters for the workflow being started. These values are passed directly to the invoked workflow.Optional.

The following are generic configuration parameters that can be applied to the task and are not specific to the Start Workflow task.

Other generic parameters

Here are other parameters for configuring the task behavior.

ParameterDescriptionRequired/ Optional
optionalWhether the task is optional.

If set totrue, any task failure is ignored, and the workflow continues with the task status updated to COMPLETED_WITH_ERRORS. However, the task must reach a terminal state. If the task remains incomplete, the workflow waits until it reaches a terminal state before proceeding.
Optional.

Task configuration

This is the task configuration for a Start Workflow task.​

{
"name": "start_workflow",
"taskReferenceName": "start_workflow_ref",
"inputParameters": {
"startWorkflow": {
"name": "<WORKFLOW-NAME>",
"input": {
"someKey": "someValue"
},
"correlationId": "xyz",
"idempotencyKey": "123",
"idempotencyStrategy": "RETURN_EXISTING"
}
},
"type": "START_WORKFLOW"
}

Task output

The Start Workflow task will return the following parameters.

ParameterDescription
workflowIdThe workflow execution ID of the started workflow execution.
note

The Start Workflow task does not return the output of the started workflow. Because the task executes asynchronously, the parent workflow continues to completion even if the started workflow is still running.

Adding a Start Workflow task in UI

To add a Start Workflow task:

  1. In your workflow, select the (+) icon and add a Start Workflow task.
  2. Enter the Workflow name and Version. If the version is unspecified, the latest version will be used. Once selected, the workflow’s input parameters will automatically appear if there are any pre-defined ones.
  3. (Optional) Enter the Correlation id.
  4. (Optional) Enter the Idempotency key and select the Idempotency strategy.
  5. (Optional) Add any additional Input parameters for the workflow.

Screenshot of Start Workflow Task in Orkes Conductor

Examples

Here are some examples for using the Start Workflow task.

Using the Start Workflow task in a workflow

The following example shows how to configure a workflow that starts another workflow.

{
"name": "sample_start_workflow",
"description": "Sample Workflow to start a new workflow.",
"version": 1,
"tasks": [
{
"name": "start_workflow",
"taskReferenceName": "start_workflow_ref",
"inputParameters": {
"startWorkflow": {
"name": "http",
"version": 1
}
},
"type": "START_WORKFLOW"
}
],
"schemaVersion": 2
}

This configuration starts a workflow named http with version 1.

When the workflow runs, the Start Workflow task returns the execution ID of the started workflow. You can view the started workflow by selecting the Start Workflow task in the parent workflow and navigating to the Summary tab.

Completed start workflow type

Even if the started workflow has not completed, the parent workflow continues running to completion.