Using exit criterions on stages in CMMN

Hi,

I have the following CMMN:

The stage is not marked as autocomplete and both tasks are enabled.

When I activate and complete ‘Human Task 1’ I expect the Stage to terminate as per Table 8.7 in the 1.1 CMMN spec:

“Terminated” :

“Terminal state. This state indicates a termination by a Case worker (human), or termination by reaching
the exit criteria sentry. A Stage instance MUST propagate this state to all its contained
EventListener , Milestone , Stage , and Task instances.”

However, when doing this using Camunda the stage is not completed.

The supported CMMN page for Camunda states that Exit Criterions are supported on stages.

The behaviour I am seeing suggests that it isn’t.

Should the CMMN I have work?

If not, are there any suggestions on how I achieve the same behaviour?

Thanks in advance,

Kerrie

1 Like

Hi Kerrie,

Yes, it is correct that the case engine supports exit criterions on stages.

But your scenario is not supported by the case engine, since the plan item on part connection (between the exit criterion and Human Task 1) is crossing the stage boundary (even if it does not look like this). The plan item Human Task 1 is contained by the stage, but the referenced sentry by the exit criterion is contained by the case plan model, hence the plan item on part connection is crossing the stage boundary. Therefore a feature request 1 already exists.

You could solve that by setting autoComplete to true, but this would not cover the case where Human Task 2 is active. Then the Human Task 2 stays active and the surrounding stage will not complete. So it depends on your use case.

Does it help you?

Cheers,
Roman

Thanks Roman, that helps.

Kerrie