Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-3454

Repeating intermediate timer events will only fire if the attached process completes successfully.

    XMLWordPrintable

Details

    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;
      }
      

      Attachments

        Activity

          People

            swiderski.maciej Maciej Swiderski (Inactive)
            marco.rietveld Marco Rietveld (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: