You are on page 1of 6

Exercise: Configuring a loop

and when condition


Scenario
Retrieve the list of operators who are skilled in one particular language. Activity to get
all the operators who are skilled in the language that was passed as parameter to the
activity.
The following table provides the credentials you need to complete the exercise.
Role Operator ID Password
Administrator Admin@RGB rules

Approach
Create an activity rule GetSkilledOperators with the steps displayed in the following
image.

Detailed Steps
1. Create an activity GetSkilledOperators in RGB-Warranty-Work class.
2. In step 1, use the method Page-Remove to remove the AllOperators page from the
clipboard.

3. In step 2, use the method Obj-Browse on the Data-Admin-Operator-ID class and


get all the operators and their skills. The results are stored in the AllOperators
page list.

4. In step 3, loop through the AllOperators page list using for each embedded page.
5. Right-click step 3 and click Add Child.

6. In Step 3.1, as shown in the following image, use the Property-Set method to
populate the local variable count.

7. In step 3.2, for each embedded page in AllOperators, loop through the pySkills
page list and use the method Page-Copy. The parameters for the Page-Copy
method are:
 CopyFrom = AllOperators.pxResults(Local.count)
 CopyInto = FilteredOperators.pxResults(<APPEND>)

8. In step 3.2, add a when condition to the Page-Copy step that checks pySkillName
with the parameter passed, as shown in the following image.
The operators whose skill name match the parameter are copied to
FilteredOperators pagelist.

9. Configure the Parameters tab as shown in the following image.


10. Configure the Pages & Classes tab as shown in the following image.

11. Open the operator ID author2@RGB

12. Configure the Work tab as shown in below


Verify your work
1. In the SkillName field, update the value with French to update the
operator records.

2. From the Operator ID record, in the Work tab, add Skills.

3. Click Action and click Run to execute the activity with the parameter as
French.

4. In the clipboard, find the embedded pages FilteredOpeators PageList


contains the operators whose skills contains French.

5. The details of the operators with matching skills are given in the
FilteredOperators.pxResults as shown in the following image.

You might also like