Define TQL Queries

  1. Add the TQL query definition to the dependency signature in the <Queries> section, like this:

    ...
    <Queries>
       <Query name=”YourQueryName”>
          [TQL XML]
       </Query>
    </Queries>
    
    1. Use a text editor to create an empty document.
    2. Add the following content:

      <tql:query xmlns:ns4="http://www.hp.com/ucmdb/1-0-0/ViewDefinition" xmlns:ns3=
      "http://www.hp.com/ucmdb/1-0-0/PolicyRuleDefinition" xmlns:tql=
      "http://www.hp.com/ucmdb/1-0-0/TopologyQueryLanguage" name="<Query Name>"> </tql:query>

    3. Build your TQL query in the Modeling Studio. For more information, see Modeling Studio.
    4. Export the TQL query to XML.
    5. Open the XML document that you exported, and copy all the text in the <resource> element.
    6. Paste this text into the <tql:query> element of the document you created in step 1.
    7. Copy the entire content of your text document and place it in the <Query> element of the dependency signature file.

Note TQL queries are embedded in the dependency signature XML file, and are not validated. However, if the query XML file itself is invalid, an exception will be thrown during deployment. For more information, see Compilation Errors.