Features
Advance the current ready manual step whose autoRun attribute is set to false. If multiple steps are available for advancement, you must specify the stepIndex.
API details
Constraints
You must have the SOP_TASK:UPDATE permission on this task and the UPDATE permission on the target resource. The execution status must be WAITING_CONFIRM or RUNNING, and confirmation must be explicitly granted.
Request path
POST /api/v2/sop/tasks/{taskId}/execution/next
Request parameters
Parameter |
Location |
Type |
Required |
Example value |
Description |
|---|---|---|---|---|---|
| taskId | Path | Long | Yes | 1001 |
Task ID. |
| stepIndex | Body | Integer | No | 5 |
The serial number of the manual step to be initiated. This parameter is required when multiple ready steps exist. |
| confirmed | Body | Boolean | Yes | true |
Requiredtrue; Not provided,nullorfalseNeither can proceed. |
Response parameters
Parameter |
Type |
Description |
|
|---|---|---|---|
| successful | Boolean | Returns on success.true. |
|
| data.id | Long | Instance ID. | |
| data.sopTaskId | Long | SOP task ID. | |
| data.status | String | Execution status. 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> | The serial number of the step that can be manually advanced after the update. | |
| 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 | Information on the execution of all steps. Each field isstepIndex、stepKey、stepName、status、autoRun、stepParam、taskInstanceIds、retryCount、errorMessage、startTime、finishTime; they respectively indicate step location/display, status, auto-execution switch, step parameters, associated OCP task, retry count, failure information, and step duration. |
|
| 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 | SOP10014 |
Not started, or the execution status is notWAITING_CONFIRM/RUNNING. |
| 400 | SOP10020 |
confirmedNotrue. |
| 400 | SOP10013 |
Multiple Promotable Steps Exist but Not SpecifiedstepIndex. |
| 404 | SOP10015 |
The specified step does not exist. |
| 400 | SOP10016 |
The specified step is not ready, or it is not a manual step, or no manual steps are available to proceed. |
| 400 | SOP10021 |
Preparation or distribution failed in the previous step. |
