-
Bug
-
Resolution: Done
-
Major
-
jBPM 3.2.6.SP1
-
None
-
Medium
When having multiple timers in a node, the 2nd timer and all after 'lose' the relationship between the timer->graphElement, thus,
timers are being persisted without the relationship with the graphElement, that causes serious problems in job execution time,
Here's a deep detail explaination (considering there are two timers in one task node)
When entering a node, the 'EVENTTYPE_NODE_ENTER' event gets fired, which causes two 'create timer actions' to be created via CreateTimerAction, one per timer,
In GraphElement->fireEvent() there's the following piece of code:
...
fireAndPropagateEvent(eventType, executionContext);
} finally
...
This part seems to clean up the eventSource, but that causes the 2nd timer and above to 'lose' the association to the graphElement(Node ID) the timer was created from,
I assume its not taken into consideration that the create timer fires another 'inner' event that causes the eventSource to be reset:
CreateTimerAction->createTimer(..) {
graphElement.fireEvent(Event.EVENTTYPE_TIMER_CREATE, executionContext);
}
For now, we commented out the GraphElement->fireEvent->'executionContext.setEventSource(null);' line, but I don't really understand the impact of that,
If that line is important, I think it's better to perform the cleanup only in case the fire event is not invoked in an 'inner' fire event call, or find another approach,
Thanks.