This documentation supports the 9.0 version of Remedy Action Request System.

To view the latest version, select the version from the Product version menu.

Business Time application commands

In this topic:

Important

The Olson (also Olsen) time zone format is the default on AIX when time zones are set through System Management Information Tool (SMIT). When the Olson time zone format is used with an AR System server running on AIX, however, the AR System server miscalculates dates and times when executing Business Time application commands. Therefore, BMC recommends that you use the POSIX time zone setting for AR System servers running on AIX. When the POSIX format is used, the AR System server correctly calculates dates and times affected by Business Time application commands.

Application-Bus-Time2-Add

The Application-Bus-Time2-Add command adds the requested offset to the start time and returns a timestamp representing the time calculated. Use this command to recalculate time into the future.

Use the following syntax for the Application-Bus-Time2-Add calculation:
Application-Bus-Time2-Add *"*startTime" ["<amount>" ["<amountUnits>" ["<businessTimeSegmentName1>" " <businessTimeSegmentName2>" . . . ]]]

The <startTime parameter> is required in this command. This parameter must be a value such as a field reference ($<fieldName>$). Other fields are optional and use the default value if not provided. You can specify multiple business activity names.

For example, to add one day, use the following calculation:
$PROCESS$ Application-Bus-Time2-Add "$<fieldName>$" "<amount>" "<amountUnits>"

This adds one day to the value in <fieldName>. In the example, <fieldName> is <startTime>. <amount> (offset) is set to 1, and <amountUnits> is set to 4 (representing days), thus adding 1 day to the calculation. The final syntax looks like:
$PROCESS$ Application-Bus-Time2-Add "$8/26/2004$" "1" "4"

Application-Bus-Time2-Diff

The Application-Bus-Time2-Diff computes the difference between the start time and the end time. The command returns an integer representing the difference in seconds. Use this command to compare two different times (start time and end time) to get the actual business time.

Use the following syntax for the Application-Bus-Time2-Diff calculation:
Application-Bus-Time2-Diff "<startTime>" "<endTime>" ["<businessTimeSegmentName1>" "<businessTimeSegmentName2>" . . . ]]

The <startTime> and <endTime> parameters are required in this command. Other fields are optional and use the default value if not provided. You can specify multiple business activity names.

Application-Bus-Time2-Subtract

The Application-Bus-Time2-Subtract subtracts the requested offset from the start time and returns a timestamp representing the time calculated. Use this command to recalculate time in the past.

Use the following syntax for the Application-Bus-Time2-Subtract calculation:
Application-Bus-Time2-Subtract "<startTime>" ["<amount>" ["<amountUnits>" ["<businessTimeSegmentName1>" "<businessTimeSegmentName2>" . . . ]]]

The <startTime> parameter is required in this command. Other fields are optional and use the default value if not provided. You can specify multiple business activity names.

Application-Bus-Time2-Get-Next-Window

The Application-Bus-Time2-Get-Next-Window command returns the start of the next available or unavailable time segment that is <duration> seconds long. If <duration> is 0 (the default), the command returns the start of available time segment or the start of unavailable the time segment.

Additionally, depending on the <windowFlag>, the command returns one time segment or all the time segments between <startTimeRange> and <endTimeRange>.

Use the following syntax for the Application-Bus-Time2-Get-Next-Window calculation:
Application-Bus-Time2-Get-Next-Window "<startTimeRange>" "<endTimeRange>" ["<duration>"] ["<windowFlag>"] ["<businessTimeSegmentName1>" "<businessTimeSegmentName2>" . . . ]

Application-Bus-Time2-Get-Free-Window

The Application-Bus-Time2-Get-Free-Window command returns the start of the next available or unavailable free time segment at the same level or a higher level that is <duration> seconds long. A free time segment at Level <level> and Duration <duration> is one where no other time segment at the same or higher level as <level> overlaps, or starts or ends in the <duration> of this time segment. After a free time segment is obtained, it can be created as available or unavailable. The default value for <duration> is 0, which returns the next available time segment.

Use the following syntax for the Application-Bus-Time2-Get-Free-Window calculation:
Application-Bus-Time2-Get-Free-Window "<startTimeRange>" "<endTimeRange>" ["<level>"] ["<duration>"] ["<earliestStartTime>"] ["<latestEndTime>"] ["<businessTimeSegmentName1>" "<businessTimeSegmentName2>" . . . ]

The command considers all Business Time Segments at a certain level or above and treats them as unavailable, regardless of whether they are available or unavailable. If Level 1 and 2 time segments are present, they are always considered and are taken as available and unavailable, respectively.

Was this page helpful? Yes No Submitting... Thank you

Comments