Class BpmPeriodicTimerHelper

java.lang.Object
io.jmix.bpm.engine.calendar.BpmPeriodicTimerHelper

public class BpmPeriodicTimerHelper extends Object
Helper class for calculating triggering date for TimerEventDefinition in case of using repeating intervals and non-default Flowable business calendar.
  • Constructor Details

    • BpmPeriodicTimerHelper

      public BpmPeriodicTimerHelper(BusinessCalendar businessCalendar, String dueDateDescription, int maxIterations)
      Parses all required information for resolving next date from dueDateDescription.
      Parameters:
      businessCalendar - implementation of io.jmix.businesscalendar.model.BusinessCalendar.
      dueDateDescription - repeating interval, acceptable values are R3/PT10H, R3/PT10H/${EndDate}, R3/2015-02-25T16:42:11+00:00/PT10 etc.
      maxIterations - maximum number of iterations for given timer.
  • Method Details

    • isValidDate

      public boolean isValidDate(LocalDateTime newTimerDateTime)
      Checks if newTimerDateTime is valid for given timer definition.
    • getNextTimerDate

      public Date getNextTimerDate()
      Delegates calculation next timer date to provided business calendar.
    • parseDate

      protected LocalDateTime parseDate(String dateDescription)
    • parsePeriod

      protected Duration parsePeriod(String periodDescription)
    • isPeriod

      protected boolean isPeriod(String dueDateDescription)
      Checks if dueDateDescription is period by ISO 8601 standard, like "PT10M"