3 Replies Latest reply on Jan 10, 2012 6:21 AM by Mauricio Salatino

    Clustered jBPM

    M Arnold Newbie



      I'm evaluating jBPM 5.2.  I have a doubt after reading this section of the document: 5.8.7. Multi-threading , specifically:


      Therefore, we only allow one thread to be processing a specific process instance at each time.


      Does jBPM rely on this?  I would like to run jBPM inside multple instances of JBoss AS 5.1. If I have a process which uses a gateway to split into multiple parallel workflows, and these workflows each execute asynchronous tasks, what would happen these tasks completed in separate instances of jBPM at the same time?  Could this lead to the same process instance executing twice at the same time?  If so, is it possible to lock on the persistence store (which is shared) or a clustered EJB entity, instead of just at a JVM level?


      Thanks in advance for any info.

        • 1. Re: Clustered jBPM
          Mauricio Salatino Master


          that's how is working. The state is persisted in a centralized database that is using optimistic locking. So, two threads can access to the state, but if they want to change it one of them will fail.. and you will need to retry that, the other one will be applied, keeping the state consistent all the time.


          • 2. Re: Clustered jBPM
            M Arnold Newbie

            Thanks Mauricio.


            When the unlucky thread fails, will it retry automatically?


            I will have to test this scenario. (Not that I don't trust you ;-)  It is absolutely crucial to us that all actions the failing thread takes (JMS dequeue/queue, database, etc) are rolled back completely and then resumed and replayed with the updated state from the other thread.

            • 3. Re: Clustered jBPM
              Mauricio Salatino Master

              NO, it will not automatically retry but as you mention you can do that with JMS, where you can configure the number of retries.