Globalization Support: Adding dynamic escalations to a K2.net™ 2003 Process based on time zones
Introduction
A business process built using K2.net™ 2003 could quite possibly span over multiple time zones. If this process contains an escalation, it is more than likely that the escalation should only escalate after ‘x’ number of working hours. This waiting period should pertain only to the destination user's time zone context, as apposed to the K2Server's time zone context, so the waiting period needs to be adjusted to fit in with different time zones' working hours. Read further and find out how to add dynamic escalations.
Adding Dynamic EscalationsK2.net™ 2003 Server calculates escalations based on the actual system time. The following design can be implemented for the above scenario to escalate at the correct time relative to the geographical location of the destination user. | |||
1. | Open K2.net™ 2003 Studio, and set the working hours on the project based on your normal working hours across time zones. This solution assumes that all normal working hours are fixed regardless of time zone. | ||
2. | Add a reference on the project properties in K2.net 2003™ Studio to the Hours.dll (The VS.NET solution and compiled assembly are located in the downloads available on the article) | ||
3. | Add Hours as a new import on the project. | ||
4. | Create a new escalation (Use the Default escalation template) on any one of the activities contained by the process. Set the escalation so that it executes one hour after the activity has been reached. | ||
5. | Select the newly created escalation and click on the Configure button, select the Escalation Rule property and click on the Use Code option. Click on the Edit Code button to open the code editor. | ||
6. | The standard code generated by the wizard is illustrated below: | ||
7. | Modify the code as illustrated below: | ||
| |||
8. | All that is left now is to test the Escalation. | ||
Please Note: The following information highlights the functionality of the Hours.dll component. | |||
• | Only hour-incremental escalations work. | ||
• | Daylight saving time is not calculated into the resulting duration. So an escalation may fire an hour or so earlier or later than expected. | ||
• | Custom holidays (anything other than a normal weekend) are not recognized, and so are treated as ordinary working hours. | ||
• | Only supports a 5-day week with a set working-hour timetable for all 5 days. | ||
• | Currently supports the following time zones: | ||
o | (GMT +01:00) Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna. | ||
o | (GMT +08:00) Kuala Lumpur, Singapore. | ||
o | (GMT +02:00) Harare, Pretoria. | ||
o | (GMT -0600) Central Time (US & Canada). | ||
o | (GMT -05:00) Eastern Time (US & Canada). | ||
o | (GMT -08:00) Pacific Time (US & Canada); Tijuana. | ||
o | (GMT) Greenwich Mean Time : Dublin, Edinburgh, Lisbon, London | ||
The Hours.dll component is an example, and therefore will not be supported by K2.net™ Support Desk. |