5 Replies Latest reply on May 2, 2014 1:23 AM by Maciej Swiderski

    Is there any limit on number of times a gateway(And Diverging) can be triggered

    Arif Mohammed Novice

      Hi,

       

         I have a loop in my process using diverging and converging gateways(image of the process attached). The problem is with the "And Diverging gateway" named "Diverge" in image. It is not triggered second time.

       

         First iteration in the loop goes well without any problem, when it comes to second iteration i.e, after converge gateway a new human task node(Build-Send) is created and once that task is completed the process is not moving forward. Any idea what could be the issue ?

        • 1. Re: Is there any limit on number of times a gateway(And Diverging) can be triggered
          Arif Mohammed Novice

          Hi Maciej. Can you please guide me here ? what am I doing wrong, whether this kind of process definition is possible ?

          • 2. Re: Is there any limit on number of times a gateway(And Diverging) can be triggered
            Mauricio Salatino Master

            Hi Arif,

            can you please check the the conditions of the gateway are met all the cycles?

            That's probably the problem in you situation.

            • 3. Re: Re: Is there any limit on number of times a gateway(And Diverging) can be triggered
              Arif Mohammed Novice

              Hi Mauricio,

               

                      There are no conditions on outgoing sequences of Diverge gateway.  I have nailed down the actual cause of the issue and again it seems to be the issue with boundary signal event, Is boundary signal events working fine in all scenarios in jBPM ?

               

                     Here goes the explanation of the issue... to make it simple I have modified the BPMN definition slightly. PFA of BPMN file and process image.

               

                 Case1 : Normal behaviour and works as expected.

                    1) Start a new process

                    2) Task1 is created

                    3) Start and Complete Task1

                    4) engine creates 2 multi instance subprocesses and executes them. As a result of which Task2 is created

                    5) Start and Complete Task2

                    6) process goes to converge gateway-> join2 -> join1 -> Task1

                    7) Now again start and complete Task1

                    8) engine again creates 2 multi instance subprocesses and executes them. As a result of which Task2 is created

                

                    The above steps works and loop continues as long as condition is satisfied in Join2 to complete the whole process

               

                Case2: Does not behave as expected, because of Restart signal event triggered to cancel Task2

                    1) Start a new process

                    2) Task1 is created

                    3) Start and Complete Task1

                    4) engine creates 2 multi instance subprocesses and executes them. As a result of which Task2 is created

                    5) Now send Restart signal. Task2 instances will be cancelled(Exited) and also the multi instance sub process "Approvers" is cancelled

                    6) process goes to converge gateway-> join2 -> join1 -> Task1

                    7) Now again start and complete Task1

               

                  Result: Task1 will be completed but the process will not move forward, if you see the DB there exists record in sessioninfo table and processinstanceinfo table for this process.

                  Note: I have changed "Terminate End Event" in "Approvers" subprocess to "Cancel End Event" and "Normal End Event" but still its the same behaviour.

               

                It would be great help if you can guide me in case I am doing something wrong, if this is a bug can you give me hint of any other alternative approach until its fixed ?

              • 4. Re: Re: Re: Is there any limit on number of times a gateway(And Diverging) can be triggered
                Arif Mohammed Novice

                Hi Mauricio/Maciej,


                      Do you had a chance to look into this ? It seems to be clearly there is an issue with boundary events with in multi instance sub process. To validate this I have modified the above BPMN. PFA of both BPMN and process diagram.


                Case3 : This will work without any issue (added boundary event to a human task "Task3" to redirect to Diverge gateway ).

                      1) Start a new process

                      2) Task1 is created

                      3) Start and Complete Task1

                      4) engine creates 2 multi instance subprocesses and executes them. As a result of which Task2 is created

                      5) Start and Complete Task2

                      6) process goes to converge gateway-> join2 -> join1 -> Task1

                      7) Now again start and complete Task1

                      8) engine again creates 2 multi instance subprocesses and executes them. As a result of which Task2 is created (repeat this process until it comes out of the loop and creates Task3 )

                      9) Now once Task3 is created, send the signal "Restart". As a result of this signal engine will cancel Task3 -> Join1 -> Task1

                      10) Now Start and Complete Task1

                Result: Task1 will be completed and the process will move forward without any issue.


                  

                • 5. Re: Is there any limit on number of times a gateway(And Diverging) can be triggered
                  Maciej Swiderski Master

                  haven't you created jira issue for boundary events with multi instance task/subpprocess? I believe you did so most likely there is an issue with handling that in all cases and that example proves it if I got it right, so I would suggest to use the other approach until that jira gets fixed.

                   

                  HTH