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 CommandExecutor
commandExecutor
protected HistoricProcessInstanceQuery
historicProcessInstanceQuery
protected java.lang.String
messageName
protected java.util.Map<java.lang.String,java.lang.Object>
payloadProcessInstanceVariables
protected java.util.List<java.lang.String>
processInstanceIds
protected ProcessInstanceQuery
processInstanceQuery
-
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 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()
java.lang.String
getMessageName()
java.util.Map<java.lang.String,java.lang.Object>
getPayloadProcessInstanceVariables()
java.util.List<java.lang.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(java.util.List<java.lang.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(java.lang.String variableName, java.lang.Object variableValue)
Pass a variable to the execution waiting on the message.MessageCorrelationAsyncBuilder
setVariables(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: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(java.lang.String variableName, java.lang.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(java.util.Map<java.lang.String,java.lang.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 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()
-
-