org.jboss.soa.esb.services.jbpm
Class JBpmObjectMapper

java.lang.Object
  extended by org.jboss.soa.esb.services.jbpm.JBpmObjectMapper

public class JBpmObjectMapper
extends java.lang.Object

Mapping glue between jBPM and ESB. Handles setting up the replyTo of the JBpmCallback Service, and is a wrapper around org.jboss.soa.esb.message.mapping.ObjectMapper to handle jBPM specifics around mapping variables from jBPM to ESB and back.

Author:
kstam, Daniel Bevenius

Constructor Summary
JBpmObjectMapper()
           
 
Method Summary
 java.util.HashMap<java.lang.String,?> mapAuthRequestFromEsbMessageToJBpmMap(Message message)
           
 java.util.HashMap<java.lang.String,java.lang.Object> mapFromEsbMessageToJBpmMap(Message message, java.util.List<Mapping> mappingList)
          This
 java.util.HashMap<java.lang.String,java.lang.Object> mapFromEsbMessageToJBpmMap(Message message, java.lang.String esbToBpmXml)
           
 java.util.HashMap<Mapping,java.lang.Object> mapFromEsbMessageToJBpmMapping(Message message, java.util.List<Mapping> mappingList)
          This
 java.util.HashMap<Mapping,java.lang.Object> mapFromEsbMessageToJBpmMapping(Message message, java.lang.String esbToBpmXml)
           
 Message mapFromJBpmToEsbMessage(org.dom4j.tree.DefaultElement bpmToEsbVars, java.lang.Boolean isGlobalProcessScope, org.jbpm.graph.exe.ExecutionContext executionContext)
          Creates an ESB Message, giving the mapping specified in the jbpmToEsbVars Element.
 java.util.HashMap<java.lang.String,java.lang.Object> mapSecurityContextFromEsbMessageToJBpmMap(Message message)
           
 Message mapSecurityInfoFromJbpmToEsb(boolean gblPrcScope, org.jbpm.graph.exe.ExecutionContext executionContext, Message esbMessage)
          Will map the SecurityContext and AuthenticationRequest from a jBPM variable to ESB Message context.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JBpmObjectMapper

public JBpmObjectMapper()
Method Detail

mapFromJBpmToEsbMessage

public Message mapFromJBpmToEsbMessage(org.dom4j.tree.DefaultElement bpmToEsbVars,
                                       java.lang.Boolean isGlobalProcessScope,
                                       org.jbpm.graph.exe.ExecutionContext executionContext)
Creates an ESB Message, giving the mapping specified in the jbpmToEsbVars Element. This element is defined in the jBPM process-definition.xml as child element of either the EsbNotifier ActionHandler, or the EsbActionHandler.

Parameters:
jbpmToEsbVars - - the configuration of the mapping.
isGlobalProcessScope - - Variables will be looked up using either the token scope or the process-definition (global) scope See the jBPM documentation for more details.
executionContext - - the jBPM ExecutionContext.
Returns:
the newly created ESB message.
Throws:
java.lang.Exception

mapFromEsbMessageToJBpmMap

public java.util.HashMap<java.lang.String,java.lang.Object> mapFromEsbMessageToJBpmMap(Message message,
                                                                                       java.lang.String esbToBpmXml)
                                                                                throws ConfigurationException
Parameters:
message -
esbToBpmXml -
Returns:
Throws:
ConfigurationException

mapFromEsbMessageToJBpmMap

public java.util.HashMap<java.lang.String,java.lang.Object> mapFromEsbMessageToJBpmMap(Message message,
                                                                                       java.util.List<Mapping> mappingList)
This

Parameters:
message -
token -
Throws:
java.lang.Exception

mapFromEsbMessageToJBpmMapping

public java.util.HashMap<Mapping,java.lang.Object> mapFromEsbMessageToJBpmMapping(Message message,
                                                                                  java.lang.String esbToBpmXml)
                                                                           throws ConfigurationException
Parameters:
message -
esbToBpmXml -
Returns:
Throws:
ConfigurationException

mapFromEsbMessageToJBpmMapping

public java.util.HashMap<Mapping,java.lang.Object> mapFromEsbMessageToJBpmMapping(Message message,
                                                                                  java.util.List<Mapping> mappingList)
This

Parameters:
message -
token -
Throws:
java.lang.Exception

mapSecurityContextFromEsbMessageToJBpmMap

public java.util.HashMap<java.lang.String,java.lang.Object> mapSecurityContextFromEsbMessageToJBpmMap(Message message)

mapAuthRequestFromEsbMessageToJBpmMap

public java.util.HashMap<java.lang.String,?> mapAuthRequestFromEsbMessageToJBpmMap(Message message)

mapSecurityInfoFromJbpmToEsb

public Message mapSecurityInfoFromJbpmToEsb(boolean gblPrcScope,
                                            org.jbpm.graph.exe.ExecutionContext executionContext,
                                            Message esbMessage)
Will map the SecurityContext and AuthenticationRequest from a jBPM variable to ESB Message context.

Parameters:
gblPrcScope - True if the process scope is global.
executionContext - The jBPM execution context.
esbMessage - The distination ESB message
Returns: