1 2 Previous Next 17 Replies Latest reply on Nov 9, 2007 4:14 AM by fabianw

    jBPM message passing problem

    Dominik Kunz Newbie

      Hi,

      I am evaluating the jBPM integration in JBoss ESB and cannot figure out how to use jBPM to send a message from one service to another and add additional payload to the message.

      Here the scenario:
      1) a message is received (sent via jms, as ObjectMessage containing a xml string),
      2) jbpm invokes a service called SmooksTransformerService. In this services action additional payload is added to the message body using

      message.getBody.add("KEY", "VALUE")

      3) after that, jbpm invokes another service where I cannot find the additional payload anymore

      I had a look at the quickstarts but I can't figure out how I can solve my problem.

      Thanks in advance for your help,
      Dominik

        • 1. Re: jBPM message passing problem
          Dominik Kunz Newbie

          Here are the messages that fly around:

          Message before SmooksTransformer Service:

          09:16:56,390 INFO [STDOUT] [ message: [ JBOSS_XML ]
          [ header: [ To: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_bpm_transform_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/> >, From: null, ReplyTo: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_bpm_transform_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='b7519034-51e2-485e-9604-ef588341fc7b'/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> >, FaultTo: null, Action: null, MessageID: ea76a0a6-6a9c-4670-8a12-f1bd5c7d3cc3, RelatesTo: null ]
          context: [ null ]
          body: [ byte[]: <request>
           <!-- TO SHORTEN THE MESSAGE I REMOVED THE XML STRING -->
          </request>, objects: {jbpmTokenId=2, jbpmCurrentNodeName=Transform, jbpmProcessDefVersion=2, jbpmProcessDefName=SearchCustomer, jbpmProcessDefId=2, jbpmProcessInstId=2} ]
          fault: [ null, null, null ]
          attachments: [ Named:{}, Unnamed:[] ]
          properties: [ {org.jboss.soa.esb.message.time.dod=Thu Oct 25 09:16:56 CEST 2007, org.jboss.soa.esb.message.time.dob=Thu Oct 25 09:16:56 CEST 2007, org.jboss.soa.esb.message.source=PortReference < jms://localhost/queue/isogmbh_bpm_transform_esb >, org.jboss.soa.esb.message.transport.type=JMS} ] ] ]


          Message after SmooksTransformer Service:

          09:16:56,437 INFO [STDOUT] [ message: [ JBOSS_XML ]
          [ header: [ To: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_bpm_transform_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/> >, From: null, ReplyTo: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_bpm_transform_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='b7519034-51e2-485e-9604-ef588341fc7b'/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> >, FaultTo: null, Action: isogmbh.crm.soa.login.loginaction, MessageID: ea76a0a6-6a9c-4670-8a12-f1bd5c7d3cc3, RelatesTo: null ]
          context: [ null ]
          body: [ byte[]: <request>
           <!-- CUT XML CONTENT -->
          </request>, objects: {org.jboss.soa.esb.message.defaultEntry=<request>
           <!-- CUT XML CONTENT -->
          </request>, isogmbh.crm.soa.login.password=****, jbpmProcessDefName=SearchCustomer, jbpmProcessDefId=2, jbpmProcessDefVersion=2, jbpmTokenId=2, isogmbh.crm.soa.login.loginname=****, jbpmProcessInstId=2, org.jboss.soa.esb.actions.current.after=<request>
           <!-- CUT XML CONTENT -->
          </request>, jbpmCurrentNodeName=Transform, isogmbh.crm.soa.login.mandatorname=international, EXTRACTED_BEANS_HASH={loginInfo=de.isogmbh.soa.crm.dto.LoginDTO@12021a2, searchPattern=de.isogmbh.soa.crm.dto.SearchPatternDTO@19ae98b}} ]
          fault: [ null, null, null ]
          attachments: [ Named:{}, Unnamed:[] ]
          properties: [ {org.jboss.soa.esb.message.time.dod=Thu Oct 25 09:16:56 CEST 2007, org.jboss.soa.esb.message.time.dob=Thu Oct 25 09:16:56 CEST 2007, org.jboss.soa.esb.message.source=PortReference < jms://localhost/queue/isogmbh_bpm_transform_esb >, org.jboss.soa.esb.message.transport.type=JMS} ] ] ]


          And here is the message in the next ESB service, where all the named payload (isogmbh.crm.soa.login.mandatorname, ...) in the message is gone:

          09:16:58,250 INFO [LoginListener] LoginListener message**********
          message: [ JBOSS_XML ]
          [ header: [ To: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_soa_login_esb/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/> >, From: null, ReplyTo: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_soa_login_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='7862a3a7-96b8-418e-8865-6b3ce7b8ddb2'/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> >, FaultTo: null, Action: null, MessageID: 205c0a43-2666-41ee-857e-13877b1a10aa, RelatesTo: null ]
          context: [ null ]
          body: [ byte[]: <request>
           <!-- CUT XML CONTENT -->
          </request>, objects: {jbpmTokenId=2, jbpmCurrentNodeName=ProcessLogin, jbpmProcessDefVersion=2, jbpmProcessDefName=SearchCustomer, jbpmProcessDefId=2, jbpmProcessInstId=2} ]
          fault: [ null, null, null ]
          attachments: [ Named:{}, Unnamed:[] ]
          properties: [ {org.jboss.soa.esb.message.time.dod=Thu Oct 25 09:16:58 CEST 2007, org.jboss.soa.esb.message.time.dob=Thu Oct 25 09:16:58 CEST 2007, org.jboss.soa.esb.message.source=PortReference < jms://localhost/queue/isogmbh_soa_login_esb >, org.jboss.soa.esb.message.transport.type=JMS} ] ]


          Maybe someone can tell me how I can retrieve the named payload of the body in the second action.

          Regards,
          Dominik

          • 2. Re: jBPM message passing problem
            Burr Sutter Master

            in your jpdl

             <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
             <esbCategoryName>BPM_Orchestration4</esbCategoryName>
             <esbServiceName>DiscountService</esbServiceName>
             <jbpmToEsbVars>
             <mapping jbpm="entireCustomerAsObject" esb="customer" />
             <mapping jbpm="entireOrderAsObject" esb="orderHeader" />
             <mapping jbpm="entireOrderAsXML" esb="BODY_CONTENT" />
             </jbpmToEsbVars>
             <returnVars>
             <mapping jbpm="entireOrderAsObject" esb="order" />
             </returnVars>
             </action>
            


            in your esb action,
            message.getBody().get("orderHeader")





            • 3. Re: jBPM message passing problem
              Dominik Kunz Newbie

              Thanks for your answer!

              But this didn't work for me. It seems like I did not get it...

              Is there a complete example that shows this scenario?
              Do I have to add something to the jboss-esb.xml to get this working? Like:

              <object-path esb="BODY_CONTENT" bpm="theBody" />
              <object-path esb="'isogmbh.crm.soa.login.mandatorname'" bpm="mandatorName" />


              Can you explain to me what the
              <jbpmToEsbVars>
              and
              <returnVars>
              tags are for?

              BTW the BODY_CONTENT is passed corectly from one from one esb service to another.

              Thanks,
              Dominik

              • 4. Re: jBPM message passing problem
                Burr Sutter Master

                Keep in mind there is a bi-directional relationship between jBPM & the ESB. jboss-esb.xml can push variables into jBPM and vice versa.

                jbpmToEsbVars is for jBPM2ESB and is in the JPDL

                <object-path esb="BODY_CONTENT" bpm="theBody" /> is for ESB2jBPM and is found in the jboss-esb.xml

                bpm_orchestration2 illustrates some of this. We have another example in the works but it targets ESB 4.2.1.

                Burr




                • 5. Re: jBPM message passing problem
                  Dominik Kunz Newbie

                  Ok, I managed to put variables to jBPM, but my main problem is, when I
                  modify the message in my ESB Action (invoked by jbpm) then this is not going to be persistent. To illustrate this here are the messages:

                  1) ESBService1 is invoked by jbpm. Request message from EsbActionHandler.java is:

                  BPMACTIONHANDLER_REQUEST: message: [ JBOSS_XML ]
                  [ header: [ To: null, From: null, ReplyTo: null, FaultTo: null, Action: null, MessageID: 19d31543-1424-4d0e-b95d-5ee7f7fbcf17, RelatesTo: null ]
                  context: [ null ]
                  body: [ byte[]: <request>
                   <user>
                   <mandator>international</mandator>
                   <loginname>hq01</loginname>
                   <password>hq01</password>
                   </user>
                   <sp>
                   <bpn />
                   <city />
                   <comChannel />
                   <country />
                   <firstName>Andrea</firstName>
                   <lastName />
                   <postalCode />
                   <street />
                   <ignoreNoAdvertising>false</ignoreNoAdvertising>
                   <businessPartnerType />
                   </sp>
                  </request>, objects: {eVar1=45, isogmbh.crm.soa.login.password=foo3, jbpmProcessDefName=SearchCustomer, jbpmProcessDefId=40, jbpmProcessDefVersion=40, jbpmTokenId=41, isogmbh.crm.soa.login.loginname=foo2, jbpmProcessInstId=41, jbpmCurrentNodeName=Transform, isogmbh.crm.soa.login.mandatorname=foo} ]
                  fault: [ null, null, null ]
                  attachments: [ Named:{}, Unnamed:[] ]
                  properties: [ {} ] ]


                  2) The response which is received by EsbActionHandler.java is:
                  BPMACTIONHANDLER_RESPONSE: message: [ JBOSS_XML ]
                  [ header: [ To: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_bpm_transform_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='06e721de-b14c-4cc6-94eb-53569c819f67'/> >, From: null, ReplyTo: EPR: PortReference < <wsa:Address jms://localhost/queue/isogmbh_bpm_transform_esb_reply/>, <wsa:ReferenceProperties jbossesb:java.naming.provider.url : jnp://127.0.0.1:1199/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.initial : org.jnp.interfaces.NamingContextFactory/>, <wsa:ReferenceProperties jbossesb:java.naming.factory.url.pkgs : org.jboss.naming:org.jnp.interfaces/>, <wsa:ReferenceProperties jbossesb:destination-type : queue/>, <wsa:ReferenceProperties jbossesb:specification-version : 1.1/>, <wsa:ReferenceProperties jbossesb:connection-factory : ConnectionFactory/>, <wsa:ReferenceProperties jbossesb:message-selector : jbossESBresponseUUID='06e721de-b14c-4cc6-94eb-53569c819f67'/>, <wsa:ReferenceProperties jbossesb:type : urn:jboss/esb/epr/type/jms/> >, FaultTo: null, Action: null, MessageID: 19d31543-1424-4d0e-b95d-5ee7f7fbcf17, RelatesTo: null ]
                  context: [ null ]
                  body: [ byte[]: <request>
                   <user>
                   <mandator>international</mandator>
                   <loginname>hq01</loginname>
                   <password>hq01</password>
                   </user>
                   <sp>
                   <bpn />
                   <city />
                   <comChannel />
                   <country />
                   <firstName>Andrea</firstName>
                   <lastName />
                   <postalCode />
                   <street />
                   <ignoreNoAdvertising>false</ignoreNoAdvertising>
                   <businessPartnerType />
                   </sp>
                  </request>, objects: {eVar1=45, org.jboss.soa.esb.message.defaultEntry=<request>
                   <user>
                   <mandator>international</mandator>
                   <loginname>hq01</loginname>
                   <password>hq01</password>
                   </user>
                   <sp>
                   <bpn></bpn>
                   <city></city>
                   <comChannel></comChannel>
                   <country></country>
                   <firstName>Andrea</firstName>
                   <lastName></lastName>
                   <postalCode></postalCode>
                   <street></street>
                   <ignoreNoAdvertising>false</ignoreNoAdvertising>
                   <businessPartnerType></businessPartnerType>
                   </sp>
                  </request>, jbpmProcessDefName=SearchCustomer, isogmbh.crm.soa.login.password=hq01, jbpmProcessDefId=40, jbpmProcessDefVersion=40, jbpmTokenId=41, isogmbh.crm.soa.login.loginname=hq01, jbpmProcessInstId=41, org.jboss.soa.esb.actions.current.after=<request>
                   <user>
                   <mandator>international</mandator>
                   <loginname>hq01</loginname>
                   <password>hq01</password>
                   </user>
                   <sp>
                   <bpn></bpn>
                   <city></city>
                   <comChannel></comChannel>
                   <country></country>
                   <firstName>Andrea</firstName>
                   <lastName></lastName>
                   <postalCode></postalCode>
                   <street></street>
                   <ignoreNoAdvertising>false</ignoreNoAdvertising>
                   <businessPartnerType></businessPartnerType>
                   </sp>
                  </request>, jbpmCurrentNodeName=Transform, isogmbh.crm.soa.login.mandatorname=international, EXTRACTED_BEANS_HASH={loginInfo=de.isogmbh.soa.crm.dto.LoginDTO@114fb2b, searchPattern=de.isogmbh.soa.crm.dto.SearchPatternDTO@75fbff}} ]
                  fault: [ null, null, null ]
                  attachments: [ Named:{}, Unnamed:[] ]
                  properties: [ {org.jboss.soa.esb.message.time.dod=Thu Oct 25 14:43:49 CEST 2007, org.jboss.soa.esb.message.time.dob=Thu Oct 25 14:43:49 CEST 2007, org.jboss.soa.esb.message.source=PortReference < jms://localhost/queue/isogmbh_bpm_transform_esb_reply >, org.jboss.soa.esb.message.transport.type=JMS} ] ]


                  3) jbpm invokes another esb service, here the request from the EsbActionHandler.java is:
                  BPMACTIONHANDLER_REQUEST: message: [ JBOSS_XML ]
                  [ header: [ To: null, From: null, ReplyTo: null, FaultTo: null, Action: null, MessageID: 795ea508-13cf-46b8-aea7-f0cde1388cc8, RelatesTo: null ]
                  context: [ null ]
                  body: [ byte[]: <request>
                   <user>
                   <mandator>international</mandator>
                   <loginname>hq01</loginname>
                   <password>hq01</password>
                   </user>
                   <sp>
                   <bpn />
                   <city />
                   <comChannel />
                   <country />
                   <firstName>Andrea</firstName>
                   <lastName />
                   <postalCode />
                   <street />
                   <ignoreNoAdvertising>false</ignoreNoAdvertising>
                   <businessPartnerType />
                   </sp>
                  </request>, objects: {eVar1=45, isogmbh.crm.soa.login.password=foo3, jbpmProcessDefName=SearchCustomer, jbpmProcessDefId=42, jbpmProcessDefVersion=42, jbpmTokenId=43, isogmbh.crm.soa.login.loginname=foo2, jbpmProcessInstId=43, jbpmCurrentNodeName=ProcessLogin, isogmbh.crm.soa.login.mandatorname=foo} ]
                  fault: [ null, null, null ]
                  attachments: [ Named:{}, Unnamed:[] ]
                  properties: [ {} ] ]


                  As you can see in 1) isogmbh.crm.soa.login.password=foo3
                  in 2) isogmbh.crm.soa.login.password=hq01
                  in 3) i changed back to isogmbh.crm.soa.login.password=foo3

                  I cannot figure out what I am doing wrong...
                  Is it possible to modify the named body payload of a message in an ESB action and to have these changes in the next invoked ESB service available?

                  Regards,
                  Dominik

                  • 6. Re: jBPM message passing problem
                    Burr Sutter Master

                    The most simple (and recommended) approach to solving this problem is to have the last action in the ESB Service's action chain, signal the process instance and hand the updates variables back.

                    This might be your jBPM/JPDL service invocation:

                     <action name="esbAction" class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
                     <esbCategoryName>BPM_Orchestration4</esbCategoryName>
                     <esbServiceName>DiscountService</esbServiceName>
                     <jbpmToEsbVars>
                     <mapping jbpm="entireCustomerAsObject" esb="customer" />
                     <mapping jbpm="entireOrderAsObject" esb="orderHeader" />
                     <mapping jbpm="entireOrderAsXML" esb="BODY_CONTENT" />
                     </jbpmToEsbVars>
                     <returnVars>
                     <mapping jbpm="entireOrderAsObject" esb="order" />
                     </returnVars>
                     </action>
                    


                    Then this can be your ESB Service - Discount Service:


                     <service category="BPM_Orchestration4" name="DiscountService"
                     description="DiscountService">
                     <listeners>
                     <jms-listener name="ESB-Listener"
                     busidref="discountServiceEsbChannel" maxThreads="1" />
                     </listeners>
                     <actions>
                     <action name="display"
                     class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
                     <property name="script"
                     value="/scripts/display.groovy" />
                     </action>
                    
                     <action
                     class="org.jboss.soa.esb.actions.BusinessRulesProcessor"
                     name="discount_calc">
                     <property name="ruleSet"
                     value="Discount_Rules.drl" />
                     <property name="ruleReload" value="true" />
                     <property name="object-paths">
                     <object-path esb="body.orderHeader" />
                     <object-path esb="body.customer" />
                     </property>
                     </action>
                    
                     <action name="setupDiscount"
                     class="org.jboss.soa.esb.actions.scripting.GroovyActionProcessor">
                     <property name="script"
                     value="/scripts/setup_discount.groovy" />
                     </action>
                    
                     <!-- signal the process to indicate that discount is complete -->
                     <action name="signal_a_process_instance"
                     class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
                     <property name="command" value="SignalCommand" />
                     <property name="object-paths">
                     <object-path esb="body.order_orderDiscount"
                     bpm="order_discount" />
                     </property>
                     </action>
                    
                    
                     </actions>
                     </service>
                    


                    I plan to have this example in ESB 4.3 (missed the deadline for ESB 4.2.1) but it will run on 4.2.1 (not 4.2.0). Perhaps after some more testing I'll put it up in the wiki. In the short-term, email me and I'll send you a zip of the project.

                    Burr

                    • 7. Re: jBPM message passing problem
                      Dominik Kunz Newbie

                      I figured out what my problem was.

                      When the names of the named body objects contain dots then I think there was a mapping problem.

                      In my esb action I did this:

                      message.getBody().add("example.my.name", "dominik");

                      and it wasn't passed along all "orchestrated" esb services.
                      Now I renamed "example.my.name" to "example-my-name" and it works like a charm.

                      I tried several mapping definitions like:
                      <mapping jbpm="myname" esb="'example.my.name'" />
                      <mapping jbpm="myname" esb="body.'example.my.name'" />
                      
                      and so on...
                      but neither worked for me.

                      So this one works:
                      <mapping jbpm="myname" esb="example-my-name" />


                      Now I am happy again :)
                      BTW: The JBossESB is really nice! And thanks again for your fast answers!

                      • 8. Re: jBPM message passing problem
                        Kevin Conner Master

                        It sounds as if we have a problem somewhere in that case, we should be supporting quoted names for this very reason.

                        Can you simplify your example down to a minimum which doesn't work?

                        Thanks.

                        • 9. Re: jBPM message passing problem
                          Burr Sutter Master

                          I think you are right. I had a similiar problem and moved away from using "." in the variable names.

                          • 10. Re: jBPM message passing problem
                            Dominik Kunz Newbie

                            I will check this on the weekend and hope that I can find the time to assemble a short example, that will show this...

                            • 11. Re: jBPM message passing problem
                              fabianw Newbie

                              Could someone please explain a bit more about how the variables are passed from/to ESB?

                              I have several web services, which I want to orchestrate with jBPM.
                              At the moment I have a class which populates the message with some example variables and then delivers it to the service which starts the process.
                              Do I have to map every single variable in the jboss-esb.xml and vice versa in the process definition, or is it possible to copy the whole body at once? <object-path esb="BODY_CONTENT" bpm="theBody" /> doesn't work.
                              And how can I add the response from one of my web services as a variable in the message?

                              • 12. Re: jBPM message passing problem
                                Kurt Stam Master

                                Hi Fabian,

                                The short answer is no, that would be too convenient ;). The body is really a collection of named parameters. And BODY_CONTENT should give you the 'default' named parameter. (If you didn't use a name when you added something to your body.).

                                So your

                                <object-path esb="BODY_CONTENT" bpm="theBody" />
                                


                                maps the default body object, into a bpm variable called theBody, but I'm sure you stuff your object some place else in your body.

                                --Kurt

                                • 13. Re: jBPM message passing problem
                                  fabianw Newbie

                                  OK, I thought so.

                                  Just to get this straight... I have to:
                                  - map the vars in the jboss-esb.xml
                                  - map the vars in jBPM with jbpmToEsbVars
                                  - copy them to a request-map for my web service
                                  - copy the response-map back to the message
                                  - map the return value in jBPM with returnVars

                                  Is this correct?

                                  • 14. Re: jBPM message passing problem
                                    fabianw Newbie

                                    I'm still working on my orchestration.

                                    I got it working that the values reach the invoked web services. My problem is that the response-map is empty and of course I can't get the return value of the service back in jBPM if even the response-map is empty.
                                    I already added the @WebResult annotation to the respective methods, but the response-map is still 'null'.

                                    What could cause this? Of course I use the same name for the response-map in the jboss-esb.xml and in my ResponseAction class.

                                    1 2 Previous Next