org.jboss.soa.esb.services.jbpm.actionhandlers
Class EsbActionHandler

java.lang.Object
  extended by org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler
All Implemented Interfaces:
java.io.Serializable, org.jbpm.graph.def.ActionHandler

public class EsbActionHandler
extends java.lang.Object
implements org.jbpm.graph.def.ActionHandler

Send messages to ESB services from jBPM applications, and leaves the node in a wait state, waiting for a call back.

  • esbCategoryName - for ESB registry lookup
  • esbServiceName - for ESB registry lookup
  • millisToWaitForResponse - deprecated, please use a jBPM Timer
  • Author:
    Esteban, Kurt T Stam
    See Also:
    Serialized Form

    Field Summary
     org.dom4j.tree.DefaultElement bpmToEsbVars
               
     java.lang.String esbCategoryName
               
     java.lang.String esbServiceName
               
     org.dom4j.tree.DefaultElement esbToBpmVars
               
     java.lang.String exceptionTransition
               
     java.lang.Boolean globalProcessScope
               
     java.lang.Integer millisToWaitForResponse
               
     java.lang.String replyToOriginator
               
     
    Constructor Summary
    EsbActionHandler()
               
     
    Method Summary
    protected  EPR createFaultTo(java.lang.String esbToJBpmXml, java.lang.Boolean globalProcessScope, org.jbpm.graph.exe.ExecutionContext executionContext)
              Sets the faultTo EPR.
    protected  EPR createReplyTo(java.lang.String esbToJBpmXml, java.lang.Boolean globalProcessScope, org.jbpm.graph.exe.ExecutionContext executionContext)
              Setup the replyTo for the CallBack Service.
     void execute(org.jbpm.graph.exe.ExecutionContext executionContext)
               
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
     

    Field Detail

    esbCategoryName

    public java.lang.String esbCategoryName

    esbServiceName

    public java.lang.String esbServiceName

    millisToWaitForResponse

    public java.lang.Integer millisToWaitForResponse

    globalProcessScope

    public java.lang.Boolean globalProcessScope

    bpmToEsbVars

    public org.dom4j.tree.DefaultElement bpmToEsbVars

    esbToBpmVars

    public org.dom4j.tree.DefaultElement esbToBpmVars

    exceptionTransition

    public java.lang.String exceptionTransition

    replyToOriginator

    public java.lang.String replyToOriginator
    Constructor Detail

    EsbActionHandler

    public EsbActionHandler()
    Method Detail

    execute

    public void execute(org.jbpm.graph.exe.ExecutionContext executionContext)
                 throws java.lang.Exception
    Specified by:
    execute in interface org.jbpm.graph.def.ActionHandler
    Throws:
    java.lang.Exception

    createReplyTo

    protected EPR createReplyTo(java.lang.String esbToJBpmXml,
                                java.lang.Boolean globalProcessScope,
                                org.jbpm.graph.exe.ExecutionContext executionContext)
    Setup the replyTo for the CallBack Service. Creates or increments a process-node-version-counter whose name is related to the current node ID. The name of the counter is jbpmProcessNodeVersionCounter. The counter is added to the ProcessVariable Map (global to the ProcessInstance) on the jBPM side The same variable should be added to the EsbMessage before it is passed onto the ESB. Other parameters added are the returnVariable mapping, the nodeId and the tokenId.

    Parameters:
    returnVars - - XML fragment from the processdefinition.xml describing the mapping of ESB Message objects to the jBPM variableMap.
    executionContext - of the currently invoked EsbActionHandler.
    Returns:
    the replyTo EPR of the JBpmCallbackService.

    createFaultTo

    protected EPR createFaultTo(java.lang.String esbToJBpmXml,
                                java.lang.Boolean globalProcessScope,
                                org.jbpm.graph.exe.ExecutionContext executionContext)
    Sets the faultTo EPR. This way jBPM can handle a failure in the ESB service by taking a exception (faultTo) transition.

    Parameters:
    returnVars - - XML fragment from the processdefinition.xml describing the mapping of ESB Message objects to the jBPM variableMap.
    executionContext - of the currently invoked EsbActionHandler.
    Returns:
    the faultTo EPR of the JBpmCallbackService.