Multiple timers in node cause EventSource reset
-----------------------------------------------
Key: JBPM-2263
URL:
https://jira.jboss.org/jira/browse/JBPM-2263
Project: JBoss jBPM
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: Runtime Engine
Affects Versions: jBPM 3.2.6.SP1
Reporter: Asaf Shakarchi
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 {
executionContext.setEventSource(null);
}
...
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.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira