Details
-
Bug
-
Resolution: Done
-
Major
-
jBPM 5.2
-
None
Description
The following code in the DefaultTimerJobInstance means that a timer that repeats will only repeat if the previously called process completes successfully.
this.job.execute( this.ctx ); calls the following or attached process – but any exception thrown from that process will not be caught. Any exception thrown will mean that if this.trigger.hasNextFireTime() returned a Date, the process will never be rescheduled for that Date.
public Void call() throws Exception { this.trigger.nextFireTime(); // need to pop if ( handle.isCancel() ) { return null; } this.job.execute( this.ctx ); if ( handle.isCancel() ) { return null; } // our triggers allow for flexible rescheduling Date date = this.trigger.hasNextFireTime(); if ( date != null ) { scheduler.internalSchedule( this ); } return null; }