8 Replies Latest reply on Dec 23, 2009 7:15 PM by Ronald van Kuijk

    jbpm 3.2.x: Reading Timers in wrong order

    Bernd Ruecker Master

      Hey guys.


      Okay, since it is the second customer in a row having problems with this one, I at least wanted to post it here. When parsing the processdefinition, timers are read before all events are read.


      This leads to "create-timer" actions being added to the node-enter events BEFORE your own actions. This doesn't make a lot of sense, normally you want your own actions being executed first and the timer created afterwards. From the runtime perspective, it doesn't make any difference (since the timer is started not before the transaciton commits), but with that behavior you could e.g. calculate due dates on the node-enter event (before the time is created).


      This is located in the JpdlXmlReader, method "readNode", these two lines:


          readNodeTimers(nodeElement, node);
          readEvents(nodeElement, node);


      But I think, there is no way of changing that in the existing jbpm 3.2.x code base, right? Can it break other projects code?

      The workaround is to use the create-timer and cancel-timer actions, not nice, but I guess can live with that...