-
1. Re: Overdue actions, timers.
littlejc Mar 19, 2009 2:53 AM (in response to jjrs)i aslo have this problem, do you have the solution?
my timer is aslo can't interrupt the action handler execution if it running for a long time. -
2. Re: Overdue actions, timers.
avelazquez Mar 20, 2009 6:35 PM (in response to jjrs)If I got it well, this could be solved by defining tracking actions for node-enter and node-leave events.
In the node-enter you can capture the start time and use it in the node-leave event, to determine if the node actions were executed on time.
greets! -
3. Re: Overdue actions, timers.
kukeltje Mar 21, 2009 8:00 AM (in response to jjrs)interupting long runnning things is not different in jBPM then in any other java application.
Make actionhandlers that can receive events (non-jbpm events) and act upon them. Have your timer send one of these events then..
But it might be a nice addition to jBPM I think to be able to cancel long running async things when they are already running (timers can be cancelled when not started yet) -
4. Re: Overdue actions, timers.
jjrs Mar 25, 2009 12:04 PM (in response to jjrs)Hi,
There was a change in the requirements so instead of having to interrupt the execution I had to generate an alert (send an email notifying an operator of the delay in the execution).
I associated a timer to the execution of the actions, and injected the implementation of the alert/notification. I used java.util.Timer and the Timer.schedule method.
Right now I am sending an email notifying the delay in the execution, but I guess that if the requirements change once again I could create a new implementation and inject it instead of the email alert.
Ronald, I think my solution is similar to what you were suggesting with the exception that my timer is associated to the task but in your case it seems to me it would be independent. Is that correct ?
If so... how would you link the timer with the execution of the action ?
Regards.
Jose.