Use > Modeling > Introduction > Topology Query Language > Complex Type Condition

Complex Type Condition

The complex type condition enables you to select the specific subtypes of the query node to be included in the query results. A CI type tree appears with all the subtypes of the selected query node. By default, instances of all the displayed subtypes are included in the query results. For each subtype, you can select Exclude <subtype> from the query which excludes instances of that subtype from the query results. If you select the Apply this condition recursively on all subtypes check box, instances of the subtype and all of its descendants are excluded from the results.

If you select a subtype from the tree and you select Include <subtype> in the query without selecting the Apply this condition recursively on all subtypes check box, only instances of the specified subtype are included, but not instances of its descendants.

For both the Include and Exclude options, there is a further selection in the Conditions pane. If you select By CI type, all instances of the specified subtype are then included or excluded from the results. If you select By qualifiers and then select qualifiers from the pop-up list, only the instances of the selected subtype with the selected qualifiers are included or excluded from the query results.

For example, suppose CIT_B and CIT_C are subtypes of CIT_A, and CIT_A and CIT_B have qualifier Q1. The following are some of the possible configurations of options:

  • Select Exclude for CIT_A and all of its descendants. No CITs are included.

  • Select Exclude for CIT_A without its descendants. Only CIT_B and CIT_C are included.

  • Select Exclude for CIT_A and all of its descendants with qualifier Q1. Only CIT_C is included.

  • Note

    • It is possible to apply the Exclude option to the root of the tree (that is, the CI type of the original query node). If the Apply this condition recursively on all subtypes check box is selected, no CIs are included in the results. If the check box is not selected, instances of the root CI type are excluded, but instances of its descendants are included.

    • The Element Type Conditions feature is only available in the Modeling Studio. If you define a complex type condition in the Modeling Studio, and then modify the TQL query in Enrichment Manager or Impact Analysis Manager, the condition may be overwritten and will no longer be in effect. If the complex condition is equivalent to a simple condition, you can edit the TQL query from the Qualifier tab of Enrichment Manager or Impact Analysis Manager.

    • If you want to define a qualifier condition on a query node as using the functionality of previous UCMDB versions, select Customize subtypes and select the root query node in the CI types tree. Then select the Include option, select By qualifiers, and select the required qualifiers. Similarly, when accessing a TQL query with qualifier conditions defined in a previous UCMDB version or in Enrichment Manager or Impact Analysis Manager, the condition appears in the Customize subtypes section of the Element Type tab, using the Include and By qualifiers options.

    • It is sometimes possible to define an attribute condition (using the CI Type attribute) that generates the same results as a complex type condition. However, the complex type condition ensures better performance. In such cases, UCMDB automatically optimizes the query calculation by substituting an equivalent complex type condition for the simple one. If the query is active, you will see the complex conditions in the TQL definition the next time you open it.

For details on defining a complex type condition, see How to Define a Complex Type Condition - Scenario.

Related Topics Link IconRelated Information