Calendar Object (CALE)
A Calendar object is a container for calendar events. A Calendar Event is a set of rules that result in selecting certain days in the Calendar. You can include as many Calendar Events as you need in a Calendar object. You can also reuse the Calendar Events assigned to a Calendar when defining another one. As an administrator user, you define and maintain company-wide Calendar objects. As a developer and object designer, you assign Calendars to objects to apply date conditions to them.
Object Definition
Object class: Active object
Object type/Short name: CALE
This topic provides information on the following:
- Overview
- Best Practices
- Defining a Calendar Object
- Duplicating Calendar Objects
- Transporting and Importing/Exporting Calendars
Important Related Documentation
Calendars are only useful after you have assigned them Calendar Events.
Have also a look at the following topics for examples of how to use Calendar conditions in Schedules and Workflows:
- Defining a Schedule with Tasks with Time and Calendar Conditions
- Getting Data, Updating the Database with it and Sending a Report Once a Month
A Calendar must contain at least one Calendar Event. Calendar Events reside exclusively within Calendars, that is, you cannot access Calendar Events without opening one of the Calendars in which they are being used. For this reason, it makes sense creating multiple simple Calendars that contain individual Non-Recurring, Weekly, Monthly and Yearly Calendar Events. You can then create more complex Calendars that combine them using Group and Offset Calendar Events. This means that creating Calendar objects consists of multiple steps. You can think of it as defining layers of date/time definitions, from very simple to highly complex, that you can combine. For example:
- Create a basic Calendar that defines the weekdays and the weekends, each of them being a Calendar Event.
-
Create the next layer in a Calendar that defines the working days, which result from subtracting the national holidays from the weekdays. You can reuse the weekends event of the basic Calendar.
Automic products are supplied with standard Calendar Events for national holidays in most of the countries. You can use and edit them, if necessary, or create your own ones.
- You want to execute certain tasks only on the last day of the month, provided it is a working day. Create this calendar based on the working days one.
-
For the cases in which the last day of the month is a non-working day, you want to have two possibilities:
- Skip processing the tasks altogether.
- Postpone processing to the next working day.
You define this calendar building up on the previous one.
These are a few uses cases. The Calendar object is a very flexible tool that can cover virtually any combination of events to manage execution start dates.
Standard Calendars and Settings
Client 0 is supplied with a number of standard Calendars and Calendar Events that can be assigned to objects in all the Clients in your system.
The UC_CLIENT_SETTINGS - Various Client Settings contains parameters that are relevant for Calendar objects:
- The FIRST_DAY_OF_WEEK key specified which is the first day of the week, whether Monday or Sunday.
- The NOW_MINUS and NOW_PLUS keys determine the validity period of calendar calculations. They specify how many years in the past and in the future will be taken into account to perform calculations based on Calendar Event definitions.
Create several small Calendar objects with few Calendar Events each instead of large complex ones that are difficult to manage. This boosts flexibility and helps achieve well-performing calendar calculations.
Storing Calendar Events referring to each other in one Calendar object is also a good practice, as this facilitates transporting, importing and exporting them.
You define Calendar objects in the following pages:
- Standard pages that are always available, no matter what type of object you are defining:
-
The object-specific page described in these topics.
For example:
Take a look at the Examples of Calendar Objects topic for details on how to create Calendar objects and Calendar Events.
There is a peculiarity when duplicating calendars. It is explained in the example shown below:
- Calendar A has a Group and an Offset Calendar Events, both of which refer to one of the Calendar Events.
- Calendar A is duplicated, the copy is called B.
- The Group and an Offset Calendar Events of calendar B, however, do not refer to the Calendar Event in B but to the one in A.
For more information see Duplicating Objects.
Transporting and Importing/Exporting Calendars
When transporting, importing and exporting calendars, make sure that you also do so with all the calendar events they refer to, also if they are defined in calendars different to the one you are transporting.
Calendars are re-calculated after each transport/import/export. This may cause error messages in the log file if the calendar is re-calculated before the calendar events to which it refers have been read. Such messages can largely be ignored because an automatic follow-up calculation of calendar events will take place, without any manual interference being required.
For more information see Importing/Exporting Objects and Transport Case.
See also: