Skip Task in Workflow Execution
Endpoint: PUT /api/workflow/{workflowId}/skiptask/{taskReferenceName}
Skips a scheduled task in an ongoing workflow using the task reference name. The skipped task’s inputs and outputs can be updated using the query parameters.
Path parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
workflowId | The execution ID of the running workflow that contains the task to be skipped. | string | Required. |
taskReferenceName | The reference name of the task to be skipped. | string | Required. |
Query parameters
Parameter | Description | Type | Required/ Optional |
---|---|---|---|
taskInput | The skipped task’s inputs. | object | Optional. |
taskOutput | The skipped task’s outputs. | object | Optional. |
Example
{
"taskInput": {
"someInput": "Some task input"
},
"taskOutput": {
"someOutput": "Some task output"
}
}
Response
Returns 200 OK, indicating that the task has been skipped successfully.
Examples
Skip a task
Request
curl -X 'PUT' \
'https://<YOUR_CLUSTER>o/api/workflow/18f871a1-d3f8-11ef-a114-0af1b159704e/skiptask/someTask_ref' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>'
Response
Returns 200 OK, indicating that the task has been skipped successfully.
Skip a task with updated task inputs and outputs
Request
curl -X 'PUT' \
'https://<YOUR-CLUSTER>/api/workflow/fd7s06a839e9-71d6-11f0-af9d-8e9bff353733/skiptask/simple_ref' \
-H 'accept: */*' \
-H 'X-Authorization: <TOKEN>' \
-H 'Content-Type: application/json' \
-d '{
"taskInput": {
"input": "Task is skipped"
},
"taskOutput": {
"output": "Skipped task from execution via API"
}
}'
Response
Returns 200 OK, indicating that the task has been skipped successfully. You can verify the update by reviewing the task’s input and output in the workflow execution details.