Scheduling

Once calendars are defined, calendar references are assigned and are mapped to calendars, the Deadline and Calendar (DAC) component can work out the deadline for a work item.

This is done using the calcDeadline function. The process followed is like that shown in the figure below.

Note: Deadlines of less than one hour are calculated without using calendars or invoking the Calendar services components. In these situations, the work item’s duration is simply added to its start time.
Calculating a Deadline

Procedure

  1. Call the calcDeadline function.
    This function specifies when the work item starts, how long it should take, and one or more items of calendar lookup information — either calendar references or identifiers of organizational entities involved in the work item.
  2. Perform an examination of the organization model to determine which base calendar reference and which (if any) overlay calendar reference to use.
    For more information, see Identifying Calendars
  3. Once the calendars have been determined, the available working hours are calculated from the information in the calendar entries.
  4. The combination of the starting time, the duration of the work item, and the working hours available is used to calculate the earliest date and time at which the given work item can be completed.
    • The duration parameter may be interpreted as indicating elapsed time or a number of working days, depending on how it is expressed. For details, see Duration Definitions.
    • If the duration parameter is defined in working days, it ignores any day that has a number of available hours less than the min-hours parameter defined for the base calendar being used. For more information, see Minimum Hours in Working Day Calculations.

    The value set for the calendarLookAhead property in the dac.properties file determines how far ahead the calculator should look when working out the deadline. If the calculation shows that there is not enough working time available in the period defined by duration, plus calendarLookAhead, an error is returned.

    The deadline is calculated using UTC, but displayed using the local time zone of the client. For example, assume that a work item is offered to the users in an organization unit, and that the base calendar for that organization unit is based upon the London time zone. However, the work item being offered resides on a BPM node based in New York. Calculation of the deadline is based on the time zone and the working times of the London organization unit, and not on the New York time zone of the BPM node.

    Note: These calculations may not be performed correctly if the base calendar in use does not explicitly specify a time zone. For details, see Base and Overlay Calendars.