- potentially all supported Camunda versions
- all distros
- all databases
Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):
- Job execution for an async-before process-level start event fails if a message was correlated in-between to a non-interrupting message start event in an event subprocess that runs into a transaction boundary in that subprocess in the same process instance
- Stacktrace for the job:
- Create a process with a start event with async-before and exclusive.
- Add an event subprocess with a non-interrupting message start event and a follow-up activity that creates a transaction boundary (e.g., an external task) in that subprocess.
- Disable the job executor
- Start an instance of the process
- Correlate the message to the event subprocess of the new instance
- Run the job for the process instance
The job fails with the described stacktrace
The job executes successfully and performs all follow-up activities as expected
- A process instance is created, one execution is waiting on the start event, the execution reaches a transaction boundary due to async-before on the start event
- Due to the correlation of a message to a non-interrupting message start event in an event subprocess, the process instance creates a concurrent execution for the event subprocess
- The execution waiting on the process instance start event will be moved into another concurrent execution, referencing the process instance execution as a parent
- The event subprocess reaches a transaction boundary as well due to an external task
- The job executor executes the process instance start event inside the second concurrent execution
- The PvmAtomicOperationProcessStart operation wants to complete and continue. Due to PvmAtomicOperationProcessStart, it needs to fetch the process instance start context.
- For that, it needs to run inside the execution of the process instance. This is checked in the ExecutionEntity.
- Since the start event is now however run inside the second concurrent execution and not the process instance execution anymore, no process instance start context is returned and the job execution fails in PvmAtomicOperationProcessStart.