Advanced Customization > Windchill Adapter > Windchill Adapter Webject Library > Query Webjects > Query-Tree
  
Query-Tree
The Query-Tree webject recursively navigates associations between Windchill objects, producing a tree of related objects.
A bill of materials (BOM) is an example of a tree of related objects. Given one or more base objects, this webject returns all of the objects associated with the base objects by a specified set of relationships. The webject performs this navigation operation recursively until it has descended a product structure to a maximum specified depth.
The output group produced by the webject contains elements representing all of the objects discovered by the recursive navigation process. In addition, when the MODE parameter is specified with the value FLAT, this webject supplies each element with the following metadata:
com.infoengine.object.id
The unique identifier of the object represented by the element.
com.infoengine.object.type
The type of object represented by the element. For example, the Java class name is an object represented by the element.
com.infoengine.depth
The depth in the product structure, relative to the base objects, at which the object represented by the element was discovered. For example, base objects have a depth of 0, so their immediate children have a depth of 1.
com.infoengine.link.[class].[role]
Specifies a relationship between the object represented by the element and another object. The value is an object identifier matching the com.infoengine.object.id value of some other element in the output group.
The class component of the value name specifies the class name of the Windchill link class defining the relationship.
The role component identifies the role that the related object plays in the relationship.
An example is com.infoengine.link.wt.part.WTPartUsageLink.uses.