Package org.camunda.bpm.engine.impl
Class MessageCorrelationAsyncBuilderImpl
java.lang.Object
org.camunda.bpm.engine.impl.MessageCorrelationAsyncBuilderImpl
- All Implemented Interfaces:
MessageCorrelationAsyncBuilder
public class MessageCorrelationAsyncBuilderImpl
extends Object
implements MessageCorrelationAsyncBuilder
-
Field Summary
Modifier and TypeFieldDescriptionprotected CommandExecutor
protected HistoricProcessInstanceQuery
protected String
protected ProcessInstanceQuery
-
Constructor Summary
ConstructorDescriptionMessageCorrelationAsyncBuilderImpl
(CommandExecutor commandExecutor, String messageName) -
Method Summary
Modifier 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.protected void
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.
-
Field Details
-
commandExecutor
-
messageName
-
payloadProcessInstanceVariables
-
processInstanceIds
-
processInstanceQuery
-
historicProcessInstanceQuery
-
-
Constructor Details
-
MessageCorrelationAsyncBuilderImpl
-
-
Method Details
-
processInstanceIds
Description copied from interface:MessageCorrelationAsyncBuilder
Correlate the message such that the process instances with the given ids are selected.
- Specified by:
processInstanceIds
in interfaceMessageCorrelationAsyncBuilder
- Parameters:
ids
- the ids of the process instances to correlate to; at least one ofMessageCorrelationAsyncBuilder.processInstanceIds(List)
,MessageCorrelationAsyncBuilder.processInstanceQuery(ProcessInstanceQuery)
, orMessageCorrelationAsyncBuilder.historicProcessInstanceQuery(HistoricProcessInstanceQuery)
has to be set.- Returns:
- the builder
-
processInstanceQuery
public MessageCorrelationAsyncBuilder processInstanceQuery(ProcessInstanceQuery processInstanceQuery) Description copied from interface:MessageCorrelationAsyncBuilder
Correlate the message such that the process instances found by the given query are selected.
- Specified by:
processInstanceQuery
in interfaceMessageCorrelationAsyncBuilder
- Parameters:
processInstanceQuery
- the query to select process instances to correlate to; at least one ofMessageCorrelationAsyncBuilder.processInstanceIds(List)
,MessageCorrelationAsyncBuilder.processInstanceQuery(ProcessInstanceQuery)
, orMessageCorrelationAsyncBuilder.historicProcessInstanceQuery(HistoricProcessInstanceQuery)
has to be set.- Returns:
- the builder
-
historicProcessInstanceQuery
public MessageCorrelationAsyncBuilder historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery) Description copied from interface:MessageCorrelationAsyncBuilder
Correlate the message such that the process instances found by the given query are selected.
- Specified by:
historicProcessInstanceQuery
in interfaceMessageCorrelationAsyncBuilder
- Parameters:
historicProcessInstanceQuery
- the query to select process instances to correlate to; at least one ofMessageCorrelationAsyncBuilder.processInstanceIds(List)
,MessageCorrelationAsyncBuilder.processInstanceQuery(ProcessInstanceQuery)
, orMessageCorrelationAsyncBuilder.historicProcessInstanceQuery(HistoricProcessInstanceQuery)
has to be set.- Returns:
- the builder
-
setVariable
Description copied from interface:MessageCorrelationAsyncBuilder
Pass 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.
- Specified by:
setVariable
in interfaceMessageCorrelationAsyncBuilder
- Parameters:
variableName
- the name of the variable to setvariableValue
- the value of the variable to set- Returns:
- the builder
-
setVariables
Description copied from interface:MessageCorrelationAsyncBuilder
Pass a map of variables to the execution waiting on the message. Use this method for passing the message's payload
- Specified by:
setVariables
in interfaceMessageCorrelationAsyncBuilder
- Parameters:
variables
- the map of variables- Returns:
- the builder
-
ensurePayloadProcessInstanceVariablesInitialized
protected void ensurePayloadProcessInstanceVariablesInitialized() -
correlateAllAsync
Description copied from interface:MessageCorrelationAsyncBuilder
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.- Specified by:
correlateAllAsync
in interfaceMessageCorrelationAsyncBuilder
- Returns:
- the batch which correlates the message asynchronously
-
getCommandExecutor
-
getMessageName
-
getProcessInstanceIds
-
getProcessInstanceQuery
-
getHistoricProcessInstanceQuery
-
getPayloadProcessInstanceVariables
-