Execution gets stuck after nested Sub-Process with no outgoing Sequence Flows

Description

If an Embedded Sub-Process that is nested inside another Embedded Sub-Process does not have outgoing Sequence Flows, the Execution is not propagated to the parent Sub-Process, i.e., the outgoing Sequence Flows of the parent Sub-Process are not taken and the Process Instance is stuck.

In general, it might be bad style to have no End Event inside a Sub-Process, but it is perfectly valid in BPMN 2.0 to model and execute processes like that.
Furthermore, this style of modeling is even required for certain features like Event Sub-Processes (), for which the specification explicitly states:

An Event Sub-Process is not part of the normal flow of its parent Process_there are no incoming or outgoing Sequence Flows.

My feeling is that this problem occurs, because the SubProcessActivityBehavior does not call AbstractBpmnActivityBehavior#leave(). I tried calling it and it correctly propagates the execution to the parent Sub-Process. However, it seems to bring the process instance in an inconsistent state as it causes NullPointerExceptions in AtomicOperations later in the process.

Assignee

Daniel Meyer (camunda)

Reporter

Falko Menge (camunda)

Labels

None

Components

Fix versions

Priority

Critical
Configure