public class MessageCorrelationBuilderImpl extends Object implements MessageCorrelationBuilder
Modifier and Type | Field and Description |
---|---|
protected String |
businessKey |
protected CommandContext |
commandContext |
protected CommandExecutor |
commandExecutor |
protected Map<String,Object> |
correlationProcessInstanceVariables |
protected String |
messageName |
protected Map<String,Object> |
payloadProcessInstanceVariables |
protected String |
processInstanceId |
Constructor and Description |
---|
MessageCorrelationBuilderImpl(CommandContext commandContext,
String messageName) |
MessageCorrelationBuilderImpl(CommandExecutor commandExecutor,
String messageName) |
Modifier and Type | Method and Description |
---|---|
void |
correlate()
Executes the message correlation.
|
void |
correlateAll()
Executes the message correlation for multiple messages.
|
protected void |
ensurePayloadProcessInstanceVariablesInitialized() |
String |
getBusinessKey() |
CommandContext |
getCommandContext() |
CommandExecutor |
getCommandExecutor() |
Map<String,Object> |
getCorrelationProcessInstanceVariables() |
String |
getMessageName() |
Map<String,Object> |
getPayloadProcessInstanceVariables() |
String |
getProcessInstanceId() |
MessageCorrelationBuilder |
processInstanceBusinessKey(String businessKey)
Correlate the message such that the process instance has a
business with the given name and value.
|
MessageCorrelationBuilder |
processInstanceId(String id)
Correlate the message such that a process instance with the given id is selected.
|
MessageCorrelationBuilder |
processInstanceVariableEquals(String variableName,
Object variableValue)
Correlate the message such that the process instance has a
variable with the given name and value.
|
MessageCorrelationBuilder |
setVariable(String variableName,
Object variableValue)
Pass a variable to the execution waiting on the message.
|
MessageCorrelationBuilder |
setVariables(Map<String,Object> variables)
Pass a map of variables to the execution waiting on the message.
|
protected CommandExecutor commandExecutor
protected CommandContext commandContext
protected String messageName
protected String businessKey
protected String processInstanceId
protected Map<String,Object> correlationProcessInstanceVariables
public MessageCorrelationBuilderImpl(CommandExecutor commandExecutor, String messageName)
public MessageCorrelationBuilderImpl(CommandContext commandContext, String messageName)
public MessageCorrelationBuilder processInstanceBusinessKey(String businessKey)
MessageCorrelationBuilder
Correlate the message such that the process instance has a business with the given name and value.
processInstanceBusinessKey
in interface MessageCorrelationBuilder
businessKey
- the businessKey to correlate on.public MessageCorrelationBuilder processInstanceVariableEquals(String variableName, Object variableValue)
MessageCorrelationBuilder
Correlate the message such that the process instance has a variable with the given name and value.
processInstanceVariableEquals
in interface MessageCorrelationBuilder
variableName
- the name of the process instance variable to correlate on.variableValue
- the value of the process instance variable to correlate on.public MessageCorrelationBuilder processInstanceId(String id)
MessageCorrelationBuilder
Correlate the message such that a process instance with the given id is selected.
processInstanceId
in interface MessageCorrelationBuilder
id
- the id of the process instance to correlate on.public MessageCorrelationBuilder setVariable(String variableName, Object variableValue)
MessageCorrelationBuilder
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.
setVariable
in interface MessageCorrelationBuilder
variableName
- the name of the variable to setvariableValue
- the value of the variable to setpublic MessageCorrelationBuilder setVariables(Map<String,Object> variables)
MessageCorrelationBuilder
Pass a map of variables to the execution waiting on the message. Use this method for passing the message's payload
setVariables
in interface MessageCorrelationBuilder
variables
- the map of variablesprotected void ensurePayloadProcessInstanceVariablesInitialized()
public void correlate()
MessageCorrelationBuilder
This will result in either:
correlate
in interface MessageCorrelationBuilder
public void correlateAll()
MessageCorrelationBuilder
This will result in any number of the following:
correlateAll
in interface MessageCorrelationBuilder
public CommandExecutor getCommandExecutor()
public CommandContext getCommandContext()
public String getMessageName()
public String getBusinessKey()
public String getProcessInstanceId()
public Map<String,Object> getCorrelationProcessInstanceVariables()
Copyright © 2018. All rights reserved.