Go to Robotic Automation version 22.1 documentation

ForLoop

The ForLoop component enables iterative execution of logic within an automation. The iterations cease either when an iteration limit is reached or if the Break event node is triggered. The main methods and events for the ForLoop are contained in the design block. Properties can be set from the Properties grid. For more information, see General Component Properties, Methods, and Events.

 

Properties

Property

Description

Broken

Gets a value of True if the Break event node is triggered.

Increment

Sets an integer value representing the amount by which the index is increased each time the loop executes. The default is one (1).

Index

Gets the ForLoop index value (integer). On the first iteration, the index is equal to the Initial property value.

Initial

Sets an integer representing the ForLoop starting Index value.

Limit

Sets an integer representing the index value at which the loop halts execution. For example, if the limit is nine (9) and the initial value is zero (0), then the control would yield nine iterations and have a final Index value of eight (8).

Note: If you set the limit to -1, Studio interprets this as an infinite limit. In this case, the ForLoop will execute until the Break method is called.

 

Events

Event

Description

Completed

Triggered when the ForLoop has reached the Limit value and the Break event has not been triggered.

Yielded

Triggered when an iteration is complete.

 

Methods

Event

Description

Parameters

Result Type

Break

Trigger this method's event node to halt execution of the ForLoop. The ForLoop Break output node is triggered once the ForLoop has halted due to triggering of the Break input event.

None

Void

StartLoop

Trigger this method's event node to begin the ForLoop iterations. The StartLoop output event node is triggered when the ForLoop begins iterations.

None

Void

 

Related information

Using the ForLoop Component

 


Privacy | Trademarks | Terms of Use | Feedback

Updated: 01 July 2024

© 2016 - 2024 Pegasystems Inc.  Cambridge, MA All rights reserved.

 

OpenSpan data classification label