Terminate Case Execution
Performs a transition from ACTIVE
state to TERMINATED
state if the execution belongs to a task or a stage and performs a transition from AVAILABLE
state to TERMINATED
state if the execution belongs to a milestone. In relation to the state transition, it is possible to update or delete case instance variables (please note: deletion precedes update).
Method
POST /case-execution/{id}/terminate
Parameters
Path Parameters
Name | Description |
---|---|
id | The id of the case execution to terminate. |
Request Body
A JSON object with the following properties:
Name | Description | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
variables | A JSON object containing variable key-value pairs. Each key is a variable name and each value a JSON variable value object.
|
||||||||||
deletions | An array containg JSON objects. Each JSON object has a property name , which is the name of the variable to delete, and a property local , to indicate whether the variable must be deleted locally or not. If local is set to true , the deletion does not propagate upwards in the case execution hierarchy. |
Result
This method returns no content.
Response Codes
Code | Media type | Description |
---|---|---|
204 | Request successful. | |
400 | application/json | The state transition is not allowed to be performed, for example when the case execution is not in the active state. See the Introduction for the error response format. |
403 | application/json | The case execution cannot be terminated because of CMMN restrictions. See the Introduction for the error response format. |
404 | application/json | The case execution with given id is not found. See the Introduction for the error response format. |
Example
Request
POST /case-execution/aCaseExecutionId/terminate
Request Body:
{
"variables":
{
"aVariable" : { "value" : "aStringValue", "type": "String" },
"anotherVariable" : { "value" : true, "type": "Boolean", "local" : true }
},
"deletions":
[
{ "name" : "aVariableToDelete", "local" : true },
{ "name" : "anotherVariableToDelete", "local" : false }
]
}
Response
Status 204. No content.