Update the status of a task that is defined to be completed asynchronously (i.e. task parameter isAsyncComplete
is set to true
). The status can be set to COMPLETED
, FAILED
, or FAILED_WITH_TERMINAL_ERROR
.
COMPLETED
: the workflow execution will continue according to the workflow definition.\FAILED
: the task will be retried according to the retries
parameter for the task in the workflow definition.\FAILED_WITH_TERMINAL_ERROR
: the task won't be retried.output
is provided, it'll be merged with the original output of the task.Updated task
res = client.workflows.tasks.update("000560bc-9080-4286-b242-a27bb4819253", "completed") res = client.workflows.tasks.update("000560bc-9080-4286-b242-a27bb4819253", "failed", output={"a": 1, "b": 2}) res = client.workflows.executions.run("my workflow", "1") res = client.workflows.executions.retrieve_detailed(res.id) res = client.workflows.tasks.update(res.tasks[1].id, "completed")
{- "id": "stringstringstringstringstringstring",
- "externalId": "string",
- "status": "IN_PROGRESS",
- "taskType": "function",
- "startTime": 1730204346000,
- "endTime": 1730204346000,
- "input": {
- "function": {
- "externalId": "my.known.id",
- "data": {
- "key1": "value1",
- "key2": "value2"
}
}, - "isAsyncComplete": false
}, - "output": {
- "callId": 0,
- "functionId": 0,
- "response": { }
}, - "reasonForIncompletion": "string"
}