JBoss Community

Re: How to cancel Timer Event

created by Chris Melas in jBPM - View the full discussion

Hello,

One simple approach could be to use a parameter as a flag (i.e. boolean timeout ) within your process and then simply raise it or not when completing the logic of your process (i.e. right before exiting) or after the timer node. Then at a gateway check the flag's value and decide whether you should raise an exception or not.

 

In addition a quote from the documentation http://docs.jboss.org/jbpm/v5.1/userguide/ch05.html#sec.timers "The timer is cancelled if the timer node is cancelled (e.g., by completing or aborting the enclosing process instance)." . Actually you don't need to cancel a timer event if it is part of your process logic, instead use your logic inside your process to act accordingly (i.e. as instructed above).

Reply to this message by going to Community

Start a new discussion in jBPM at Community