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
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected HistoricProcessInstanceQuery
historicProcessInstanceQuery
protected String
messageName
protected Map<String,Object>
payloadProcessInstanceVariables
protected List<String>
processInstanceIds
protected ProcessInstanceQuery
processInstanceQuery
-
Constructor Summary
Constructors Constructor Description MessageCorrelationAsyncBuilderImpl(CommandExecutor commandExecutor, String messageName)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Batch
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.protected void
ensurePayloadProcessInstanceVariablesInitialized()
CommandExecutor
getCommandExecutor()
HistoricProcessInstanceQuery
getHistoricProcessInstanceQuery()
String
getMessageName()
Map<String,Object>
getPayloadProcessInstanceVariables()
List<String>
getProcessInstanceIds()
ProcessInstanceQuery
getProcessInstanceQuery()
MessageCorrelationAsyncBuilder
historicProcessInstanceQuery(HistoricProcessInstanceQuery historicProcessInstanceQuery)
Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuilder
processInstanceIds(List<String> ids)
Correlate the message such that the process instances with the given ids are selected.MessageCorrelationAsyncBuilder
processInstanceQuery(ProcessInstanceQuery processInstanceQuery)
Correlate the message such that the process instances found by the given query are selected.MessageCorrelationAsyncBuilder
setVariable(String variableName, Object variableValue)
Pass a variable to the execution waiting on the message.MessageCorrelationAsyncBuilder
setVariables(Map<String,Object> variables)
Pass a map of variables to the execution waiting on the message.
-
-
-
Field Detail
-
commandExecutor
protected CommandExecutor commandExecutor
-
messageName
protected String messageName
-
processInstanceQuery
protected ProcessInstanceQuery processInstanceQuery
-
historicProcessInstanceQuery
protected HistoricProcessInstanceQuery historicProcessInstanceQuery
-
-
Constructor Detail
-
MessageCorrelationAsyncBuilderImpl
public MessageCorrelationAsyncBuilderImpl(CommandExecutor commandExecutor, String messageName)
-
-
Method Detail
-
processInstanceIds
public MessageCorrelationAsyncBuilder processInstanceIds(List<String> ids)
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
public MessageCorrelationAsyncBuilder setVariable(String variableName, Object variableValue)
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
public MessageCorrelationAsyncBuilder setVariables(Map<String,Object> variables)
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
public Batch 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
public CommandExecutor getCommandExecutor()
-
getMessageName
public String getMessageName()
-
getProcessInstanceQuery
public ProcessInstanceQuery getProcessInstanceQuery()
-
getHistoricProcessInstanceQuery
public HistoricProcessInstanceQuery getHistoricProcessInstanceQuery()
-
-