52.22.8 Wait For

This is a conditional wait which lasts until a given condition is satisfied.

Trigger property: This property determines what to wait for.

Event: Wait for an event to occur. Additional fields named Equipment and Events appear where you specify the desired event(s) and the device(s) that should report it. An implicit OR relationship holds among devices as well as among events. That is, if you specify multiple devices and/or multiple events, the wait will end as soon as any of the devices reports any of the events.

Information Element: Wait for an information element with specific value to occur. Required fields named Equipment and Information Element appear where you specify the desired information element and the device that should report it. Depending on information element selected, additional fields is shown. If information element values are a fixed amount of values a Value field appear. It contains a drop-down list with possible values to choose. Otherwise two additional fields Operator and Value appear. Setup desired condition by combining operator with appropriate value.

Schedule: Wait for a point in time determined by a schedule (which is unrelated to any device activity). Additional fields Start, Time, Repeat, and Repeat Interval appear where you set up the schedule.

Start = Immediately: No wait. This option is intended to be used in while loops together with the Repeat option. Its use is best illustrated by an example; see section "Waiting For a Scheduled Point in Time".

Start = On The Hour: Wait for a new hour to begin. Equivalent to Time of Day with Time = hh:00:00; see below.

Start = Time of Day: Wait for a specified time of day (Time), stated in the format hh:mm:ss. An example is given in section "Waiting For a Scheduled Point in Time".

Start = On Time Marks: Wait for a time of day when the total number of seconds since midnight (T00:00:00) January 1, 0001 AD is evenly divisible by Time (hh:mm:ss) converted to seconds. A couple of examples will clarify:

If the current time is 14:28:57 and Time = 00:00:30, the condition will be satisfied at 14:29:00, 14:29:30, 14:30:00, ... .

If the current time is 14:28:57 and Time = 00:00:25, the condition will be satisfied at 14:29:10, 14:29:35, 14:30:00, 14:30:25, ... . (14:28:57 = 52,137 seconds since midnight; 52,137 mod 25 = 12, so the condition will next be true after (25 – 12) = 13 more seconds.)

There are 86 400 seconds per 24 hours, meaning that if the result of 86400 divided by the stipulated Time is even, the pattern is repetitive every with same time every day. (86400/25 = 3456 = even).

Repeat: This option is intended to be used in while loops and has an effect only within such a structure. What it does is to reiterate the "wait for" procedure at regular intervals whose length is defined by Repeat Interval. See the example in section "Waiting For a Given Outcome of an Activity1". If Repeat is set to No, there will be no repetitions. – The Repeat option is always disabled if Start is set to On Time Marks.

Activity Result: Wait for a particular outcome of another activity in the script. Additional fields Activity, Operator, Result appear where you detail the required outcome: for example, "ftpDownloadActivity1 Equals Failed".

Result = Succeeded: The activity completed normally.

Result = Failed: The activity failed for whatever reason (other than termination by the TEMS Investigation user).

Result = Stopped by User: The activity was stopped by the user clicking the Stop Script button.1

Result = Stopped by Duration: The activity was aborted because its maximum duration expired. This can happen only if the activity has its Abort property set to On Timeout: see section "Failure Handling Section".

Result = Stopped by Event: The activity was aborted because a specific event occurred (Abort property set to On Event; again, see section "Failure Handling Section").

Result = Stopped by Equipment Restart: The activity was aborted because the device executing it was restarted.

(Result = Stopped by Application Restart: This option is not used.)

You must yourself ensure that the monitored activity has a position in the workflow where it will in fact complete to terminate the Wait For activity. This is not considered during validation.

For usage examples, see section "Wait For".

Combined: Select this to define a more complex trigger in the form of a boolean expression combining instances of the other available criteria. Additional fields appear as follows; the structure can be expanded recursively:

Condition 1: A subcondition of type Event, Schedule or Activity Result, or another Combined condition.

Operator: Boolean operator: And or Or.

Condition 2: A subcondition of type Event, Schedule or Activity Result, or another Combined condition.