About Business Calendars and Business Time Calculations
Business calendars represent the operating hours of a business. A business calendar specifies a time zone and a set of time period rules. The time period rules determine the days, dates, and hours that are free (available for business activities) and busy (unavailable for business activities). Time period rules are evaluated in sequence as follows:
Rules that appear later in the list supersede rules that appear earlier in the list.
Intervals for which there are no rules are busy intervals.
A business calendar can be used for business calendar calculation and for checking user availability for a task.
The following examples illustrate how to a business calendar is constructed.
The following is an example of a business calendar for the year 2007:
In the above, the first three rules define Mondays and Wednesdays from 9 to 5 as free. By default, all other time is busy. The remaining rules designate the American business holidays that fall on Mondays, Wednesdays, or Fridays as busy, selectively overriding the regular free intervals.
The following is an example of a business calendar for a night-shift worker whose regular hours are from 10 PM to 6 AM three nights a week.
Of the calendars defined within Oracle WebLogic Integration, one must be designated as the system calendar. Initially, the system calendar is a default calendar named System Calendar, but you can switch the system calendar designation to a custom calendar at any time.
When allocating worklist tasks to users, the business calendar assigned to a user can be referenced to determine whether or not the user is available. Each user is associated with one of the following:
A named calendar In this case, the specified calendar is used to determine busy and free time.
No calendar In this case, the calendar currently designated as the system calendar is used to determine busy or free time.
In addition to being mapped to users in order to determine user availability, business calendars are used in the calculation of business time. When specifying the times that business events are to take place (such as a message being sent or a particular task instance becoming overdue), you may wish to express time intervals in business time by associating the interval with a business calendar. For example, suppose the following:
A Timer event generator is configured to send a message every 24 hours from January 1 to January 31, 2003.
The business calendar shown in Example 1 is associated with the 24 hour interval. Therefore, the 24 hour interval represents business time calculated against the calendar.
When calculating business time, free time periods are counted to determine when a business time interval has elapsed. Based on the business calendar shown at the beginning of this section, the free days in January fall on the following dates: 3, 6, 8, 10, 13, 15, 17, 22, 24, 27, 29, 31. Since each free day has 8 free hours, a Timer event generator configured to send a message every 24 business hours would send messages at 5 PM on the 8th, 15th, 24th, and 31st.
For more information, see “Defining Channel Rules for a Timer Event Generator” in Event Generators in Using the WebLogic Integration Administration Console.
When calculating business time against a business calendar, if the interval is specified by a mixture of days, hours, and minutes (for example, 3 days, 4 hours, and 5 minutes), the days are accounted for first, then the hours, and finally the minutes. The passage of a day in a business calendar is the passage of any day or date that has any free time defined for it.
If the calculation lands on a time that is busy, the calendar is rolled in the direction of the operation in one minute intervals until the next free time is reached. For example, if the calculation adds time (addBusinessTime method) and the addition lands on a busy time, the result rolls forward in one minute intervals until next available free minute. Alternately, if the calculation subtracts time (subtractBusinessTime method) and the subtraction lands on a busy time, the result rolls backward in one minute intervals until next available free minute. For instance, if the free time is 9:00 AM. to 5:00 PM, the subtraction rolls back to 4:59 PM.
For additional information about the methods available for business calendar operations (for example, determining whether or not a user is free or determining a due date based on the passage of a business time interval), see the com.bea.wli.calendar.api Javadoc.
Overview of the Business Calendar Module
The following table lists the pages you can access from the Business Calendar module. The tasks and topics associated with each are provided.
Business Calendar Management
View a list of business calendars. Calendar name, status (in use: true or false), and type (system calendar: true or false) are displayed.
The Associate Users with Calendar page allows you to:
Assign a business calendar to a user.
Remove the business calendar assignment from a user.
If a user is not mapped to a calendar, the system calendar is used. To learn how a calendar mapped to a user can be used in determining worklist task dates, see “Task Due Dates” in Creating and Managing Worklist Task Plans in Using the Worklist.
You can export and import business calendars. When you export a business calendar, the calendar name, time zone, and business rules are exported in XML format. When you import a calendar, if the name specified by the <sch:name> element in the XML file matches an existing calendar, the rules and time zone defined in the existing calendar are overwritten by the rules defined in the XML file. If the name specified by the <sch:name> element does not match any existing calendar, a new calendar is created.
If the calendar you are importing has the same name as the calendar currently designated as the system calendar, the system flag element <sch:systemFlag>must be set to Y in the XML file. If you are importing a new calendar, or updating a calendar that is not currently designated as the system calendar, the system flag is reset to F on import, regardless of the setting in the XML file.
Click the check box to the left of the calendars that you want to delete.
If any of the selected calendars are currently being referenced by a Timer event generator, a warning is displayed. Click Cancel to cancel the delete operation, or OK to anyway delete the selected calendars.