Overview
When the overall execution status of an instance is FAILED, all failed steps are retried and the execution status is recalculated.
API details
Constraints
You must have the SOP_TASK:UPDATE permission on this task and the UPDATE permission on the target resource.
Request path
POST /api/v2/sop/tasks/{taskId}/execution/retry
Request parameters
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
| taskId | Path | Long | Yes | Task ID. |
Response parameters
Parameter |
Type |
Description |
|
|---|---|---|---|
| successful | Boolean | Returns 0 on success.true. |
|
| data.id | Long | Instance ID. | |
| data.sopTaskId | Long | SOP task ID. | |
| data.status | String | Execution status after retry. Valid values:WAITING_CONFIRM、RUNNING、FAILEDorCOMPLETED. |
|
| data.displayStatus | String | The execution status displayed; currently anddata.statusThe same. |
|
| data.currentStepIndex | Integer | The sequence number of the earliest unsuccessful step. | |
| data.totalSteps | Integer | Total number of steps executed this time. | |
| data.readyManualStepIndexes | Array<Integer> | You can manually advance the step number. | |
| data.executor | String | Username for starting the execution. | |
| data.startTime | Datetime | Execution start time. | |
| data.finishTime | Datetime \ | null | End or failure time of the execution. If not ended, it isnull. |
| data.steps[] | Array | All steps. Each item containsstepIndex、stepKey、stepName、status、autoRun、stepParam、taskInstanceIds、retryCount、errorMessage、startTime、finishTime, which respectively indicate step location/display, status, auto switch, parameter, associated task, retry count, failure information, and time. |
|
| timestamp | Datetime | The time taken by the server to create the response. | |
| duration | Long | The time consumed by the server for processing, in milliseconds. | |
| status | Integer | HTTP status code. In case of success, it is200. |
|
| traceId | String | Request link ID, used for log troubleshooting. |
Error codes
HTTP |
Error Code |
Description |
|---|---|---|
| 404 | SOP10008 |
The task does not exist. |
| 400 | SOP10017 |
The task has no running instances, or the status of the running instance is not .FAILED. |
