-
Bug Report
-
Resolution: Fixed
-
L3 - Default
-
7.5.2, 7.6.0-alpha1, 7.6.0-alpha2
Scenario:
- process as in the diagram attached
- When sending the message, then the terminate end event cancels the send task instance (i.e. execution ends). Nevertheless, execution continues after the send task and fails with a NullPointerException at the end event.
Core problem:
- Termination ends the execution of the send task and we already have logic that stops executing ended executions (https://github.com/camunda/camunda-bpm-platform/blob/7.5.0/engine/src/main/java/org/camunda/bpm/engine/impl/interceptor/AtomicOperationInvocation.java#L64-L68). However, PvmExecutionImpl#leaveActivityViaTransitions resets the isEnded flag, so the check does not work in this case (https://github.com/camunda/camunda-bpm-platform/blob/7.5.0/engine/src/main/java/org/camunda/bpm/engine/impl/pvm/runtime/PvmExecutionImpl.java#L971).
Side note:
- if this is in an embedded sub process, then the exception is not a NullPointerException but with a ProcessEngineException when trying to create an activity execution mappings (due to the IS_SCOPE_ flag being reset for the sub process scope execution)
Test case: