3 Replies Latest reply on Aug 3, 2006 5:01 PM by David Hosier

    async actions never starting

    Corey Heath Newbie

      Few months ago we upgraded to jbpm 3.1 to make use of asynchronous continuations. At the time, everything worked great. Then, at some point during our system test cycle, any node/action marked async never executed. Based on this thread:

      http://www.jboss.com/index.html?module=bb&op=viewtopic&t=77656

      I thought the culprit was we stopped deploying the jbpm webapp, because we were not really using it, and thought it was causing some other issues in our applications. I have since tried to redeploy the webapp, but the async actions are still not starting. We haven't changed versions of jbpm nor hibernate since the upgrade to 3.1, and I have racked my brain trying to track down what other configuration change happened, besides not deploying the web app. Any ideas?

      Again, we are using JDK 1.5, jbpm 3.1. JBoss 4.0.2, and hibernate 3.1.3.

      Here is the most recent version of the proc def I am using:

      <process-definition name="Entity Review">
       <start-state name="Start Entity Review">
       <transition name="tr1" to="Contract Review">
       <action name="action1" class="package.entityReview.MarkCounterpartyInReview" config-type="bean" async="true"></action>
       </transition>
       </start-state>
       <task-node name="Contract Review">
      ....
      


      Also tried putting the action in another node after start, executed on the node-enter event. That actually prevents the process from getting to the Contract REview task. The above def will get to the Contract Review task, but the action never executes.

        • 1. Re: async actions never starting
          Olivier Debels Newbie

          The command executor thread is taking care of asynchronous command execution.

          In the starter kit this one (and the scheduler thread) are created by the JbpmThreadsServlet in the web-app.

          This means in order to have asynchronous command execution (or scheduler) you need to deploy the web-app.

          Another option is to put the code which starts those two threads somewhere else (in case you really don't use the web-app).

          Are you sure the command execution thread is running?

          • 2. Re: async actions never starting
            Corey Heath Newbie

            I had redeployed the webapp, but that did not seem to make a difference. Turns out there was an error occuring on startup of the webapp; trying to insert a value too large for the DB. Since we don't really want the webapp, I just added the CommandExecutorThread.start() to our own app's initialization code, and all seems to be working well again.

            • 3. Re: async actions never starting
              David Hosier Novice

              Yeah, I started seeing this same problem. Once you get the SQL error, async stops working completely. I believe somewhere in the chain of errors you will see a message saying that the command executor thread has stopped. I didn't really connect the dots on that until after reading this though. The problem I believe I was having is that if an error occurs in a delegation class, jbpm wants to stick the stack trace into the jbpm_message table. Well, most stack traces are pretty large, and it was causing the SQL error for me every time. Furthermore, the jbpm_message table entry would never get removed. So when I would restart the server, the process would run again and cause the same SQL error. I kind of fixed the problem by commenting out the part in the jbpm code where it sets the error stack trace into the jbpm_message entry. That prevented it at least from breaking async for good when an error occurs.