5 Replies Latest reply on Jun 24, 2014 1:38 AM by Maciej Swiderski

    JBPM 6 clustering

    Shiju John Newbie

      Hi

      Will it be a good approach to create clustering (JBPM 6) by sharing the RunTimeManger  across the node using a distributed cache such as EHcache ,infispan

        • 1. Re: JBPM 6 clustering
          Maciej Swiderski Master

          In my opinion it does not make sense to share RuntimeManager instance across JVMs. Any reason why you want to do that?

          Best performance is achieved when each cluster member has its own "copy" of runtime manager so they operate in isolation.

           

          HTH

          • 2. Re: JBPM 6 clustering
            Shiju John Newbie

            Hi Mac,

             

            Thanks for the reply. I need to deploy the JBPM 6 in a clustered environment (Node 1 & Node 2). I have a few doubts .Could you please help me to solve this?

             

            I have Process with following definition  (Using the PerProcessInstance Context)

             

            scenario 1 :  start -> Human Task 1 -> Automatic task 1 -> stop

             

            Started the process in node 1,   After that the node 1 is getting down . Then the complete task request go to node 2. How  will it  resolve the Run-time manger & Knowledge session for continuing  the process execution ?

             

            scenario 2 :  start -> Automatic task 1 -> Automatic task 2 -> stop

             

            Started the process definition in node 1 after completing the Automatic task 1 the node is getting down . How we continue this  execution from node 2.

             

            Could you please help on these two ?

            1 of 1 people found this helpful
            • 3. Re: JBPM 6 clustering
              Maciej Swiderski Master

              Shiju John wrote:

               

              Hi Mac,

               

              Thanks for the reply. I need to deploy the JBPM 6 in a clustered environment (Node 1 & Node 2). I have a few doubts .Could you please help me to solve this?

               

              I have Process with following definition  (Using the PerProcessInstance Context)

               

              scenario 1 :  start -> Human Task 1 -> Automatic task 1 -> stop

               

              Started the process in node 1,   After that the node 1 is getting down . Then the complete task request go to node 2. How  will it  resolve the Run-time manger & Knowledge session for continuing  the process execution ?

               

              as long as both nodes in the cluster have same kjars (deployment units) deployed then runtime manager already exists there. Whenever task is completed listener is responsible for finding out correct runtime manager and moving on with the process instance. So important to keep all cluster nodes in sync in terms of what is deployed there. kie-wb (jbpm console) by default does that by syncing git repositories. Alternatively you can simply deploy same kjars to all cluster members.

               

              Shiju John wrote:

               

               

              scenario 2 :  start -> Automatic task 1 -> Automatic task 2 -> stop

               

              Started the process definition in node 1 after completing the Automatic task 1 the node is getting down . How we continue this  execution from node 2.

              if it's automatic processing without wait state then when server goes down when processing did not finish then transaction is rolled back and the process instance is not persisted though as it was never started. In such cases best is to use async processing using jbpm executor that ensures that job will be picked up next time executor checks for available jobs.

               

              HTH

              1 of 1 people found this helpful
              • 4. Re: JBPM 6 clustering
                Shiju John Newbie

                Hi mac.

                 

                Thanks very much  Mac.

                 

                In the first scenario what I understood is  if the   process definition are available in the Knowledge base then the listeners are internally identify the KSession and continue the execution flow.  (In some scenario  ( PerProcessInstance context , Run-time engine is not available )   found  that the new Knowledge session is generated).

                 

                 

                Shiju John wrote:

                 

                 

                scenario 2 :  start -> Automatic task 1 -> Automatic task 2 -> stop

                 

                Started the process definition in node 1 after completing the Automatic task 1 the node is getting down . How we continue this  execution from node 2.

                if it's automatic processing without wait state then when server goes down when processing did not finish then transaction is rolled back and the process instance is not persisted though as it was never started. In such cases best is to use async processing using jbpm executor that ensures that job will be picked up next time executor checks for available jobs.

                 

                Could you please share some examples of  JBPM executor implementation .

                • 5. Re: JBPM 6 clustering
                  Maciej Swiderski Master

                  examples are included in jbpm-playground repository for the demo installation under async-examples. Some details about jbpm executor can be found in docs and in this article.

                   

                  HTH