1 Reply Latest reply on May 30, 2013 2:04 PM by Jose Miguel Loor

    Unable to extract information from a ESB Message to JMS Message

    Jose Miguel Loor Apprentice



      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"


                <start-state name="start">

                          <transition to="evaluation" name="to_state">

                                    <action name="action" class="com.ndeveloper.bpm.action.MessageActionHandler">


                                                        To Evaluation State



                                    <action name="esbResponse"



                                              <esbServiceName>Vacation Request Response Service</esbServiceName>


                                                        <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" />






                <state name="evaluation">

                          <transition name="to_end" to="end">

                                    <action name="action" class="com.ndeveloper.bpm.action.MessageActionHandler">


                                                        To End Transtion





                <end-state name="end"></end-state>



      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">


          <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"/>





      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 ??



        • 1. Re: Unable to extract information from a ESB Message to JMS Message
          Jose Miguel Loor Apprentice

          I solved this on my own


          The trick was this:



                                                            <mapping bpm="processInstance.id" esb="properties.piId" />

                                                            <mapping bpm="processInstance.version" esb="properties.piVersion" />

                                                            <mapping bpm="requestId" esb="properties.requestId" />



          As you can see, i places the word properties before the parameter name, and that did the trick


          Hope it is usefull for somebody else