Package io.jmix.bpm.engine.calendar
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 Summary
ConstructorDescriptionBpmBusinessCalendarAdapter
(String businessCalendarCode, BusinessCalendarRepository businessCalendarRepository) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
Checks ifdueDateDescription
is period by ISO 8601 standard, like "PT10M"protected boolean
isRepeatingInterval
(String dueDateDescription) Checks ifdueDateDescription
is recurring time duration by ISO 8601 standard, like R3/PT10H.resolveDuedate
(String dueDateDescription) resolveDuedate
(String dueDateDescription, int maxIterations) Using providedbusinessCalendar
calculates proper triggering time for timer or dueDate for userTask.resolveEndDate
(String endDateString) validateDuedate
(String dueDateDescription, int maxIterations, Date endDate, Date newTimer)
-
Constructor Details
-
BpmBusinessCalendarAdapter
public BpmBusinessCalendarAdapter(String businessCalendarCode, BusinessCalendarRepository businessCalendarRepository)
-
-
Method Details
-
resolveDuedate
- Specified by:
resolveDuedate
in interfaceorg.flowable.common.engine.impl.calendar.BusinessCalendar
-
resolveDuedate
Using providedbusinessCalendar
calculates proper triggering time for timer or dueDate for userTask.- Specified by:
resolveDuedate
in interfaceorg.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 interfaceorg.flowable.common.engine.impl.calendar.BusinessCalendar
-
resolveEndDate
- Specified by:
resolveEndDate
in interfaceorg.flowable.common.engine.impl.calendar.BusinessCalendar
-
isPeriod
Checks ifdueDateDescription
is period by ISO 8601 standard, like "PT10M" -
isRepeatingInterval
Checks ifdueDateDescription
is recurring time duration by ISO 8601 standard, like R3/PT10H.
-