XenoGuard 4.0 Documentation

Repeat Until

ActionStep Reference » Programming » Flow Control » Repeat Until

The Repeat Until ActionStep is a control mechanism in automation workflows designed to repeatedly execute a set of tasks until a certain condition is met. This ActionStep is particularly useful in scenarios where repetitive ActionSteps need to be performed, but the exact number of repetitions is not predetermined and depends on external conditions or changes in data. Below is a detailed description of this ActionStep:

[-] Hide
  1. Open the Programming node in the Workspace Explorer.
  2. In the Flow Control node, select the Repeat Until ActionStep.

Parameters:

The ActionStep has the following input parameters:


Name Description
Loop Delay
This parameter defines the waiting time in milliseconds that the system will pause after completing each iteration of the loop. It helps in managing the frequency of loop execution and can prevent system overload.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [UInt64]
Condition Stability Time
Specifies the duration in milliseconds for which the condition values must remain unchanged before the loop can be terminated. This ensures that the condition is stable and not fluctuating before the loop ends.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [UInt64]
Max Repetitions
Determines the maximum number of times the loop should execute. A value of 0 indicates that there is no upper limit on the number of repetitions, and the loop will continue until the condition is met.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [UInt64]

Results:

The ActionStep returns the following results:

name Description
Loop Count
This parameter records the total number of loops executed before the termination of the process. It provides insight into how many iterations were needed to meet the condition or reach the maximum repetition limit.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [UInt64]
Result
This parameter indicates the result of the condition that was being checked in each loop. It helps in understanding whether the loop concluded because the condition was met or due to reaching the maximum number of repetitions.

Allowed Context Scopes
 [Fixed, Local, Global, Reference]
Allowed Context Types [Fixed, Variable, Parameter, Result, Enum]
Allowed Context Values [Boolean]

Example 1 (Automated File Monitoring):

This example showcases the Repeat Until ActionStep within XenoGuard, designed to persistently check a specific directory for files. The script is configured to repeatedly query the designated desktop path until a certain condition is met, such as the presence of files ready for processing. The Repeat Until loop is set with a specific delay between iterations and a maximum number of repetitions to avoid indefinite execution. This loop is crucial for scenarios where continuous monitoring is required, such as watching for new files to be uploaded or processed, and ensures that the script acts promptly upon the desired condition being fulfilled, which in this case is the detection of files in the specified path.


See other operations:

If
For Loop
For Each
While
Break
Label
GoTo
Parallel
On Error Continue
On Error GoTo
Abort
Abort on Error