Close Case Instance
Performs a transition from COMPLETED state to CLOSED state. In relation to the state transition, it is possible to update or delete case instance variables (please note: deletion precedes update).
Method
POST /case-instance/{id}/close
Parameters
Path Parameters
| Name | Description | 
|---|---|
| id | The id of the case instance to close. | 
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 containing JSON objects. Each JSON object has a property name, which is the name of the variable to delete. | 
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 instance is active. See the Introduction for the error response format. | 
| 403 | application/json | The case instance cannot be closed because of CMMN restrictions. See the Introduction for the error response format. | 
| 404 | application/json | The case instance with given id is not found. See the Introduction for the error response format. | 
Example
Request
POST /case-instance/aCaseInstanceId/close
Request Body:
{
  "variables":
    {
      "aVariable" : { "value" : "aStringValue", "type": "String" },
      "anotherVariable" : { "value" : true, "type": "Boolean" }
    },
  "deletions":
     [
        { "name" : "aVariableToDelete" },
        { "name" : "anotherVariableToDelete" }
      ]
}
Response
Status 204. No content.