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
FieldsModifier and TypeFieldDescriptionprotected CommandExecutorprotected HistoricProcessInstanceQueryprotected Stringprotected ProcessInstanceQuery -
Constructor Summary
ConstructorsConstructorDescriptionMessageCorrelationAsyncBuilderImpl(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 voidhistoricProcessInstanceQuery(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:MessageCorrelationAsyncBuilderCorrelate the message such that the process instances with the given ids are selected.
- Specified by:
processInstanceIdsin 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:MessageCorrelationAsyncBuilderCorrelate the message such that the process instances found by the given query are selected.
- Specified by:
processInstanceQueryin 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:MessageCorrelationAsyncBuilderCorrelate the message such that the process instances found by the given query are selected.
- Specified by:
historicProcessInstanceQueryin 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:MessageCorrelationAsyncBuilderPass 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:
setVariablein 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:MessageCorrelationAsyncBuilderPass a map of variables to the execution waiting on the message. Use this method for passing the message's payload
- Specified by:
setVariablesin interfaceMessageCorrelationAsyncBuilder- Parameters:
variables- the map of variables- Returns:
- the builder
-
ensurePayloadProcessInstanceVariablesInitialized
protected void ensurePayloadProcessInstanceVariablesInitialized() -
correlateAllAsync
Description copied from interface:MessageCorrelationAsyncBuilderCorrelates 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:
correlateAllAsyncin interfaceMessageCorrelationAsyncBuilder- Returns:
- the batch which correlates the message asynchronously
-
getCommandExecutor
-
getMessageName
-
getProcessInstanceIds
-
getProcessInstanceQuery
-
getHistoricProcessInstanceQuery
-
getPayloadProcessInstanceVariables
-