Examples of Calendar Events

Basic Calendar

You create a basic calendar that you can reuse afterward for defining more complex ones. In our example, it is called Basic and it contains two weekly Calendar Events:

To Define a Basic Calendar

  1. In the Process Assembly perspective, click Add Object and select Calendar.

    Define the general settings as described here: Adding Objects

    In this example, the Calendar is called Basic. Its title reads "Weekdays and Weekends".

    Click OK.

  2. On the Calendar page, the days of the year that lie in the past are dimmed. The difference in color is a mere visual help. Any Calendar Event that you define here also affects past dates.

  3. Create the first Calendar event, namely, one that selects all the weekends.

    1. Click the Add Event button.
    2. From the drop-down list, select the type of event you want to create. In this case, Weekly.
    3. The Edit Weekly Event pane is displayed, where the following options are available:

      • Event Name

        Name of the event, which must be unique

        Use names that you can easily recognize later on to reuse the event in other Calendars.

        For this example, the event is called WEEKENDS.

      • Weekdays

        Select the days of the week that this event should select.

        For this example, Saturday and Sunday.

      • Interval

        Interval in which this weekly event is effective

        For this example, as the goal is selecting all weekends in the year, we accept the default Every Week.

      • Set CW Limits

        Calendar week limits for the event. This option is useful if, for example, your financial year does not start on January 1 and you want this event to consider it.

        We ignore this setting for this example.

    4. The Calendar view is now in the background and dimmed. Click the Save & View button in the middle of the page to save the settings and preview the results of the event.

      Calendar in which all weekends are highlighted based on the defined settings

    5. If you are satisfied with the results, click the Apply & Close button to return to the Calendar Events pane.
  4. Create the WEEKDAYS event (Monday to Friday).

Your Calendar is now ready. You can assign it to your executable objects or you can use it and its events as basis for defining more complex Calendars.

WORKDAYS Calendar

You want to ensure that the execution of some of your tasks is carried out on working days. They should not run on weekends or on national holidays.

For this purpose, you create a Calendar object containing the following Calendar Events:

To Define a WORKDAYS Calendar

  1. Create a Calendar object called WORKDAYS.
  2. Create a yearly Event called NATIONAL_HOLIDAYS. On the Edit Yearly Event pane that is displayed, specify the following parameters:

    • Event Name, which must be unique and easy to recognize

    • Start Year

    • Interval

    • Happening on

      Fort our example, the settings are:

      • Defined days

        Screenshot of the section where the following days are selected: 12.31, 01.01, 03.30, 03.31, 05.01, 08.07, 10.31, 12.31

      • Every x days

        This option allows you to specify a recurrence throughout the year. You must specify whether it starts at the beginning or at the end of the year.

        Optionally, activate the Set Yearly Limits checkbox and define the first and last days of the year in which the event is effective.

        For example, for the event to select every five days beginning with December 31 and backwards until September 1, specify the following parameters:

        Start Year is 2016, Interval is Every year, Happening on Every 5 days, Count from End of Year, Year limits set to Start Day 09.01 and End Day 12.31

        The screenshot displays the results:

        Calendar in which the selected dates are highlighted according to the definitions

  3. Create the WORKDAYS Group event:

    1. In Group Existing Events, select WEEKDAYS. You want to combine this event with the NATIONAL_HOLIDAYS one.

      Either open the drop-down list and select it or click the eye icon to open the Choose Calendar Event. The latter might be the best option if you have many Calendars and Events because it displays a preview of the selected Calendar Event.

    2. Click Add.
    3. Expand the Advanced Options section.

      Here you select the events to combine and define the nature of the relationship between the events.

      For our example, this is Subtract Events. Select NATIONAL_HOLIDAYS here and click Add:

      Advanced option section in which the NATIONAL_HOLIDAYS Calendar Event has been inserted

      Note: Intersect with Events means that the resulting Calendar selects the dates that are common to all the events applied to the Group event.

    4. Click the Save & View button.

      As a result, the indicated dates are extracted from the resulting calendar:

      Calendar showing which dates have NOT been included (highlighted) due to the defined settings

Last Working Day of Month Calendar

This example builds the situation that is described in Offset Calendar Events.

Several tasks in your company must be processed at the end of the month, no matter whether the last day is a working or a non-working day. You have already defined a Calendar Event that is called LAST_DAY_OF_MONTH that selects all last days of the month. This Calendar Event is the existing one in the Offset event.

Other tasks must be executed on the last working day of the month. You have already defined a Calendar Event that is called WORKDAYS that selects all working days throughout the year. This Calendar Event is the target event in the Offset event.

To make it more complex, in this example you exclude all Fridays. If the resulting day is a Friday, the following day should be selected. You have already defined a Calendar Event that is called FRIDAYS that selects all Fridays of the year.

To Define the Calendar

  1. Create a Calendar or open an existing one to create the Offset event.
  2. The adjustment to the LAST_DAY_OF_MONTH event depends on another event, namely WORKDAYS. For this reason, you must define an offset event of type Matching.
  3. Select LAST_DAY_OF_MONTH in Existing Event.

    The result of this event is as follows:

    Calendar with all end of months selected

  4. Select WORKDAYS in Target Event.

    The result of this event is as follows:

    Calendar in which all working days are highlighted

  5. Define the relationship between both events. In this case, as you want the tasks that use this event to be processed within the month, select Match to nearest target date: before or on LAST_DAY_OF_MONTH.

    If you now have a look at the results, this is how it looks like:

    Calendar with highlighted days that are both end of month and working day

    In January, April, July, September, and December the last working day is a Friday. To avoid tasks to be processed on Fridays, you define an exception.

  6. Click Edit to open the Edit exception for event dialog and define the exception:

    1. Select the FRIDAYS event in If collision with.
    2. Select Advance by in Then.
    3. Select 1 in Additional Offset.

      This jumps one day back in the calendar if the result is Friday.

  7. The result of applying the exception is as follows:

    Calendar in which Thursday are selected instead of Fridays in case the latter are end of month and working day

    In January, April, July, September and December the selected day is now Thursday instead of Friday.

See also: