Unable to extract information from a ESB Message to JMS Message
jmiguel77 May 20, 2013 6:27 PMHi
I have a JBPM deployment that sends a message to a ESB Service wich in turn uses a JMSRouter to send a message to a JMS Queue.
These is the jbpm process definition:
<?xml version="1.0" encoding="UTF-8"?>
<process-definition xmlns="urn:jbpm.org:jpdl-3.2"
name="VacationRequest">
<start-state name="start">
<transition to="evaluation" name="to_state">
<action name="action" class="com.ndeveloper.bpm.action.MessageActionHandler">
<message>
To Evaluation State
</message>
</action>
<action name="esbResponse"
class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbNotifier">
<esbCategoryName>nDeveloper</esbCategoryName>
<esbServiceName>Vacation Request Response Service</esbServiceName>
<bpmToEsbVars>
<mapping bpm="processInstance.id" esb="body.piId" />
<mapping bpm="processInstance.version" esb="body.piVersion" />
<mapping bpm="requestId" esb="body.requestId" />
<mapping bpm="token.name" esb="body.piTokenName" />
<mapping bpm="node.name" esb="body.piNodeName" />
<mapping bpm="node.id" esb="body.piNodeId" />
</bpmToEsbVars>
<globalProcessScope>true</globalProcessScope>
</action>
</transition>
</start-state>
<state name="evaluation">
<transition name="to_end" to="end">
<action name="action" class="com.ndeveloper.bpm.action.MessageActionHandler">
<message>
To End Transtion
</message>
</action>
</transition>
</state>
<end-state name="end"></end-state>
</process-definition>
The esbResponse action calls an esb service, sending some data for it. This is the code for the esb service:
<service category="nDeveloper"
description="Service to obtain a response from de jBPM process of Vacation Request"
invmScope="GLOBAL" name="Vacation Request Response Service">
<actions>
<action class="com.ndeveloper.esb.action.MessageAction"
name="Show Message Action" process="displayMessage"/>
<action class="org.jboss.soa.esb.actions.routing.JMSRouter" name="Send JMS Message Action">
<property name="jndiName" value="queue/VacationRequestResponseQueue"/>
</action>
</actions>
</service>
the service has two actions; the first one simply writes some info about the message to the console; the second action is the one that places the message in the queue.
Once in the queue, i am using a MDB Java Bean to access the message, but i am receiving a JMS Message, not an ESB Message
How do i access the information that was placed inside the ESB Message ??
Thanks