When you record a task using the standard workflow, the task has a definite beginning and a definite end, in most circumstances tasks do not loop.
However, task loops can be advantageous, especially when combined with custom steps. Looping within a custom step provides a substantial performance advantage by using the Runtime Service to quickly navigate screens and process recognition rules.
See How to Use Custom Steps and the Server-side API for an example of using custom steps to collect and combine data.
You can create task loops by adding or changing a task step's destination to link to a previously executed step. This creates a task loop.
|Looping is an advanced feature. First, you must understand how the navigation engine works, and second, you must pay careful attention to how you terminate the loop. It is easy to create loops that never end.|
See Adding New Task Step Destinations for instructions on how to add new step destinations to your task./p>
Loops can be stopped only when a change is introduced that causes a new screen to be recognized. This is usually accomplished in one of three ways:
isRecognizedmethod. This is also usually based on screen data or perhaps an internal iteration count.
Defining the correct recognition rule is crucial to correctly stopping the loop. There must be at least one step in your loop that contains multiple step destinations, and recognition rules for the destination steps will ultimately allow the loop to be exited.
If a loop is detected, from the toolbar, click Cancel Task Test or choose Cancel Task Test from the Task menu. Of course, a direct disconnect or logoff from the host will always stop a loop.
|Using Custom Steps|
|Adding New Task Step Destinations|
|Task and Task Step Property Descriptions|
|Modifying Recognition Rules, Overview|
|Task Builder for Screens Help Links|