Calendar offset not working when collision is set

book

Article ID: 197177

calendar_today

Updated On:

Products

CA Automic Workload Automation - Automation Engine CA Automic One Automation CA Automic Operations Manager CA Automic Oracle

Issue/Introduction

Automic Admin trying to utilize offsets in our calendars and they are not working.

They are trying to create floating holidays around July 4th giving an additional day off.

  1. Create a calendar
  2. Within calendar create an offset
  3. The existing Event -> use INDEPENDENCE DAY from the UC_HOLIDAYS.US
  4. Create the following 3 Define Exceptions:

   - IF Collison with "UC_SATURDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "2" -> WILL GIVE 07/02/2020 OFF CORRECTLY

   - IF Collison with "UC_SUNDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "2" -> WILL GIVE 07/06/2021 OFF CORRECTLY

   - IF Collison with "UC_MONDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "1" -> WILL GIVE 07/05/2022 OFF CORRECTLY

  

     BUT ONCE WE ADD THE NEXT DEFINE EXCEPTION IT THROWS EVERYTHING OFF:

  - IF Collison with "UC_TUESDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "1" -> WILL GIVE 07/03/2023 OFF CORRECTLY

  

   ACTUAL RESULTS:

   - IF Collison with "UC_SATURDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "2" -> WILL STILL GIVE 07/02/2020 OFF CORRECTLY

   - IF Collison with "UC_SUNDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "2" -> WILL INCORRECTLY GIVE 07/05/2021 OFF -> SHOULD BE 07/06/2021

   - IF Collison with "UC_MONDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "1" -> WILL INCORRECTLY GIVE 07/04/2022 OFF -> SHOULD BE 07/05/2022

   - IF Collison with "UC_TUESDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "1" -> WILL GIVE 07/03/2023 OFF CORRECTLY

   EXPECTED RESULTS:

   - IF Collison with "UC_SATURDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "2" -> GIVE 07/02/2020 OFF

   - IF Collison with "UC_SUNDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "2" ->  GIVE 07/06/2021 OFF

   - IF Collison with "UC_MONDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "1" ->  GIVE 07/05/2022 OFF

   - IF Collison with "UC_TUESDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "1" ->  GIVE 07/03/2023 OFF

Environment

Release : 12.3

Component : AUTOMATION ENGINE

Resolution

The rules under exceptions are evaluated together, one after the other.

Lets look the example for 2020 first.
There are three active exceptions defined:
1. IF Collision with "UC_SATURDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "2"
2. IF Collision with "UC_SUNDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "2"
3. IF Collision with "UC_MONDAY" THAN "POSTPONE BY" "ADDITONAL OFFSET" = "1"


The forth of July 2020 falls on Saturday -> (Rule1) gets moved to 02.07.2020 (Thursday) - OK.
The forth of July 2021 falls on Sunday -> (Rule 2) gets moved to 06.07.2020 (Tuesday) - OK.

Now we add the 4th Exception
4. IF Collision with "UC_TUESDAY" THAN "ADVANCE BY" "ADDITONAL OFFSET" = "1"

This also gets evaluated beginning from top.
For 2020, only the 1st rule matches so only the 1st move happens.
For 2021, the 2nd rule triggers, and the new day is Tuesday.

Because the rules are evaluated consecutive from top to bottom, the 4th rule also triggers, and the effective day gets once again moved to Monday.

======================================================================

Therefore the suggestion that has come from development is to use a static calendar and then set the calendar out 10 years and than choose the dates that you want to give the floating holiday towards.