When defining due dates and timers, you can use a business calendar instead of a regular calendar. A business calendar defines the business hours and days of an organization. Using a business calendar ensures that timers expire during business hours only. The same applies for due dates; business calendars ensure that activities are due during business hours only.
Systemwalker Runbook Automation Studio provides a fully functional default business calendar. You can modify the default business calendar or you can create your own business calendars. You may create as many business calendars as necessary to meet the needs of your organization. For example, if your organization has divisions in multiple states that have different business hours and public holidays, you create a business calendar for each state.
To create a business calendar:
In your Workflow Application project, right click the Calendar folder and select New >> Calendar.
The New Calendar dialog is displayed. The Project field automatically shows the name of the Workflow Application project for which you want to create the business calendar.
Figure 6.35 Displaying the New Calendar dialog
If you want to select a different project, click Browse.
The Folder Selection dialog is displayed. Select a project directory for the new calendar file. The default name of your calendar file is <your name>.cal. The .cal extension indicates that this is a business calendar. Calendars are like properties or .ini files that specify business days and hours.
Select the project where the new calendar file is to be saved, and click OK.
If the file name already exists, type in a new name to avoid a file name conflict.
In the Name field, type in a name for the new calendar file, and click Finish.
The new calendar (.cal) file is automatically stored in the Calendar folder of the selected project.
The following figure shows the location of the new myNewBusinessCalendar.cal file:
Figure 6.36 Location of a new calendar file
The new file automatically opens in the text editor you have specified for opening .cal files. The default calendar file is stored in the C:\Fujitsu\Systemwalker\SWRBA_Studio\ibpm\Data\calendar directory. The file looks as follows:
EVERYDAY=8:30,18:00; SAT=; SUN=; 2009/01/01=; 2010/01/01=; 2011/01/01=; 2012/01/01=; 2013/01/01=; 2014/01/01=; 2015/01/01=; 2016/01/01=; CALENDAR_BEGIN=2009/01/01; CALENDAR_END=2018/12/31;
Define your business calendar.
You can use the default calendar file as an example. For a detailed explanation of the business calendar format, refer to the "6.22.4.1 Business Calendar Format".
Note
You can only save your changes using the Save option from the file menu. You cannot select the Save As option for saving new resource files.
Once you have created a business calendar, you can assign it to process definitions or to particular timers.
The format for business calendars is shown below.
For business calendars, use the following parameters to specify business hours.
EVERYDAY
Specifies the default business hours (for days and dates for which no special settings are specified).
<day>
Specifies settings for particular days of the week for which the business hours are not normally the same as the default business hours (such as excluding weekends from business hours, for example).
<date>
Specifies settings for particular dates throughout the year for which the business hours are not normally the same as the default business hours (such as excluding holidays from business hours, for example).
The priority for these parameters is as follows:
date > day > EVERYDAY
The following example shows how business hours can be set up.
EVERYDAY=9:00,17:00; FRI=9:00,14:00; 2007/06/08=09:30,13:00;
In this example, on Friday June 8, 2007 business hours run from 9:30 AM until 1:00 PM. On all other Fridays, business hours are from 9:00 AM until 2:00 PM, and on all other days business hours are from 9:00 AM until 5:00 PM.
The following section provides a more detailed explanation of each of the parameters that can be used in the calendar file.
EVERYDAY
This parameter is mandatory. It defines the default business hours applied to all days (except for days where specific settings have been specified using the <day> or <date> parameters).
Example: EVERYDAY=9:00,17:00;
<day>
This parameter defines the default business hours applied to particular days. These settings take priority over the settings specified with the EVERYDAY parameter.
Example: The business hours for a particular day of the week (SUN, MON, TUE, WED, THU, FRI, or SAT) can be specified as below.
FRI=9:00,16:00;
If no hours are specified, that day will be treated as a non-business day.
This parameter is normally used to exclude Saturday and Sunday from the weekly business calendar. To do this, set the "null" value for Saturday and Sunday. The following example shows how to exclude Saturday and Sunday from the weekly business calendar.
SAT=; SUN=;
<date>
This parameter defines the business hours for particular dates. Settings specified with this parameter take priority over the settings specified with the EVERYDAY parameter and the <day> parameter.
Format: yyyy/mm/dd (year/month/day)
This parameter is normally used to exclude holidays from the annual business calendar.
Example: 2007/01/01=;
This parameter can also be used to specify special business hours, such as longer lunch breaks because of special occasions.
Example: 2007/12/01=9:00,12:00;15:30,17:00;
DST
This parameter is used to make adjustments for daylight savings time (summer time).
Format: <date>=DST(<number of hours to adjust>)
For <number of hours to adjust>, a value between 0 and 4 can be specified.
The following example shows how to move business hours forward in spring and then return to normal in autumn.
2006/04/20=DST(1);
2006/10/19=DST(0);
It is not possible to combine "DST(<number of hours to adjust>)" with a time specification. For example, specifications such as "2006/10/20=DST(1);9:00,12:00;13:00,17:30" are not correct.
CALENDAR_END
This parameter is mandatory. It defines the last date for which the calendar is valid. Once the date specified by this parameter has passed, the calendar can no longer be used. If the end date for a timer has been specified as a date later than the end date for the calendar, an array out of range error will occur, and the timer will not function properly.
Default value: CALENDAR_END=2010/12/31;
CALENDAR_BEGIN
This parameter is mandatory. IT defines the date when the calendar is to be issued. The calendar cannot be used before the date specified by this parameter. If the end date for a timer has been specified as a date earlier than the start date for the calendar, an array out of range error will occur, and the timer will not function properly.
Default value: CALENDAR_BEGIN=2003/01/01;
Note
The maximum period that a calendar can be valid is 10 years. This means that the dates specified for the start date (CALENDAR_BEGIN) and end date (CALENDAR_END) for the business calendar cannot be separated by more than 10 years.
TIMEZONE
This parameter is mandatory. It defines the time zone for the client's location relative to Greenwich Mean Time (GMT).
Example: Japanese Standard Time (JST) is nine hours ahead of GMT, so specify "TIMEZONE=+9:00;" for this parameter.