2 Replies Latest reply on Jun 18, 2012 3:14 AM by Arunava Basu

    Parallel execution of jBOSS ESB project when it called by jBPM process instances

    Arunava Basu Newbie

      Dear All,

       

      Problem: The process of calling an ESB from jBPM process instances of a jBPM process is synchronous. If many requests call that particular jBPM process then the rest process requests will be in RUNNING state. That means they will be in queue until the older request has been executed.

      What I did:

      1. Make the ESB node asynchronous.

      Outcome: Execute as a Synchronous process as before.

      1. Call a webservice from an ESB action. It calls a function which doesn’t return anything (i.e. return type is void). The method calls an ESB.

      Outcome: Execute as a Synchronous process as before.

      1. Instead of ESB node, I used simple NODE. In that node I define an action handler which calls an ESB.

      Outcome: Execute as a Synchronous process as before.

       

      I want the ESB project should execute in parallel. I call an ESB project from a JBPM process. when I call that jBPM many times, the process instances is waiting in the queue till the older request has been executed. i want that all the process instances should execute in parallel. For that,the ESB project should be executed in parallel.

       

      Thanx in advance.

        • 1. Re: Parallel execution of jBOSS ESB project when it called by jBPM process instances
          Arunava Basu Newbie

          The code of calling the ESB

           

           

           

           

          System.setProperty(

          "javax.xml.registry.ConnectionFactoryClass"

          ,

           

          "org.apache.ws.scout.registry.ConnectionFactoryImpl"

          );

           

          Message message = MessageFactory.getInstance().getMessage();

          ServiceInvoker invoker =

          new ServiceInvoker("TestCategory","Test"

          );

          invoker.deliverSync(message, 100);

           

           

           

           

          If I use,

          invoker.deliverAsync(message);

          then also the outcome is same.

          • 2. Re: Parallel execution of jBOSS ESB project when it called by jBPM process instances
            Arunava Basu Newbie

            the jBPM code (when I used NODE instead of ESB node);

             

            <?xml version="1.0" encoding="UTF-8"?>

            <process-definition xmlns="urn:jbpm.org:jpdl-3.2"
            name="cloudX_AsyncTest_jBPM">
            <start-state name="start">
              <transition to="node1"></transition>
            </start-state>


            <node name="node1" async="true">
              <action class="com.cloudx.stdlayer.jbpm.common.AsyncTestActionHandler" async="true"></action>
              <transition to="end"></transition>
            </node>


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

             

            this code does not call the ESB also. And the process instances were in RUNNING state. When I gave signal to a particular process instance, it executed but nothing happened in ESB. No sysout came.