How to Add an Attribute of a Supported CI Type for Federation

Out-of-the-box, the integration supports federation for three external CI types in UCMDB: Incident, Problem, and RequestForChange. For each of the supported CI types, there is a list of attributes in UCMDB that you can map to Service Manager web service objects for federation. The following figure shows the out-of-the-box UCMDB CI attributes available for the Incident CI type.

For example, to add an SM Incident attribute for federation, you need to expose the field in the SM UcmdbIncident web service object and then map it to an appropriate UCMDB attribute (if one does not already exist, you need to create it in UCMDB first).

The following figure shows the fields that are exposed in the UcmdbIncident web service object in Service Manager.

You can expose more fields so that more Incident attributes can be federated to UCMDB. As an example, the following describes how to add the “action” field in the Service Manager probsummary (Incident) file for federation, by mapping it to a new UCMDB attribute named details.

Note On the Incident form in Service Manager, the “action” field is labeled “Description,” which is used to describe the incident record in more detail. See the following figure.

To add an attribute of a supported CI type for federation:

  1. Add the SM attribute to its web service object.

    The following example describes how to expose the SM “action” field of Incident in UCMDBIncident web service object.

    1. Log in to Service Manager as a system administrator.
    2. Navigate to Tailoring > Web Services > Web Service Configuration.
    3. Enter the following field values, and then click Search.
      • Service Name: ucmdbIntegration
      • Name: probsummary

      UCMDBIncident web service object is displayed.

    4. On the Fields tab, add the following row:
      • Field: action
      • Caption: Description

    5. Save the web service object.
  2. Map the SM attribute to a UCMDB attribute.

    The following example describes how to map the SM “action” attribute to a new UCMDB attribute named details.

    1. Log in to UCMDB as an administrator.
    2. Navigate to Modeling > CI Type Manager.
    3. Navigate to ItProcessRecord > Incident, and open its properties pane.
    4. Click the Add icon to add a new attribute named details to the Incident CI type.

      • name: details
      • Display Name: Details
      • Description: Incident details
      • Attribute Type: select Primitive > String
      • Value Size: 500

    5. Save the Incident CI type record.
    6. Navigate to Data Flow Management > Adapter Management > ServiceManagerEnhancedAdapter9.41 > Configuration Files.
    7. Edit the relevant federation mapping file (ServiceManagerEnhancedAdapter9.41/mappings/federation/SM Incident 2.0.xml) to add a mapping entry for the new attribute.

              <source_instance query-name="SM Incident 2.0" root-element-name="ucmdbIncident">
                  <target_entity name="incident">
                      <target_mapping name="reference_number"     datatype="STRING"     value="ucmdbIncident['IncidentID']"/>
                      <target_mapping name="name"                 datatype="STRING"     value="ucmdbIncident['BriefDescription']"/>
                      <target_mapping name="priority"             datatype="STRING"     value="SMFederationFunctions.getEnumValue(ucmdbIncident['PriorityCode'],'Priority')"/>                
                      <target_mapping name="incident_status"         datatype="STRING"     value="SMFederationFunctions.firstLetterToLowerAndReplaceSpaceWithUnderscore(ucmdbIncident['IMTicketStatus'])"/>
                      <target_mapping name="category"             datatype="STRING"     value="SMFederationFunctions.replaceSpaceWithUnderscore(ucmdbIncident['Category'])"/>
                      <target_mapping name="closed_time"             datatype="DATE"     value="SMFederationFunctions.convertDate(ucmdbIncident['ClosedTime'])"/>
                      <target_mapping name="create_time"             datatype="DATE"     value="SMFederationFunctions.convertDate(ucmdbIncident['OpenTime'])"/>
                      <target_mapping name="last_modified_time"     datatype="DATE"     value="SMFederationFunctions.convertDate(ucmdbIncident['UpdatedTime'])"/>
                      <target_mapping name="impact_scope"         datatype="STRING"     value="SMFederationFunctions.getEnumValue(ucmdbIncident['ImpactScope'],'ImpactScope')"/>
                      <target_mapping name="urgency"                 datatype="STRING"     value="SMFederationFunctions.getEnumValue(ucmdbIncident['Urgency'],'Urgency')"/>
                      <target_mapping name="details" datatype="STRING" value="ucmdbIncident['Description']"/>
    8. Click Save to save the file.

    Now the Description (field name: action) attribute of SM Incident has been added to the integration for federation. You can run an Incident federation query in the UCMDB Modeling Studio to see if the SM Description data is properly federated. For information about how to run a federation query, see Examples of Using Federation.

    The following figure shows an example where the Description of an SM incident record has been federated to UCMDB as Details.