Washington DC Create Integrations with Applications
ft:clusterId
crint
bundleId
crint
workflow
Creator
Use the While component
Release version: Washingtondc
Updated February 1, 2024
1 minute to read
Execute a code until a specified condition is true using the While component in RPA Desktop Design Studio.
Before you begin
Role required: none
About this task
You can configure the properties for the While component.
Table 1. Properties of the While component
Property
Description
Delay After Execution
The number of seconds to pause after running.
Delay Before Execution
The number of seconds to pause before running.
Delay for each execution (Seconds)
Specified delay before each execution of the code while the condition is true.
Enable Timeout
Select to apply a timeout value.
Timeout
The number of seconds at which the operation will time out if it is not completed. To apply this value, the Enable Timeout property must be set.
Procedure
In the Toolbox pane, navigate to Loops > While.
Drag the While component to the Design surface.
Double-click the light-yellow colored field () under the WHILE component bar.
Enter the condition.
A Data In port is dynamically added for the parameter that contains the While condition.
Connect the data and control ports of the While component to the corresponding ports of the other components as described in the following table.
Port name
Purpose of connection
Port type
Data type
The name of the port is the same as the name of the parameter that defines the condition.
Takes the value of the parameter. The component matches the value with the condition.
For example, i<=10.
Data In
Object
ControlOut
Use the port at the end of the While Loop to continue to the next action flows.
Control Out
LoopPort
Use the port to perform actions inside the While Loop (such as calculating expressions, logging values, and so on).
Control Out
Optional: To test the component, under the DESIGN tab, click Run.
While component
Drag Variable component before the While component. Add Expression component and MessageBox components after the While component. In the Variable component, enter 1. In the Expression component, enter
i+1. Set a Breakpoint at the Expression component. In the While component, enter i<=10.
When you run this automation, the value 1 is incremented to 2 and shows in the output, MessageBox, as 2. When you select Move next on the Design tab, the value is incremented until 11. Since the condition
matches at this point, i<=10, the loop ends and automation is ended.Figure 1. While component