How to Map the CI type's Query to an XSL Transformation File

The integration uses a configuration file called smPopConfFile.xml to map each Universal CMDB query to an XSL transformation file. In order for custom queries to be part of the integration, you must add a mapping entry for each query in the configuration file.

To map the query rdbmsData described in previous sections to the Service ManagerucmdbRDBMS web service:

To map a query to an XSL transformation file:

  1. Log in to UCMDB with an administrator account.
  2. Navigate to Data Flow Management > Adapter Management > ServiceManagerAdapter9.41 > Configuration Files > smPopConfFile.xml.
  3. Add a query mapping element by copying an existing one. A query mapping element uses the following format:
    <tql name="Query" xslFile="XSL_File">
                <request type="Retrieve" 
       dataType="Data_Type"
           retrieveFileList="Retrieve_SM_Tables"
           retrieveKeysQueryName="Retrieve_keys_web_service"
           retrieveListQueryName="Retrieve_Objects_web_service"
           ballQueryCondition="Full_Query_Condition"
           changedUpdateQueryCondition="Changed_Update_Condition"
           changedDeletionQueryCondition="Changed_Deletion_Condition"/>
    </tql>

    Query is a query name. The query does not have to exist in UCMDB.

    XSL_File is the name of the XSL transformation file that the integration will use to map Service Manager web service fields to Universal CMDB attributes.

    Data_Type is the type of the object retrieved from Service Manager. The possible values are “ci” and “relationship”.

    Retrieve_SM_Tables is the table name list in the Service Manager web service configuration; if you define the WSDL on a join definition, you need to list all the table names of the join definition to which the fields of XSLT mapping belongs; if you define the WSDL on a simple table, simply leave Retrieve_SM_Tables empty. You can also check this by opening the WSDL URL: http://<SM server>:<port>/SM/7/<object name>.wsdl. For example, out-of-the-box, the instance type of ucmdbNode is as shown in the following figure, so the Retrieve_SM_Tables value is file.device, file.node.

    SM tables of the ucmdbNode instance type in the ucmdbNode WSDL are illustrated in the following screenshot:

    Retrieve_keys_web_service is the name of the Service Manager web service that you want the integration to use to retrieve a CI Key list from Service Manager.

    Retrieve_Objects_web_service is the name of the Service Manager web service that you want the integration to use to retrieve a CI Object list from Service Manager.

    Basic_Query_Condition is an internal Query Condition of Service Manager that you want the integration to use to retrieve a CI list from Service Manager for a CI type; it is used as the basic condition for a full or changes population.

    Full_Query_Condition is an additional internal Query Condition of Service Manager. Along with the Basic_Query_Condition, it is used to retrieve a list of all CIs from Service Manager for a full population.

    Changed_Update_Condition is an additional internal Query Condition of Service Manager; along with the Basic_Query_Condition, it is used to retrieve a list of updated CIs from Service Manager since the last job execution; it includes both updated CIs and newly created CIs. It is used for a changes population.

    Changed_Deletion_Condition is an additional internal Query Condition of Service Manager; along with the Basic_Query_Condition, it is used to retrieve a list of deleted CIs from Service Manager since the last job execution. It is used for a changes population.

    The following figure shows an excerpt of the smPopConfFile.xml:

  4. Add or update query mapping elements for each query you want to add to the integration.

    For example, the following query creates a mapping between the rdbmsData query and the rdbms_population.xslt file.

    <tql name="rdbmsData" xslFile="rdbms_population.xslt">
        <request type="Retrieve" dataType="ci" 
            retrieveFileList="file.device,file.rdbms"
            retrieveKeysQueryName="RetrieveucmdbRDBMSKeysListRequest"
            retrieveListQueryName="RetrieveucmdbRDBMSListRequest"
            basicQueryCondition="type#&quot;rdbms&quot;"
            fullQueryCondition="istatus~=&quot;Disposed/Retired&quot;"
            changedUpdateQueryCondition="(devicemodtime>'{fromDate}' or (devicemodtime=NULL and created.by.date>'{fromDate}')) and istatus~=&quot;Disposed/Retired&quot;"
            changedDeletionQueryCondition="devicemodtime>'{fromDate}' and istatus=&quot;Disposed/Retired&quot;"/>
    </tql>

    The following figure shows the above-mentioned query mapping elements in the smPopConfFile.xml file:

    The following figure shows an excerpt of the ucmdbRDBMS WSDL for your reference:

  5. Save the configuration file.

Note When you create/edit and then save a configuration file in Adapter Management, UCMDB automatically restarts the adapter with the new configuration file.