Execute Modification
Executes a modification synchronously for multiple process instances. To modify a single process instance, use the Modify Process Instance Execution State method. To execute a modification asynchronously, use the Execute Modification Async (Batch) method.
For more information about the difference between synchronous and asynchronous execution of a modification, please refer to the related section of the user guide.
Method
POST /modification/execute
Parameters
Request Body
A JSON object with the following properties:
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
processDefinitionId | The id of the process definition for the modification | ||||||||||
skipCustomListeners | Skip execution listener invocation for activities that are started or ended as part of this request. | ||||||||||
skipIoMappings | Skip execution of input/output variable mappings for activities that are started or ended as part of this request. | ||||||||||
processInstanceIds | A list of process instance ids to modify. | ||||||||||
processInstanceQuery |
A process instance query like the request body described by
POST /process-instance
.
|
||||||||||
instructions |
A JSON array of modification instructions. The instructions are executed in the order they are in. An instruction may have the following properties:
|
||||||||||
annotation | An arbitrary text annotation set by a user for auditing reasons. |
Result
This method returns no content.
Response codes
Code | Media type | Description |
---|---|---|
204 | Request successful. | |
400 | application/json |
In case following parameters are missing: instructions, processDefinitionId, activityId or transitionId, processInstanceIds or processInstanceQuery, an exception of type InvalidRequestException is returned. See the Introduction for the error response format.
|
Example
Request
POST /modification/execute
Request Body:
{
"processDefinitionId" : "aProcessDefinitionId",
"instructions": [
{
"type": "startAfterActivity",
"activityId": "aUserTask"
},
{
"type": "cancel",
"activityId": "anotherTask",
"cancelCurrentActiveActivityInstances" : true
}
],
"processInstanceIds": [
"aProcessInstance",
"anotherProcessInstance"
],
"processInstanceQuery": {
"processDefinitionId": "aProcessDefinitionId"
},
"skipCustomListeners": true,
"annotation": "Modified to resolve an error."
}
Response
Status 204. No content.