cancel
Showing results for 
Search instead for 
Did you mean: 

Problem in execution order with activiti 5.12

acanalini
Champ in-the-making
Champ in-the-making
In the attached txt file (really a zip file) there a simple project to show the problem
It seems that starting from version 5.12 if you have a process with a serviceTask followed by an eventBasedGateway with an executionListener inside, the listener inside the gateway is executed before the ServiceTask.
This problem is not present in version 5.10 and 5.11 of the activiti engine.
Can someone check if this is a bug or is a new behavior of version 5.12

Thanks in advance
Andrea Canalini
2 REPLIES 2

frederikherema1
Star Contributor
Star Contributor
I've checked the project you attached and the listeners are indeed called before the service-task in 5.12. When changing back to 5.11, the order is the other way around. I've created an issue for this: https://jira.codehaus.org/browse/ACT-1657.

In the future when attaching unit-tests, can you make sure you don't depend on internal artifacts (eg. the bpmn-validator maven plugin) and have the minimal amount of code and dependencies to reproduce the problem.  Also, maybe it's better to create a unit-test that actually fails Smiley Wink

I don't really see on first sight what is wrong, I'll investigate. Thanks for reporting.

frederikherema1
Star Contributor
Star Contributor
Fixed, see https://jira.codehaus.org/browse/ACT-1657

The child-elements of the eventBasedGateway XML-tag were not read by the XML-converter. When this coverer was finished, the main-conversion carried on and found the "extensionElements" tag and uses it on the Process instead of the EventGateway object. This explains why the execution-listener is called before the service-task (called on process-start). The parsing was different in 5.11, and this slipped through our QA.
See https://github.com/Activiti/Activiti/commit/db63b665f13b84c1844c95c06f2216caeee9a691
Workaround is to add the execution-listeners to the sequence-flow in front of the gateway.