org.camunda.bpm.engine.impl
Class MessageCorrelationBuilderImpl

java.lang.Object
  extended by org.camunda.bpm.engine.impl.MessageCorrelationBuilderImpl
All Implemented Interfaces:
MessageCorrelationBuilder

public class MessageCorrelationBuilderImpl
extends Object
implements MessageCorrelationBuilder

Author:
Daniel Meyer

Field Summary
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 Summary
MessageCorrelationBuilderImpl(CommandContext commandContext, String messageName)
           
MessageCorrelationBuilderImpl(CommandExecutor commandExecutor, String messageName)
           
 
Method Summary
 void correlate()
          Executes the message correlation.
 void correlateAll()
          Executes the message correlation for multiple messages.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

commandExecutor

protected CommandExecutor commandExecutor

commandContext

protected CommandContext commandContext

messageName

protected String messageName

businessKey

protected String businessKey

processInstanceId

protected String processInstanceId

correlationProcessInstanceVariables

protected Map<String,Object> correlationProcessInstanceVariables

payloadProcessInstanceVariables

protected Map<String,Object> payloadProcessInstanceVariables
Constructor Detail

MessageCorrelationBuilderImpl

public MessageCorrelationBuilderImpl(CommandExecutor commandExecutor,
                                     String messageName)

MessageCorrelationBuilderImpl

public MessageCorrelationBuilderImpl(CommandContext commandContext,
                                     String messageName)
Method Detail

processInstanceBusinessKey

public MessageCorrelationBuilder processInstanceBusinessKey(String businessKey)
Description copied from interface: MessageCorrelationBuilder

Correlate the message such that the process instance has a business with the given name and value.

Specified by:
processInstanceBusinessKey in interface MessageCorrelationBuilder
Parameters:
businessKey - the businessKey to correlate on.
Returns:
the builder

processInstanceVariableEquals

public MessageCorrelationBuilder processInstanceVariableEquals(String variableName,
                                                               Object variableValue)
Description copied from interface: MessageCorrelationBuilder

Correlate the message such that the process instance has a variable with the given name and value.

Specified by:
processInstanceVariableEquals in interface MessageCorrelationBuilder
Parameters:
variableName - the name of the process instance variable to correlate on.
variableValue - the value of the process instance variable to correlate on.
Returns:
the builder

processInstanceId

public MessageCorrelationBuilder processInstanceId(String id)
Description copied from interface: MessageCorrelationBuilder

Correlate the message such that a process instance with the given id is selected.

Specified by:
processInstanceId in interface MessageCorrelationBuilder
Parameters:
id - the id of the process instance to correlate on.
Returns:
the builder

setVariable

public MessageCorrelationBuilder setVariable(String variableName,
                                             Object variableValue)
Description copied from interface: 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.

Specified by:
setVariable in interface MessageCorrelationBuilder
Parameters:
variableName - the name of the variable to set
variableValue - the value of the variable to set
Returns:
the builder

setVariables

public MessageCorrelationBuilder setVariables(Map<String,Object> variables)
Description copied from interface: MessageCorrelationBuilder

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 interface MessageCorrelationBuilder
Parameters:
variables - the map of variables
Returns:
the builder

correlate

public void correlate()
Description copied from interface: MessageCorrelationBuilder
Executes the message correlation.

This will result in either:

Specified by:
correlate in interface MessageCorrelationBuilder

correlateAll

public void correlateAll()
Description copied from interface: MessageCorrelationBuilder
Executes the message correlation for multiple messages.

This will result in any number of the following:

Specified by:
correlateAll in interface MessageCorrelationBuilder

getCommandExecutor

public CommandExecutor getCommandExecutor()

getCommandContext

public CommandContext getCommandContext()

getMessageName

public String getMessageName()

getBusinessKey

public String getBusinessKey()

getProcessInstanceId

public String getProcessInstanceId()

getCorrelationProcessInstanceVariables

public Map<String,Object> getCorrelationProcessInstanceVariables()

getPayloadProcessInstanceVariables

public Map<String,Object> getPayloadProcessInstanceVariables()


Copyright © 2014 camunda services GmbH. All rights reserved.