Package org.camunda.bpm.engine.runtime
Interface MessageCorrelationAsyncBuilder
- All Known Implementing Classes:
- MessageCorrelationAsyncBuilderImpl
public interface MessageCorrelationAsyncBuilder
A fluent builder for defining asynchronous message correlation
- 
Method SummaryModifier and TypeMethodDescriptionCorrelates a message asynchronously to executions that are waiting for this message based on the provided queries and list of process instance ids, whereby query results and list of ids will be merged.historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) Correlate the message such that the process instances found by the given query are selected.processInstanceIds(List<String> ids) Correlate the message such that the process instances with the given ids are selected.processInstanceQuery(ProcessInstanceQuery processInstanceQuery) Correlate the message such that the process instances found by the given query are selected.setVariable(String variableName, Object variableValue) Pass a variable to the execution waiting on the message.setVariables(Map<String, Object> variables) Pass a map of variables to the execution waiting on the message.
- 
Method Details- 
processInstanceIdsCorrelate the message such that the process instances with the given ids are selected. - Parameters:
- ids- the ids of the process instances to correlate to; at least one of- processInstanceIds(List),- processInstanceQuery(ProcessInstanceQuery), or- historicProcessInstanceQuery(HistoricProcessInstanceQuery)has to be set.
- Returns:
- the builder
- Throws:
- NullValueException- when- idsis- null
 
- 
processInstanceQueryCorrelate the message such that the process instances found by the given query are selected. - Parameters:
- processInstanceQuery- the query to select process instances to correlate to; at least one of- processInstanceIds(List),- processInstanceQuery(ProcessInstanceQuery), or- historicProcessInstanceQuery(HistoricProcessInstanceQuery)has to be set.
- Returns:
- the builder
- Throws:
- NullValueException- when- processInstanceQueryis- null
 
- 
historicProcessInstanceQueryMessageCorrelationAsyncBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) Correlate the message such that the process instances found by the given query are selected. - Parameters:
- historicProcessInstanceQuery- the query to select process instances to correlate to; at least one of- processInstanceIds(List),- processInstanceQuery(ProcessInstanceQuery), or- historicProcessInstanceQuery(HistoricProcessInstanceQuery)has to be set.
- Returns:
- the builder
- Throws:
- NullValueException- when- historicProcessInstanceQueryis- null
 
- 
setVariablePass a variable to the execution waiting on the message. Use this method for passing the message's payload. Invoking this method multiple times allows passing multiple variables. - Parameters:
- variableName- the name of the variable to set
- variableValue- the value of the variable to set
- Returns:
- the builder
- Throws:
- NullValueException- when- variableNameis- null
 
- 
setVariablesPass a map of variables to the execution waiting on the message. Use this method for passing the message's payload - Parameters:
- variables- the map of variables
- Returns:
- the builder
 
- 
correlateAllAsyncBatch correlateAllAsync()Correlates a message asynchronously to executions that are waiting for this message based on the provided queries and list of process instance ids, whereby query results and list of ids will be merged.- Returns:
- the batch which correlates the message asynchronously
- Throws:
- NullValueException- when neither- processInstanceIds(List),- processInstanceQuery(ProcessInstanceQuery), nor- historicProcessInstanceQuery(HistoricProcessInstanceQuery)} have been set
- BadUserRequestException- when no process instances are found with the given ids or queries
- AuthorizationException- when the user has no- BatchPermissions.CREATEor- BatchPermissions.CREATE_BATCH_SET_VARIABLESpermission on- Resources.BATCH
 
 
-