Retry Failed Workflow
Endpoint: POST /api/workflow/{workflowId}/retry
Retries a failed workflow execution from the last failed task. When invoked, the failed task is scheduled again, and the workflow moves to RUNNING status.
Path parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
workflowId | The execution ID of the failed workflow to be retried. | string | Required. |
Query parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
resumeSubworkflowTasks | (For cases where the last failed task is a Sub Workflow task) If set to true, the parent workflow is restarted from the sub-workflow’s last failed task. If set to false, a new sub-workflow execution is created. Default is false. | boolean | Optional. |
retryIfRetriedByParent | (For cases where a sub-workflow is being retried) If set to false, the sub-workflow will be prohibited from retrying if its parent workflow has been retried before. Default is true. | boolean | Optional. |
Examples
Retry failed workflow from last failed task
Request
curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/workflow/2ce9207f-d4a6-11ef-87b1-b2b27c52ebde/retry?resumeSubworkflowTasks=false&retryIfRetriedByParent=true' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-d ''
Response
Returns 204 No Content, indicating that the workflow execution has been restarted successfully from the last failed task.
Retry sub-workflow when retryIfRetriedByParent=false
Request
curl -X 'POST' \
'https://<YOUR_CLUSTER>/api/workflow/1f920305-da0c-11ef-a114-0af1b159704e/retry?resumeSubworkflowTasks=false&retryIfRetriedByParent=false' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-d ''
Response
{
"status": 400,
"message": "Parent task 1f8f6af4-da0c-11ef-a114-0af1b159704e of workflow 19c1d273-da0c-11ef-87b1-b2b27c52ebde is already retried, retrying subworkflow 1f920305-da0c-11ef-a114-0af1b159704e is prohibited because retryIfHasParent=false in retry request",
"instance": "orkes-conductor-deployment-64f9978cfc-r8ftz",
"retryable": false
}