Overview
Retries the specified failed step. The overall execution status of the instance is not required to be FAILED, but the specified step must be FAILED.
API details
Constraints
You must have the SOP_TASK:UPDATE privilege on this task and the UPDATE privilege on the target resource.
Request path
POST /api/v2/sop/tasks/{taskId}/execution/steps/{stepIndex}/retry
Request parameters
Parameter |
Location |
Type |
Required |
Description |
|---|---|---|---|---|
| taskId | Path | Long | Yes | Task ID. |
| stepIndex | Path | Integer | Yes | The sequence number of the step to be retried. |
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 | The 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 is set tonull. |
| 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. |
| 404 | SOP10012 |
The task has not been started, and no execution instance exists. |
| 404 | SOP10015 |
Step number does not exist. |
| 400 | SOP10022 |
The specified step status is not.FAILED. |
