cancel
Showing results for 
Search instead for 
Did you mean: 

Timer Boundary Event - Handling of Non-Working Hour/Day

bkseow
Champ in-the-making
Champ in-the-making
When a Timer Boundary Event is attached to an User Task, how to take into account of non-working hours e.g. there is an User Task "EvaluateLoanRequest", with a Timer Boundary Event set to 4 hours. This task will be escalated to user Task "EvaluateRequestByManager" if the user task "EvaluateLoanRequest" if not completed within 4 Hours. If the user task "EvaluateLoanRequest" is received at 4:30 pm, the task will be escalated to user task "EvaluateRequestByManager" at 8:31 p.m. since the user working hours is from 8am to 5 pm and the task is therefore not completed. This is not correct in term of operation i.e. the user task should be escalated on the following day at 11:31 am if it is still not completed by then. In addition to working hours, how can we account for non-working days like weekend or public holidays ?
1 REPLY 1

frederikherema1
Star Contributor
Star Contributor
See org.activiti.engine.impl.calendar.BusinessCalendar and org.activiti.engine.impl.calendar.BusinessCalendarManager. The manager can be plugged into the engine-configuration (property name="businessCalendarManager"). Every time a due-date is calculated, that class is consulted. You can write your implementation that follows your own timing.

ProcessEngineConfigurationImpl:

protected void initBusinessCalendarManager() {
    if (businessCalendarManager==null) {
      MapBusinessCalendarManager mapBusinessCalendarManager = new MapBusinessCalendarManager();
      mapBusinessCalendarManager.addBusinessCalendar(DurationBusinessCalendar.NAME, new DurationBusinessCalendar());
      mapBusinessCalendarManager.addBusinessCalendar(DueDateBusinessCalendar.NAME, new DueDateBusinessCalendar());
      mapBusinessCalendarManager.addBusinessCalendar(CycleBusinessCalendar.NAME, new CycleBusinessCalendar());

      businessCalendarManager = mapBusinessCalendarManager;
    }
  }
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.