How to Define a Loop in a TreeSet Definition
When a hierarchy is recursive, you can define a collection loop on any TreeSet Collection of the TreeSet Definition.
Example: Defining a loop on "Org-Unit Component" TreeSet Collection
The TreeSet Definition based on:
• MetaClass Root: Org-Unit
• Root TreeSet Collection: collection populated by the "Org-Unit" parameter
• added TreeSet Collection: "Org-Unit Component" collection populated by the "Org-Unit" Target MetaClass, "Component" Populating MetaAssociationEnd
For example, the "Finance Department" Org-Unit has seven children.
You can define a loop on the "Org-Unit Component" TreeSet Collection.
To define a loop on the TreeSet Collection:
1. Access the TreeSet Definition properties.
2. Display its Definition page.
3. In the TreeSet Definition structure, select the "Org-Unit Component" TreeSet Collection.
4. In the Recursive Definition section, define the loop:
• In the TreeSet Collection loop, select "Org-Unit Component" TreeSet Collection.
• In the Maximum loop depth, enter "3" (the depth represents the number of displayed levels)
5. Display the Preview page, and click Apply Parameters.
Now two levels of Org-Unit components are added to the "Finance department".