Steps to reproduce
1. start a process instance of the attached process
2. correlate(firstMessage)
3. correlate(secondMessage)
Problem
The execution tree looks like
PI <--- e1 <--- receiveTask ^ | + --- innerTask | + --- task1
The execution tree should look like
PI <--- e1 <--- receiveTask ^ ^ | | | + --- innerTask | + --- task1
If the steps (2) and (3) will be executed in different order (first (3) and then (2)) then the execution tree looks like
PI <--- e1 <--- receiveTask ^ | + --- innerTask | + --- task1
But the execution tree should look like
PI <--- e1 <--- receiveTask ^ ^ | | | + --- innerTask | + --- task1
Hints
- see failing testcase: https://github.com/camunda/camunda-bpm-platform/commit/a0c3c65ff6a990e4a64ffa8f2998e4765f04596b
- Similar testcases with event sub process should be written too