Creating a TreeSet Definition
A TreeSet Definition is MetaClass specific.
The TreeSet Definition is based either on:
a collection parameter (an occurrence or a set of occurrences of the source MetaClass)
The TreeSet Definition creation consists in defining the root MetaClass (concrete or abstract) of the TreeSet Definition.
a query (a set of occurrences)
The TreeSet Definition creation consists in defining the root MetaClass and a query that collects the entry points.
In that case, you might need to use Property Parameters.
The TreeSet Definition Structure includes a root TreeSet Collection with as many items as needed:
TreeSet Properties
TreeSet Collections with:
TreeSet Properties
TreeSet Collections
Creating a Collection Parameter - based TreeSet Definition 
When you create a TreeSet Definition based on a Collection Parameter, you need to define its root MetaClass.
To create a TreeSet Definition based on a Collection Parameter:
1. Access the TreeSet Definitions folder
2. Right-click the TreeSet Definitions folder and select New > TreeSet Definition.
The Creation of TreeSet Definition window appears
3. In the Name field, enter your TreeSet Definition name.
*By default the TreeSet Definition name is: TreeSet Definition-x (x is a number).
Example: Org-Unit Organization.
4. Define the Root section:
in the Collection is populated by field keep "Collection Parameter".
In the MetaClass field, click the arrow and in the drop-down menu select the MetaClass you want to define as the root MetaClass of your TreeSet Definition.
*In the field, enter the first letters of the MetaClass for a quick access.
Example: Org-Unit.
5. Click OK.
The selected MetaClass is defined as your TreeSet Definition root MetaClass.
Your TreeSet Definition is created and added to the TreeSet Definition folder.
6. In your TreeSet Definition properties, display its Characteristics page.
It shows:
the MetaClass Root
the Collection Parameter characteristics.
For example, with "Org-Unit" as root MetaClass, the Collection parameter characteristics are:
- Type: "Org-Unit" MetaClass
- Multiplicity: "1" (default), i.e. the root TreeSet Collection is populated by a single object
- Populating: "Org-Unit Organisation_root", i.e. this Collection parameter populates the root node of the "Org-Unit Organization" TreeSet Definition.
7. (If needed) In the _GUIName field, enter a GUI name for the Collection Parameter.
This parameter is displayed in the TreeSet Definition Preview page.
If you do not define a GUI name, the local name is used.
8. (If you want to collect several objects) In the Multiplicity field, select "N".
In that case, at TreeSet creation the user can enter several objects (Entry Point Collection values), which are taken into account to build the TreeSet.
9. In your TreeSet Definition properties, display its Definition page.
The TreeSet Definition structure is created and includes the root TreeSetCollection.
Example: The "Org-Unit Organization" TreeSet Definition is created and includes its root node.
10. Define the TreeSet Definition structure:
you can add a TreeSet Collections
Example: you can add the "Org-Unit Component" TreeSet Collection
In the Collection Provider: Collection is provided by: "MetaAssociationEnd" and Populating MetaAssociationEnd: "Component".
you can add a loop on a TreeSet Collection
Example: you can add a loop on the "Org-Unit Component" TreeSet Collection, in the Recursive Definition: TreeSet Collection loop: "Org-Unit Component" with a Maximum loop depth of "3".
you can add TreeSet Properties
Example: you can add two TreeSet Properties on the "Org-Unit Component" TreeSet Collection: two MetaAttribute values of the Org-Unit Component.
11. Display the TreeSet Definition Preview page and test the report.
Creating a query-based TreeSet Definition 
When you create a TreeSet Definition based on a query, you need to define:
its root MetaClass
its populating query based on the root MetaClass selected
To create a query-based TreeSet Definition:
1. Access the TreeSet Definitions folder
2. Right-click the TreeSet Definitions folder and select New > TreeSet Definition.
The Creation of TreeSet Definition window appears
3. In the Name field, enter your TreeSet Definition name.
*By default the TreeSet Definition name is: TreeSet Definition-x (x is a number).
4. In the Root section, in the Collection is populated by field, select "Query".
The Populating Query field appears.
5. In the MetaClass field, click the arrow and in the drop-down menu select the MetaClass you want to define as the root MetaClass of your TreeSet Definition.
*In the field, enter the first letters of the MetaClass for a quick access.
Example: Application.
6. In the Populating Query field, use the drop-down menu to select the query used to collect the entry point.
*Only the root MetaClass related queries are available.
Example: "Get Applications from Technology".
7. Click OK.
The selected MetaClass is defined as your TreeSet Definition root MetaClass.
Your TreeSet Definition is created and added to the TreeSet Definition folder.
8. In your TreeSet Definition properties, display its Characteristics page.
It displays the MetaClass Root, and how to populate the TreeSet:
The Root Population Queries section displays the query used to populate the TreeSet.
9. In your TreeSet Definition properties, display its Definition page.
The TreeSet Definition structure is created and includes the Collection root node.
10. Define the TreeSet Definition structure:
you can add TreeSet Collections
you can add a loop on a TreeSet Collection
you can add TreeSet Properties
11. Display the TreeSet Definition Preview page and test the report.
Creating property parameters 
In your TreeSet Definition, you can create and define Property Parameters that you can use in any query used in the TreeSet Definition.
At TreeSet creation the user is asked to enter the parameter values, which are taken into account in the query.
To add a property parameter in the TreeSet Definition:
1. Access the TreeSet Definition properties.
2. Display the Characteristics page.
3. In the Parameters section, in the Property Parameters list, click New .
*You can add as many parameters as needed.
4. In the Meta Property Parameter creation window:
enter a Local Name (name displayed in the TreeSet)
Example: Begin date
(according to your needs) modify the default values for MetaAttribute type ("String"), MetaAttribute Length and MetaAttribute Format ("Standard")
*For detailed information regarding MetaAttribute characteristics, see MetaAttribute Characteristics.
5. Click OK.
The property parameter is added to the Property Parameters list.
6. In the Query Parameter Name field, enter a name for the parameter. This name is the one used in the query.
Example:
When you add "Begin Date" and "End Date" Query Parameters, at TreeSet creation the user is asked to enter both dates, which filter the TreeSet result according to the these dates.