Class BpmBusinessCalendarAdapter

java.lang.Object
io.jmix.bpm.engine.calendar.BpmBusinessCalendarAdapter
All Implemented Interfaces:
org.flowable.common.engine.impl.calendar.BusinessCalendar

public class BpmBusinessCalendarAdapter extends Object implements org.flowable.common.engine.impl.calendar.BusinessCalendar
Adapter between Flowable BusinessCalendar and Jmix BusinessCalendar. Delegates calculating actual dueDate for UserTask or timer's triggering dateTime for TimerEventDefinition to certain BusinessCalendar.
  • Constructor Details

  • Method Details

    • resolveDuedate

      public Date resolveDuedate(String dueDateDescription)
      Specified by:
      resolveDuedate in interface org.flowable.common.engine.impl.calendar.BusinessCalendar
    • resolveDuedate

      public Date resolveDuedate(String dueDateDescription, int maxIterations)
      Using provided businessCalendar calculates proper triggering time for timer or dueDate for userTask.
      Specified by:
      resolveDuedate in interface org.flowable.common.engine.impl.calendar.BusinessCalendar
      Parameters:
      dueDateDescription - can represent ISO 8601 period, ISO 8601 repeating interval, fixed date or cron expression.
      maxIterations - maximum number of invocations for given timer.
      Returns:
      resolved dateTime regarding used businessCalendar.
    • validateDuedate

      public Boolean validateDuedate(String dueDateDescription, int maxIterations, @Nullable Date endDate, Date newTimer)
      Specified by:
      validateDuedate in interface org.flowable.common.engine.impl.calendar.BusinessCalendar
    • resolveEndDate

      public Date resolveEndDate(String endDateString)
      Specified by:
      resolveEndDate in interface org.flowable.common.engine.impl.calendar.BusinessCalendar
    • isPeriod

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

      protected boolean isRepeatingInterval(String dueDateDescription)
      Checks if dueDateDescription is recurring time duration by ISO 8601 standard, like R3/PT10H.