Activate/Suspend Process Definition By Id

Activates or suspends a given process definition by id or by latest version of process definition key.

Method

PUT /process-definition/{id}/suspended

PUT /process-definition/key/{key}/suspended (suspend the latest version of the process definition which belongs to no tenant)

PUT /process-definition/key/{key}/tenant-id/{tenant-id}/suspended (suspended the latest version of the process definition for tenant)

Parameters

Path Parameters

Name Description
id The id of the process definition to activate or suspend.
key The key of the process definition (the latest version thereof) to be retrieved.
tenant-id The id of the tenant the process definition belongs to.

Request Body

A JSON object with the following properties:

Name Description
suspended A Boolean value which indicates whether to activate or suspend a given process definition. When the value is set to true, the given process definition will be suspended and when the value is set to false, the given process definition will be activated.
includeProcessInstances A Boolean value which indicates whether to activate or suspend also all process instances of the given process definition. When the value is set to true, all process instances of the provided process definition will be activated or suspended and when the value is set to false, the suspension state of all process instances of the provided process definition will not be updated.
executionDate The date on which the given process definition will be activated or suspended. If null, the suspension state of the given process definition is updated immediately. By default*, the date must have the format yyyy-MM-dd'T'HH:mm:ss.SSSZ, e.g., 2013-01-23T14:42:45.234+0200.

* For further information, please see the date format documentation.

Result

This method returns no content.

Response Codes

Code Media type Description
204 Request successful.
400 application/json Returned if some of the request parameters are invalid, for example if the provided executionDate parameter doesn't have the expected format. See the Introduction for the error response format.
404 application/json Process definition with given key does not exist. See the Introduction for the error response format.

Example

Request

PUT /process-definition/aProcessDefinitionId/suspended

PUT /process-definition/key/aProcessDefinitionKey/suspended

{
  "suspended" : true,
  "includeProcessInstances" : true,
  "executionDate" : "2013-11-21T10:49:45"
}

Response

Status 204. No content.

On this Page: