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
ConstructorsConstructorDescriptionBpmBusinessCalendarAdapter(String businessCalendarCode, BusinessCalendarRepository businessCalendarRepository)  - 
Method Summary
Modifier and TypeMethodDescriptionprotected booleanChecks ifdueDateDescriptionis period by ISO 8601 standard, like "PT10M"protected booleanisRepeatingInterval(String dueDateDescription) Checks ifdueDateDescriptionis recurring time duration by ISO 8601 standard, like R3/PT10H.resolveDuedate(String dueDateDescription) resolveDuedate(String dueDateDescription, int maxIterations) Using providedbusinessCalendarcalculates 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:
 resolveDuedatein interfaceorg.flowable.common.engine.impl.calendar.BusinessCalendar
 - 
resolveDuedate
Using providedbusinessCalendarcalculates proper triggering time for timer or dueDate for userTask.- Specified by:
 resolveDuedatein 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:
 validateDuedatein interfaceorg.flowable.common.engine.impl.calendar.BusinessCalendar
 - 
resolveEndDate
- Specified by:
 resolveEndDatein interfaceorg.flowable.common.engine.impl.calendar.BusinessCalendar
 - 
isPeriod
Checks ifdueDateDescriptionis period by ISO 8601 standard, like "PT10M" - 
isRepeatingInterval
Checks ifdueDateDescriptionis recurring time duration by ISO 8601 standard, like R3/PT10H. 
 -