Skip to main content

Upgrade Workflow

Endpoint: POST /api/workflow/{workflowId}/upgrade

Upgrades a running workflow to a different version.

The workflow execution will continue from its last running task, even when it has been upgraded. In other words, all the tasks in the upgraded definition prior to the currently running task will be marked as skipped.

Path parameters

ParameterDescriptionTypeRequired/ Optional
workflowIdThe execution ID of the workflow to be upgraded.stringRequired.

Request body

Format the request as an object containing the following parameters.

ParameterDescriptionTypeRequired/ Optional
nameThe name of the workflow definition.stringRequired.
versionThe version to which the workflow is to be updated.integerRequired.
taskOutputA map of task outputs for any skipped tasks, with the key as the task reference name, and the value as the task output object.mapOptional.
workflowInputA map of inputs for the upgraded workflow execution, with the parameter name as the key and its input value as the value.mapOptional.

Example

{
"name": "myWorkflow",
"taskOutput": {
"newTaskRefName": {
"someKey: "someValue
}
},
"version": 3,
"workflowInput": {
"someKey": "someValue"
}
}

Examples

Upgrade to the next version

Request

curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/workflow/77916c63-d3e7-11ef-87b1-b2b27c52ebde/upgrade' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"name": "someWorkflow",
"taskOutput": {},
"version": 2
}'

Response

Returns 200 OK, indicating that the workflow execution has been upgraded successfully. All new tasks before the currently running task are skipped in the execution.

Screenshot of Conductor UI showing the skipped tasks in the upgraded workflow execution.