1 Reply Latest reply on Jun 1, 2007 11:37 AM by estaub

    Persistence after crash

      Hi,

      We have a simple jBPM process deployed on weblogic. The first step sleeps during 20 seconds and goes further with an asynchronous task.

      If we create an instance, the instance is not persisted to the database as long as the instance is in the first (sleep) step.

      As soon as we hit the asynchronous step, the instance is persisted.

      Shouldn't the instance be persisted as soon it is created?


      B.

        • 1. Re: Persistence after crash

          "Shouldn't" is in the eye of the beholder, especially whenever transactions are concerned.

          JBPM won't commit until it is blocked in the process, i.e, everything's waiting for something asynchronous to happen. So it's working as expected.

          I figure there must be some common idioms used for "commit the current transaction and start another one HERE", but I haven't seen anything useful yet on the forum or elsewhere.

          As a general transaction-breaker tool, you could make an asynchronous node actionhandler that kicks off another thread to signal it back immediately. That would do the trick. Synchronization might be a little tricky.

          If your specific case (wait 20 seconds) is a real need, you could use a Timer node or a parameterized actionhandler as I described above. If I remember right, Timer nodes aren't good at doing pure real-time like this.

          Please write back if you discover anything else that's useful.

          -Ed Staub