Trigger Repetition Rule from one stage from another stage

Hi I have a case as below. I want to the following behavior.

  1. Stage1 is set to Repetition Rule with a variable that controls it. Initially the variable is false. When the case starts I want Stage 1 to execute. when Stage 1 is completed I want the case to move to Stage 2
  2. Stage 2 checks some conditions and sets the variable that controls Stage1 repetition to true. When Stage2 completes, I want Stage 1 to activated again.

The problem I am running into is the condition that decides whether Stage1 is to be repeated is not determined when Stage 1 completes or on any other standard event. It happens when Stage 2 sets some variable. I thought this could be achieved by setting a Sentry on Stage 1, but that doesn’t really do anything. How can I get Stage1’s repetition to be revaluated on Stage2 completion? I am pretty sure I cannot set a sentry on the Stage2 completed event back to Stage 1 as that creates a circular connection and prevents Stage 1 from starting in the first place when the case is created. Which is why I tried using a Sentry, but the Sentry is not triggered a second time when Stage 2 is completed.

I simply cannot figure out how to model what I want.

Hi @rohail,

modeling loops in cases is really tricky. I would suggest to build the stages as single Cases and connect them with a BPMN process that builds the loop. The process contains two call activities to call the cases.

https://cawemo.com/shares/eb8afe2e-574b-4f66-9a2f-a3a4ffd57069

Hope this helps,

Ingo

Actually I am not necessarily trying to model loops. I am just trying to repeat. Stage that was previously completed again. I thought that was the purpose of the repetition rule. I could have additional stages and may want to repeat one or more of previously completed stages.

It would be too difficult for me to model the stages as separate cases. Also I want to represent these as stages in the same case in my ui and I would not be able to do that if they were separate cases.

Are you saying there is no way to repeat another stage based on variables set in a second stage