Delete Async (POST)

Delete multiple historic process instances asynchronously (batch). At least historicProcessInstanceIds or historicProcessInstanceQuery has to be provided. If both are provided then all instances matching query criterion and instances from the list will be deleted.

Method

POST /history/process-instance/delete

Parameters

Request Body

A JSON object with the following properties:

Name Description
historicProcessInstanceIds A list historic process instance ids to delete.
historicProcessInstanceQuery A historic process instance query like the request body described by POST /history/process-instance .
deleteReason A string with delete reason.

Response Body

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

Name Value Description
id String The id of the batch.
type String The type of the batch.
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 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.
batchJobDefinitionId String The job definition id for the batch execution jobs of this batch.
suspended Boolean Indicates wheter this batch is suspened or not.
tenantId String The tenant id of the batch.

Response Codes

Code Media type Description
200 application/json Request successful.
400 application/json Returned if some of the query parameters are invalid, i.e. neither historicProcessInstanceIds, nor historicProcessInstanceQuery is present. See the Introduction for the error response format.

Example

Request

POST /history/process-instance/delete

Request Body:

{
  "deleteReason" : "aReason",
  "historicProcessInstanceIds": ["aProcess","secondProcess"],
  "historicProcessInstanceQuery": {
    "startedAfter": "2016-10-11T11:44:13",
    "finishedBefore": "2016-10-13T11:44:17"
  }
}

Response

Status 200 OK

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

On this Page: