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 java.lang.Object implements MessageCorrelationAsyncBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutorcommandExecutorprotected HistoricProcessInstanceQueryhistoricProcessInstanceQueryprotected java.lang.StringmessageNameprotected java.util.Map<java.lang.String,java.lang.Object>payloadProcessInstanceVariablesprotected java.util.List<java.lang.String>processInstanceIdsprotected ProcessInstanceQueryprocessInstanceQuery
-
Constructor Summary
Constructors Constructor Description MessageCorrelationAsyncBuilderImpl(CommandExecutor commandExecutor, java.lang.String messageName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BatchcorrelateAllAsync()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.protected voidensurePayloadProcessInstanceVariablesInitialized()CommandExecutorgetCommandExecutor()HistoricProcessInstanceQuerygetHistoricProcessInstanceQuery()java.lang.StringgetMessageName()java.util.Map<java.lang.String,java.lang.Object>getPayloadProcessInstanceVariables()java.util.List<java.lang.String>getProcessInstanceIds()ProcessInstanceQuerygetProcessInstanceQuery()MessageCorrelationAsyncBuilderhistoricProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuilderprocessInstanceIds(java.util.List<java.lang.String> ids)Correlate the message such that the process instances with the given ids are selected.MessageCorrelationAsyncBuilderprocessInstanceQuery(ProcessInstanceQuery processInstanceQuery)Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuildersetVariable(java.lang.String variableName, java.lang.Object variableValue)Pass a variable to the execution waiting on the message.MessageCorrelationAsyncBuildersetVariables(java.util.Map<java.lang.String,java.lang.Object> variables)Pass a map of variables to the execution waiting on the message.
-
-
-
Field Detail
-
commandExecutor
protected CommandExecutor commandExecutor
-
messageName
protected java.lang.String messageName
-
payloadProcessInstanceVariables
protected java.util.Map<java.lang.String,java.lang.Object> payloadProcessInstanceVariables
-
processInstanceIds
protected java.util.List<java.lang.String> processInstanceIds
-
processInstanceQuery
protected ProcessInstanceQuery processInstanceQuery
-
historicProcessInstanceQuery
protected HistoricProcessInstanceQuery historicProcessInstanceQuery
-
-
Constructor Detail
-
MessageCorrelationAsyncBuilderImpl
public MessageCorrelationAsyncBuilderImpl(CommandExecutor commandExecutor, java.lang.String messageName)
-
-
Method Detail
-
processInstanceIds
public MessageCorrelationAsyncBuilder processInstanceIds(java.util.List<java.lang.String> ids)
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
public MessageCorrelationAsyncBuilder setVariable(java.lang.String variableName, java.lang.Object variableValue)
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
public MessageCorrelationAsyncBuilder setVariables(java.util.Map<java.lang.String,java.lang.Object> variables)
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
public Batch 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
public CommandExecutor getCommandExecutor()
-
getMessageName
public java.lang.String getMessageName()
-
getProcessInstanceIds
public java.util.List<java.lang.String> getProcessInstanceIds()
-
getProcessInstanceQuery
public ProcessInstanceQuery getProcessInstanceQuery()
-
getHistoricProcessInstanceQuery
public HistoricProcessInstanceQuery getHistoricProcessInstanceQuery()
-
getPayloadProcessInstanceVariables
public java.util.Map<java.lang.String,java.lang.Object> getPayloadProcessInstanceVariables()
-
-