Unexpected event received when CallActivity cancelled

I am seeing an unexpected event in the following scenario. A process invokes an external subprocess. The external subprocess contains a multi-instance user task. The subprocess is still active when the parent process flows to the terminate end event.

I am seeing a PROCESS_CANCELLED event for the external subprocess and a PROCESS_COMPLETED_WITH_TERMINATE_END event for the parent process. Both of these are expected.

The problem is that before I see any of the ACTIVITY_CANCELLED events (for subprocess and multi-instance users tasks), I am seeing a PROCESS_COMPLETED_WITH_TERMINATE_END event for the subprocess. This seems incorrect.

Let me know what you think. I can create a pull request that reproduces the scenario if needed.

I created a pull request to reproduce the issue. The pull request includes a test for an embedded subprocess and an external subprocess. The external subprocess test fails due to the extra (unexpected) event.

Indeed, a ‘complete’ event should only be thrown if the process instance ended by reaching an end state. Bug fixed (see PR link above).