Hi guys,
I’ve got the following diagram:
In the following diagram the sequence we follow is:
-
We firt complete the bottom branch of the process: userTask1, userTask5, userTask6. We also set “condition1” for our exclusive gateway to follow the path to userTask3.
-
Then we send the boundary event evnBoundaryUserTask3, and the process reaches receiveTask4.
-
Then we set condition2 on the second exclusive gateway so that the subprocess follows the path to end, and we send MSGTASK4, to leave receiveTask4.
From this point what we expect is to reach userTask7.
The problem is that when querying the current task from userTask7’s create task listener it returns null (I use the taskService), and if we query the history service it says it’s receiveTask4 (which is supposedly ended). On the other side, the DelegateTask inside our listener says it’s userTask7.
Why doesn’t the task query from taskService returns a result that is coherent with DelegateTask from inside the listener?
Also, why does the receiveTask4 still appears as unfinished if whe query the history service with the following query?
Blockquote
historyService.createHistoricActivityInstanceQuery().processInstanceId(processInstanceId).unfinished().list()
Can you help me, please?
Thanks in advance…
Alfonso.
PS: I also attach the bpmn diagram just in case it’s clearer for you.
testProcess.bpmn (5.8 KB)