...
In the following example, a Working Week Calendar buswk_hols
has been configured for 2017 (Valid From 01.01.2017, Valid To 31.12.2017) with a Monday to Friday working week configured as an Included Frequency and the German national holidays for 2017 as an Excluded Frequency. This Calendar is deployed on the Prod. System and appears in the Resources view as shown in the next screenshot:
This Calendar and is to be updated with a newer version of this Calendar which includes the national holidays for 2018. In addition, the Valid To date for the Calendar is to be changed from 31.12.2017 to 31.12.2018. This Calendar has been assigned to the impexp_4 Order with a Single Start Period at 18:00 and no Restrictions.
The updated and tested version of the buswk_hols
Calender is installed on the Int.system with the same Path parameter value and is assigned to an Order with the same name as the assigned Order on the Prod. system and the same Period and Restrictions.
The export procedure followed is exactly the same as that already described for the deployment of a "new" Calendar.
The following listing shows the exported buswk_hols
Calendar .json
with the new holiday information for 2018 and the updated Valid To parameter.
Code Block | ||||||||
---|---|---|---|---|---|---|---|---|
| ||||||||
{
"calendars": [
{
"path": "/demo/calendar/import-export/buswk_hols",
"type": "WORKING_DAYS",
"category": "demo",
"title": "Bus. Week + Hols",
"from": "2017-12-16",
"to": "2018-12-31",
"includes": {
"weekdays": [
{
"days": [
1,
2,
3,
4,
5
]
}
]
},
"excludes": {
"holidays": [
{
"dates": [
"2017-01-01",
"2017-04-14",
"2017-04-17",
"2017-05-01",
"2017-05-25",
"2017-06-05",
"2017-10-03",
"2017-10-31",
"2017-12-25",
"2017-12-26",
"2018-01-01",
"2018-03-30",
"2018-04-02",
"2018-05-01",
"2018-05-10",
"2018-05-21",
"2018-10-03",
"2018-12-25",
"2018-12-26"
]
}
]
},
"usedBy": {
"jobs": [],
"orders": [
"/demo/calendar/import-export/job_chain1,impexp_4"
],
"schedules": []
}
},
{
"path": "/demo/calendar/import-export/job_chain1,impexp_4",
"basedOn": "/demo/calendar/import-export/buswk_hols",
"type": "ORDER",
"periods": [
{
"singleStart": "18:00:00",
"whenHoliday": "suppress"
}
],
"includes": {}
}
],
"deliveryDate": "2017-12-17T15:35:06.11Z"
} |
The Import procedure is also started in the same way as already described for the deployment of a "new" Calendar, via the Import Calender function in the Resources / Calendars view and using the standard browser file upload procedure to select the file.
The following modal window will open once the file has been read:
Note that the Calendar is shown with an orange "object already exists" warning.
If the update is to proceed the Calendar(s) to be updated should be selected and the Import button clicked.
This will cause a confirmatory window to open as shown in the next screenshot:
The next screenshot shows that after the update has been completed the 2018 National Holidays are available as a fully editable Frequency:
Note that in contrast with the procedure described for deploying a "new" Calender, when updating an already existing Calendar there is no need for the createDailyPlan Order to be run before the Daily Plan is updated. The next screenshot shows the Calendar after the update with the Validity To setting now changed to 31.12.2018.
The Set Run-time Show Preview function in the Job Chain or Order view for an Order or Job that has been assigned the updated Calendar can be used to check that the update has been correctly applied as shown in the next screenshot: