Correlate Message Async (POST)
Correlates a message asynchronously to executions that are waiting for this message. Messages will not be correlated to process definition-level start message events to start process instances.
Method
POST /process-instance/message-async
Parameters
Request Body
A JSON object with the following properties:
Name | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
messageName | The name of the message to correlate. Corresponds to the 'name' element of the message defined in BPMN 2.0 XML. Can be null to correlate by other criteria only. | ||||||||
processInstanceIds | A list of process instance ids that define a group of process instances to which the operation will correlate a message. | ||||||||
processInstanceQuery |
A process instance query like the request body for the
Get Instances (POST)
method to select process instances the operation will correlate a message to.
|
||||||||
historicProcessInstanceQuery |
A historic process instance query like the request body for the
Get Instances (POST)
method to select process instances the operation will correlate a message to.
|
||||||||
variables | A JSON object containing variable key-value pairs the operation will set in the root scope of the process instances the message is correlated to.
Each key is a variable name and each value a JSON variable value object.
|
Please note that if processInstanceIds
, processInstanceQuery
and historicProcessInstanceQuery
are defined, the resulting operation will be performed on the union of these sets.
Response Body
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 |
|
Example
Request
POST /process-instance/message-async
Request Body:
{
"messageName" : "a-message-name",
"processInstanceIds" : [
"b4d2ad98-7240-11e9-98b7-be5e0f7575b7"
],
"processInstanceQuery": {
"processDefinitionKey": "my-process-definition-key"
},
"variables" : {
"myVariableName": {
"value": "myStringValue"
}
}
}
Response
Status 200 OK
{
"id": "120b568d-724a-11e9-98b7-be5e0f7575b7",
"type": "correlate-message",
"totalJobs": 12,
"batchJobsPerSeed": 100,
"invocationsPerBatchJob": 1,
"seedJobDefinitionId": "120b5690-724a-11e9-98b7-be5e0f7575b7",
"monitorJobDefinitionId": "120b568f-724a-11e9-98b7-be5e0f7575b7",
"batchJobDefinitionId": "120b568e-724a-11e9-98b7-be5e0f7575b7",
"tenantId": "accounting",
"suspended": false,
"createUserId": null
}