Cmmn: understanding sentry and repitition

We have humanTask that has to be manually started. It has an enteyCriterion ifPart that has to be fulfilled before this should be possible.

I wrote a test that ensures the behavior. So far so good.

Now an additional requirement is that the task should be repeatable. When I model this, my tests fail because I no longer get a single caseExecution for the given task-key, but two.

I seem to lack knowledge about sentry, repetition and manual activation. What happens here? Can I manually activate many humantasks in parallel? How do I know which one ( the manual activation requires one I’d, but I get two). What happens when I have activated one task, and then switch the if condition, so the entryCriterion does not match?
My assumption was, that I was going to have one human task at every point in time and that a follow up becomes enabled the moment I complete the first.

Could someone enlighten me? Thanks!

Hi @jangalinski,

take a look at the CMMN specification CMMN 1.1. Section 5.4.11.3
It is due to the repetion rule evaluation.
If there is no sentry it gets evaluated when a Task/Stage completes. So you do only get one instance.
If there is a sentry it gets evaluated every time the sentry condition is true. In camunda a sentry with an if-part gets evaluated every time something changes (like the conditional event in BPMN). This creates multiple instances, because every time the repetition rule is also true. So I guess you could change the repition rule or check in your if-part if there is already an instance in a specific state.

regards,
Dominik

Thank you Dominik. We already debugged/analysed the behavior and can confirm what you describe.
We went with option “b” - check for no other activities in state enabled/active before evaluating again.