Update Task Status in Workflow
Endpoint: POST /tasks/{workflowId}/{taskRefName}/{status}
Updates the status of a running task in a workflow execution.
Path parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
workflowId | The execution ID of the workflow containing the task. | string | Required. |
taskRefName | The reference name of the task whose status is to be updated. | string | Required. |
status | The status to which the task is to be updated. Supported values:
| string | Required. |
Query parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
workerId | The worker name from which the task is being polled, which is the hostname of the pod where the worker is running | string | Optional. |
Request body
Format the request to include any additional parameters, such as task output parameters.
Example
{
"taskOutput": "Add this as task output"
}
Response
Returns the task execution ID of the updated task.
Examples
Update task status in a workflow
Request
curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/tasks/3e1baeeb-bdfa-11ef-88e4-ce0afa758ea1/wait_ref/FAILED' \
-H 'accept: text/plain' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"taskOutput": "Add this as task output"
}'
Response
3e1c723c-bdfa-11ef-88e4-ce0afa758ea1