QueryContext Configuration

The <QueryContext> section defines the saved queries available in the Inspire or HyperWorks products UI for retrieving Windchill objects such as CAD documents and parts.

Purpose

The purpose of the <QueryContext> section is to:
  • Enable Windchill data searches in the client UI.
  • Map specific Windchill object types to user-friendly query options.
  • Filter search results based on specified criteria.

How to Add Queries

To define a new Windchill query, complete the following:
  1. Specify a Windchill class/type (for example, wt.part.WTPart).
  2. Provide a unique keyword for internal identification.
  3. Define one or more search criteria keys (must match Windchill resource properties).
Important: When adding a new <Query> elements, you must also update the corresponding ExpandStructureDown and ExpandStructureUp sections to support BOM traversal for that object type.

Query Element Details

Each <Query> elements contains the following attributes:
name
Internal identifier, typically the Windchill class name.
type
Windchill object class (for example, wt.epm.EPMDocument).
typeKey
Resource bundle key used for localization.
keyword
Unique internal label (must not be duplicated).
displayName
Name shown in the UI.

Example Configuration

<QueryContext>
  <!-- Query for CAD documents -->
  <Query 
    name="wt.epm.EPMDocument" 
    type="wt.epm.EPMDocument" 
    typeKey="wc.query.Item.Type" 
    keyword="wcCADPart" 
    displayName="CAD Documents">
    <SearchCriteria>
      <Value>wc.query.Item.Id</Value>
      <Value>wc.query.Item.Name</Value>
    </SearchCriteria>
  </Query>
  <!-- Query for WTParts -->
  <Query 
    name="wt.part.WTPart" 
    type="wt.part.WTPart" 
    typeKey="wc.query.Item.Type" 
    keyword="wcPart" 
    displayName="Parts">
    <SearchCriteria>
      <Value>wc.query.Item.Id</Value>
      <Value>wc.query.Item.Name</Value>
    </SearchCriteria>
  </Query>
</QueryContext>