Activate/Suspend Process Instance In Batch

Activates or suspends process instances asynchronously with a list of process instance ids, a process instance query, and/or a historical process instance query

Method

POST /process-instance/suspended-async

Parameters

Request Body

A JSON object with the following properties:

Name Description
processInstanceIds A list of process instance ids which defines a group of process instances which will be activated or suspended by the operation.
processInstanceQuery A process instance query which defines a group of process instances which will be activated or suspended by the operation. See GET /process-instance
historicProcessInstanceQuery A historical process instance query which defines a group of process instances which will be activated or suspended by the operation. See GET history/process-instance
suspended A Boolean value which indicates whether to activate or suspend all process instances that were defined with the other parameters. When the value is set to true, all process instances defined will be suspended and when the value is set to false, all process instances defined will be activated.

Result

A JSON object corresponding to the Batch interface in the engine. Its properties are as follows:

Name Type Description
id String The id of the batch.
type String The type of the batch. See the User Guide for more information about batch types.
totalJobs Number The total jobs of a batch is the number of batch execution jobs required to complete the batch.
jobsCreated Number The number of batch execution jobs already created by the seed job.
batchJobsPerSeed Number The number of batch execution jobs created per seed job invocation. The batch seed job is invoked until it has created all batch execution jobs required by the batch (see totalJobs property).
invocationsPerBatchJob Number Every batch execution job invokes the command executed by the batch invocationsPerBatchJob times. E.g., for a process instance migration batch this specifies the number of process instances which are migrated per batch execution job.
seedJobDefinitionId String The job definition id for the seed jobs of this batch.
monitorJobDefinitionId String The job definition id for the monitor jobs of this batch.
batchJobDefinitionId String The job definition id for the batch execution jobs of this batch.
suspended Boolean Indicates whether this batch is suspended or not.
tenantId String The tenant id of the batch.
createUserId String The id of the user that created the batch.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the request parameters are invalid, for example if processInstanceIds, processInstanceQuery, and historicProcessInstanceQuery parameters are all set to null. See the Introduction for the error response format.

Example

Request

POST /process-instance/suspended-async

{
  "processInstanceIds" : [
                           "processInstanceId1",  
                           "processInstanceId2",  
                           ...
                           "processInstanceIdn"  
                         ],
  "suspended" : true
}

Response

Status 200 OK

{
  "id": "aBatchId",
  "type": "aBatchType",
  "totalJobs": 10,
  "batchJobsPerSeed": 100,
  "jobsCreated": 10,
  "invocationsPerBatchJob": 1,
  "seedJobDefinitionId": "aSeedJobDefinitionId",
  "monitorJobDefinitionId": "aMonitorJobDefinitionId",
  "batchJobDefinitionId": "aBatchJobDefinitionId",
  "suspended": true,
  "tenantId": "aTenantId"
}

On this Page: