Information
This version of the product has reached end of support. The documentation is available for your convenience. However, you must be logged in to access it. You will not be able to leave comments.

Application-Bus-Time2-Get-Free-Window scenarios


The topic describes several scenarios for using the Application-Bus-Time2-Get-Free-Window command.

No Earliest Start Time or Latest End Time scenario

Application-Bus-Time2-Get-Free-Window "7/12/05 11:00:00 AM" "7/15/05 3:00:00 PM" 2 3600 "" "" "" "Work1" "Act1" "Act2" "Act3"

Consider an entity that has the following conditions:

  • Work1 gas 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 a 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 for 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
BusinessTime_GetFreeWindowCommandExample.gif

Earliest Start Time for Level 2 scenario

Application-Bus-Time2-Get-Free-Window "7/12/05 11:00:00 AM" "7/15/05 3:00:00 PM" 2 3600 "11:00:00 AM" "" "" "Work1" "Act1" "Act2" "Act3"

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

Application-Bus-Time2-Get-Free-Window "7/12/05 11:00:00 AM" "7/15/05 3:00:00 PM" 2 3600 "5:00:00 AM" "2:00:00 PM" "" "Work1" "Act1" "Act2" "Act3"

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

Application-Bus-Time2-Get-Free-Window "7/12/05 11:00:00 AM" "7/15/05 3:00:00 PM" 2 7200 "" "" "" "Work1" "Act1" "Act2" "Act3"

If the duration required is two hours, "" is returned for Level 2.

Duration of 7200 seconds scenario

Application-Bus-Time2-Get-Free-Window "7/12/05 11:00:00 AM" "7/15/05 3:00:00 PM" 4 7200 "" "" "" "Work1" "Act1" "Act2" "Act3"

If the Level is 4 and the duration is 7200 seconds, 1121266800 (July 13, 2005, 8:00 A.M.) is returned.

 

Tip: For faster searching, add an asterisk to the end of your partial query. Example: cert*

AR System 21.05