11 Replies Latest reply on May 20, 2009 6:04 AM by camunda

    Problems with Bpm Processor

    tar_szator

      Hi

      I tried to deploy a ESB Service to my jbossesb-server-4.5.GA.

      Her is the code:

      <service category="Modul" name="CalcCompletionService" description="signal process instance after completion">
       <listeners>
       <jms-listener name="JMS-Gateway" busidref="CalcCompletionGWChannel" maxThreads="1" is-gateway="true" />
       <jms-listener name="ESB-Listener" busidref="CalcCompletionESBChannel" maxThreads="1"/>
       </listeners>
       <actions>
       <action name="correlate" class="esbjbpm.CorrelateCaseToProcessAction"
       process="process" />
       <action name="signalProcessInstance" class="org.jboss.soa.esb.services.jbpm.actions.BpmProcessor">
       <property name="command" value="signalToken" />
       <property name="esbToBpmVars">
       <mapping esb="BODY_CONTENT" bpm="theBody" />
       <mapping esb="body" bpm="theData" />
       </property>
       </action>
       </actions>
       </service>
      

      Now I've got the error

      WARN [ServiceController] Problem starting service jboss.esb:deployment=EsbJbpm.esb
      org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: Error configuring action processing pipeline
      ....
      Caused by: org.jboss.soa.esb.actions.ActionLifecycleException: Attribute 'command' has an invalid value- see CommandVehicle.Operation enum for possible values
      at org.jboss.soa.esb.services.jbpm.actions.BpmProcessor.initialise(BpmProcessor.java:68)
      ...

      I checked http://www.jboss.org/jbossesb/docs/4.2MR1/javadoc/esb/org/jboss/soa/esb/util/jbpm/CommandVehicle.Operation.html
      and so I think "signalToken" is supported.

      What can I do to fix this?

      Thanks for help. Sorry if my english is a litle bad I'm not used to write or speak it.

        • 1. Re: Problems with Bpm Processor
          lucazammarchi

          Hi,
          I am new also to jBPM, in my test project I start a new instance of a bpm process by assing "StartProcessInstanceCommand" value to a command tag.

          The option "StartProcessInstanceCommand" create a new instance of the bpm process and move the token from the start position to the first node.

          Try it and let me know.

          Good luck! :)

          Luca

          • 2. Re: Problems with Bpm Processor
            tar_szator

            Hi,

            thanks for the answer.

            The "StartProcessInstanceCommand" is O.K.

            I solved the problem, but not with this command.

            In the old version (the one wich caused the problem) I tried to use one esb service to call a webservice out of JBPM and one esb service to get the information from the webservice into the JBPM process. Here I used the SignalCommand of the BpmProcessor to put the answer back in the JBPM.
            This way of solving such a problem is shown for example in
            http://www.bpm-guide.de/2008/06/12/jboss-jbpm-meets-esb/
            and that this is posible is shown in http://www.redhat.com/docs/en-US/JBoss_SOA_Platform/4.2.CP03/html/SOA_ESB_Message_Action_Guide/section-BPM.html

            Hoever, now I come to the conclusen that this Command isn't anymore suported by the BpmProcessor, because it isn't needed anymore and maybe of security reasons.

            My solution is to merge the 2 esb services.
            So I get this service and a litle change in the pdl node and it work fine.

             <service category="Modul" name="GetAndAnswer" description="invoked within the process">
             <listeners>
             <jms-listener name="ESB-Listener" busidref="CalcESBChannel" maxThreads="1"/>
             </listeners>
             <actions>
            
             <action name="prepareWSParam" class="esbws.PrepareWebserviceParameter"
             process="process"/>
             <action name="soapui-client-action" class="org.jboss.soa.esb.actions.soap.SOAPClient">
             <property name="wsdl" value="http://127.0.0.1:8080/CalcWS/CalcWS?wsdl" />
             <property name="operation" value="createCase" />
             <property name="responseAsOgnlMap" value="true" />
             <property name="SOAPAction" value="createCase" />
             </action>
             <action name="correlate" class="esbws.CorrelateCaseToProcessAction"
             process="process" />
            
             </actions>
             </service>
            
            <action name="call esb service"
             class="org.jboss.soa.esb.services.jbpm.actionhandlers.EsbActionHandler">
             <esbCategoryName>Modul</esbCategoryName>
             <esbServiceName>GetAndAnswer</esbServiceName>
             <bpmToEsbVars>
             <mapping bpm="wsrequest" esb="wsmsg" />
             </bpmToEsbVars>
             <esbToBpmVars>
             <mapping esb="wsanswer" bpm="wsresponce" />
             </esbToBpmVars>
             </action>
            


            I hope it helped people with the same problem.
            If some of my statements are wrong please corect me.

            • 3. Re: Problems with Bpm Processor
              camunda

              Hi Tar_Szator.

              You are right, the SignalCommand was removed in the latest ESB versions. This is part of a still ongoing discussion how the correlation of service calls to an existing process instance should be handled.

              I am not happy to live without the SignalCommand, but for the moment you have to use the JbpmCallback which operates (correlates/signals) based on fields in the Message handler...

              I add a comment on my blog post about it (wanted to do that long time ago, but slipped throught the cracks, sorry).

              • 4. Re: Problems with Bpm Processor
                camunda

                Okay, made a comment on it in the blog.

                • 5. Re: Problems with Bpm Processor
                  tar_szator

                  First of all. Greate Thanks for your articel "jBpm meet ESB" in the javamagazin. I found it online and it helps me very much for understanding the interaction of JBPM, ESB, JMS, SOAP. It is a greate pleasure to see that you are still aktiv in this field and supports your articels.

                  Short, JBPMCallback ment the way I solved my problem or is it an other way?

                  • 6. Re: Problems with Bpm Processor
                    camunda

                    Thanks! Since BPM and SOA is the niche of our company (camunda) I will stay active in that field :-)

                    Your solution is correct if you have a synchronous service. If you have an asynchronous answer somewhere later the JbpmCallback comes into the game...

                    Cheers
                    Bernd

                    • 7. Re: Problems with Bpm Processor
                      kconner

                      Just to add that the upcoming jBPM 4 should make the issue around signalling much clearer and safer from the ESB perspective. They took our feedback about the correlation issues and say they have addressed them.

                      We should be looking at integrating jBPM4 into the ESB within the coming weeks, so please bear with us.

                      Kev

                      • 8. Re: Problems with Bpm Processor
                        tar_szator

                        I have to work with async ESBCalls soon in my aktuell project.
                        So do you know a good example for using JbpmCallback?
                        This woud halp alot. Thx

                        • 9. Re: Problems with Bpm Processor
                          camunda

                          Hey Kevin,

                          I also wanted to have a deeper look into ESB jbpm 4 integration over the next weeks. If you want to discuss something you can always drop me a mail if you want. MAybe I can even help there, but not sure how much time I can spend on it...

                          @Tar_Szator: I don't remember if it was used in the quickstarts, maybe start to search there...

                          Cheers
                          Bernd

                          • 10. Re: Problems with Bpm Processor
                            kconner

                            That sounds great Bernd, thanks for the offer of help.

                            Kev

                            • 11. Re: Problems with Bpm Processor
                              camunda

                              Offer a helping hand on improving instead of complaining is the better way of open source I think :-)