Class AdvancedCycleBusinessCalendar
- java.lang.Object
-
- org.flowable.common.engine.impl.calendar.BusinessCalendarImpl
-
- org.flowable.common.engine.impl.calendar.CycleBusinessCalendar
-
- org.flowable.common.engine.impl.calendar.AdvancedCycleBusinessCalendar
-
- All Implemented Interfaces:
BusinessCalendar
public class AdvancedCycleBusinessCalendar extends CycleBusinessCalendar
An BusinessCalendar implementation for cycle based schedules that takes into account a different daylight savings time zone than the one that the server is configured for.For CRON strings DSTZONE is used as the time zone that the CRON schedule refers to. Leave it out to use the server time zone.
For ISO strings the time zone offset for the date/time specified is part of the string itself. DSTZONE is used to determine what the offset should be NOW, which may be different than when the workflow was scheduled if it is scheduled to run across a DST event.
For example: R/2013-10-01T20:30:00/P1D DSTZONE:US/Eastern R/2013-10-01T20:30:00/P1D DSTZONE:UTC R/2013-10-01T20:30:00/P1D DSTZONE:US/Arizona 0 30 20 ? * MON,TUE,WED,THU,FRI * DSTZONE:US/Eastern 0 30 20 ? * MON,TUE,WED,THU,FRI * DSTZONE:UTC 0 30 20 ? * MON,TUE,WED,THU,FRI * DSTZONE:US/ArizonaRemoving the DSTZONE key will cause to use the server's time zone. This is the original behavior.Schedule strings are versioned. Version 1 strings will use the original CycleBusinessCalendar implementation. All new properties are ignored. Version 2 strings will use the new daylight saving time logic.
For example: R/2013-10-01T20:30:00/P1D VER:2 DSTZONE:US/Eastern 0 30 20 ? * MON,TUE,WED,THU,FRI * VER:1 DSTZONE:US/ArizonaBy default (if no VER key is included in the string), it assumes version 2. This can be changed by modifying the defaultScheduleVersion property.- Author:
- mseiden
-
-
Field Summary
-
Fields inherited from class org.flowable.common.engine.impl.calendar.CycleBusinessCalendar
NAME
-
Fields inherited from class org.flowable.common.engine.impl.calendar.BusinessCalendarImpl
clockReader
-
-
Constructor Summary
Constructors Constructor Description AdvancedCycleBusinessCalendar(ClockReader clockReader)AdvancedCycleBusinessCalendar(ClockReader clockReader, Integer defaultScheduleVersion)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntegergetDefaultScheduleVersion()DateresolveDuedate(String duedateDescription, int maxIterations)voidsetDefaultScheduleVersion(Integer defaultScheduleVersion)-
Methods inherited from class org.flowable.common.engine.impl.calendar.CycleBusinessCalendar
validateDuedate
-
Methods inherited from class org.flowable.common.engine.impl.calendar.BusinessCalendarImpl
resolveDuedate, resolveEndDate
-
-
-
-
Constructor Detail
-
AdvancedCycleBusinessCalendar
public AdvancedCycleBusinessCalendar(ClockReader clockReader)
-
AdvancedCycleBusinessCalendar
public AdvancedCycleBusinessCalendar(ClockReader clockReader, Integer defaultScheduleVersion)
-
-
Method Detail
-
getDefaultScheduleVersion
public Integer getDefaultScheduleVersion()
-
setDefaultScheduleVersion
public void setDefaultScheduleVersion(Integer defaultScheduleVersion)
-
resolveDuedate
public Date resolveDuedate(String duedateDescription, int maxIterations)
- Specified by:
resolveDuedatein interfaceBusinessCalendar- Overrides:
resolveDuedatein classCycleBusinessCalendar
-
-