Task 8: Upgrade Field Mapping

The out-of-box mapping files in the Service Manager 9.41 adapters are already updated to align with the logical name solution. You need to make similar updates to your own field mapping.

Note In Service Manager 9.41 or later, the original CI Name field (the id field in the device table) is removed from the Configuration Item detail form.

Upgrading the field mappings includes the following steps.

Step 1. Upgrade your data push field mapping

To update your CI push mapping files, follow these steps:

  1. Switch the mapping field from CIIdentifier to DisplayName.

    For example, from

    <target_mapping name="CIIdentifier" datatype="STRING" value="Root['display_label']"/>

    to:

    <target_mapping name="DisplayName" datatype="STRING" value="Root['display_label']"/>

  2. (Optional) Simplify the business logic for DisplayName.

    If you have customized the original CIIdentifier field values to append more fields so that they are unique and not renamed by Service Manager, you can remove such business logic. This is because the DisplayName field in Service Manager now supports duplicate values.

Step 2. Upgrade your population field mapping

You need to make the following changes to your population field mapping files:

  1. Change “CIIdentifier” to “DisplayName”.
  2. Change “CIName” to “CIIdentifier”.
  3. Make sure that the global.id field is included in the mapping files. For example:

    <target_mapping datatype="STRING" name="global_id" value="bizservice['UCMDBId']"/>

For the Relationship and Running Software population mapping files, perform the following additional steps:

  1. Remove all upstream and downstream “name” mapping entries from all relationship population mapping files. The following are two example "name" mapping entries:

    <target_mapping name="name" datatype="STRING" value="cirelationship1to1['upstreamci.logical.name']"/>
    <target_mapping name="name" datatype="STRING" value="cirelationship1to1['downstreamci.logical.name']"/>
  2. Remove the “name” mapping entry (the entry in bold) from the container node in the running software population mapping file.

    <for-each-source-entity count-index="i" source-entities="runningsoftware.computer">
       <target_entity name="Node">
       <target_mapping name="name" datatype="STRING" value="runningsoftware.computer[i]['CIIdentifier']"/>
       <target_mapping name="global_id" datatype="STRING" value="runningsoftware.computer[i]['UCMDBId']"/>
       </target_entity>
    </for-each-source-entity>

Step 3. Upgrade your federation configuration files

Make the following updates to your federation configuration files:

  • Update the smFedConf.xml file to change one groovy method to convertArrayOrString, as shown below:

    <property ucmdbName="reference_number" smName="IncidentID"  valueConverter="convertArrayOrString"/>
  • Add the following two functions to the SMFederationConverter.groovy file.

    /**
    * Convert arraylist to a string
    *
    * @param to be converted
    * @return converted string value
    */
    public static String convertArrayString(def arrStr, DataAdapterLogger log){
    def strList=''
    for (s in arrStr) {
    strList+='"'+s+'"'+',';
    }
    if (strList.size()&gt;0)
    strList=strList.substring(0, strList.length()-1);
    return '{' + strList +'}';
    }
    public static String convertArrayOrString(def str, DataAdapterLogger log){
    if (str instanceof String)
    return convertString(str, log);
    else
    return convertArrayString(str, log);
    }

Step 4. Configure the UCMDB JMX console

Configure the UCMDB JMX console, as described in the following steps.

Note This feature enables the UCMDB global ID solution for Service Manager. It is available only in UCMDB 10.21 or later. For this reason, a known issue (QCCR1E122493) exists in UCMDB versions earlier than 10.21: If two CIs with the same display name are pushed to SM and then updated in SM with a new display name, when you run a population job to synchronize the CIs back to UCMDB, the two CIs are merged in UCMDB and therefore have the same ucmdb.id value in SM.

  1. Go to the JMX Console: http://<UCMDB server name>:<port>/jmx-console/.
  2. Enter UCMDB:service=Settings Services in the search box, and press Enter.
  3. Click setSettingValue to go to this section.
  4. In the customerID field, enter your customer ID.
  5. In the name field, enter reconciliation.match.attributes.
  6. In the value field, enter global_id.
  7. Click Invoke.

    If the configuration is successfully completed, the following message is displayed:

    Setting [reconciliation.match.attributes] value changed successfully to [global_id]