Process instances continue before CMMN call activities are closed?

@roman.smirnov, thanks for your pointer and the tip how to implement this. That’s a comprehensible decision.

To some degree, I still think this may be a bad decision for a callActivity as well as a caseTask though and could be caused by the overloaded meaning of the word “completed” in the CMMN spec (I’m no expert on this so please bare with me):

For the “Closed” state its noted

This state is only available for the outermost Stage instance implementing the Case’s casePlanModel.

This makes sense as it’s my understanding that nested stages will be considered closed and immutable after the outermost stage has been closed.

In the source you provided I found:

When a CaseTask is “blocking” (isBlocking is “true”), the CaseTask is waiting until the Case associated with the CaseTask is completed.

This is where I think the meaning of “completed” becomes blurry, as the spec only describes “Completed” and “Closed” in the light of the contextual lifecycle state of a case instance.

Further it is written:

The difference between using a CaseTask and a Stage is that a CaseTask calls a Case that has its own context, i.e., it is based on its own CaseFile, whereas a Stage represents behavior that shares the same context with the Stage, i.e., it is based on the same CaseFile and is “embedded” in the same Case.

This could mean, that the contextual information of a case being in the “Completed” state shouldn’t be available to the calling task, or at least shouldn’t render the called case “complete” from an outside perspective. Only after the case has become “Closed” and therefore read-only the blocking caseTask (or callActivity) should be completed as well.

Also, I noticed how the spec uses uppercase letters to designate the state “Completed” while using “completed” to describe the perception that the case has actually been completed. (Sorry, nitpicking.)

Well, yadda yadda, I really think this is an oversight that should be considered for the execution logic of callActivities as well as caseTasks. I hope I was able to describe what I actually mean. :worried: