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