Too many asynchronous continuations deleted when end event reached


In a process definition with with several parallel paths each leading into an own end event, and asynchronous tasks in all of the parallel paths, I noticed that once one of the paths reaches the end event, the asynchronous activities from other paths never get executed. Example:

In this process, only one of the Asynchronous Script Tasks gets executed. According to BPMN standard, this process definition should work identically to one where the two parallel paths get joined in a parallel gateway before a single end event, which means that both asynchronous activities should be executed. The reason seems to be that when one of the end event is reached, all asynchronous continuations from the job table for this process instance get deleted, even though the process still has other active paths.

The attached process and unit test demonstrate this behaviour by manually executing one of the asynchronous tasks and then checking the entries in the job table for the process instance, once the end event is reached. In theory, there should be one entry left in the job table after one of the tasks is executed, but the current version of Activiti returns 0 entries at this point.

The unit test was executed against Activiti 5.19, 5.20 and 5.21, all of the versions show this behaviour. Further tests showed that only asynchronous continuations get deleted from the table, signals, messages and timers are still present in this scenario.




Joram Barrez


Jakob Tonn




Affects versions