Application-Bus-Time2-Get-Free-Window scenarios
Consider an entity that has the following conditions:
- Work1 has the following Workday schedule:
- Available—Wednesday through Friday, 8:00 A.M. to 5:00 P.M.
- Unavailable—Wednesday through Friday, 12:00 A.M. to 8:00 A.M. and 5:00 P.M. to Midnight
- Unavailable—Saturday through Tuesday, whole days
- Act1 defines an available time window at Level 3 from 10:00 A.M. to 2:00 P.M. on 7/13/05.
- Act2 defines an unavailable time window at Level 3 from 7:00 A.M. to 9:00 A.M. on 7/13/05.
- Act3 defines an unavailable time window at Level 4 from 1:00 P.M. to 4 P.M. on 7/13/05.
A free window of duration 3600 seconds (1 hour) is required. There is no Earliest Start Time or Latest End Time.
The following figure shows the return value for Get-Free-Window on a specific day. The two Final lists show the final time window that Get-Free-Window uses in case a free window is required at Level 2 or at Level 4.
For Level 2, the free window is available from 9:00 A.M. to 10:00 A.M. and from 4:00 P.M. to 5:00 P.M. Get-Free-Window returns 1121270400 (July 13, 2005, 9:00 A.M.).
For Level 4, the free window is available from 8:00 A.M. to 12:00 P.M. and from 3:00 P.M. to 4:00 P.M. Get-Free-Window returns 112166800 (July 13, 2005, 8:00 A.M.).
Application-Bus-Time2-Get-Free-Window command example
Earliest Start Time for Level 2 scenario
In this scenario, if the Earliest Start Time for Level 2 is 11:00 A.M., the return value at Level 2 is 1121295600 (July 13, 2005, 4:00 P.M.).
Earliest Start Time is specified or unspecified scenario
If the Earliest Start Time is 5:00 A.M. (or if it is not specified) and if the Latest End Time is 2:00 P.M., the return value at Level 2 is 1121270400 (July 13, 2005, 9:00 A.M.).
Duration of two hours scenario
If the duration required is two hours, "" is returned for Level 2.
Duration of 7200 seconds scenario
If the Level is 4 and the duration is 7200 seconds, 1121266800 (July 13, 2005, 8:00 A.M.) is returned.