Add Association operation

The Add Association operation adds an association between a change and an incident.

The following table describes the elements of the <items> XML element and the adapter request. If not specified, the valid value for an element is assumed to be a string.

Elements for the <items> XML element and adapter request for the Add Association operation

Element

Definition

Required

<operation-name>

Specifies the name of the operation: add-screlation

Yes

<model>

Contains the other elements in the request

Yes

<keys>

Contains elements that uniquely identify a record

An association is added between the child elements specified in the <keys> element.

Yes

<instance>

Specifies a unique record

The children of the <instance> element describe the fields of the record.

Yes

<source>

Specifies the source record

Valid values: The key of an existing change, incident, or interaction entry

The following are the keys for the different types of entries:

  • Change: change-number (Change ID on the application UI)
  • Incident: incident-i-d (Incident ID on the application UI)
  • Interaction: call-i-d (Interaction ID on the application UI)
  • Problem: id (Problem ID on the application UI)

Yes

<source-filename>

Specifies the file name of the source entry

You must specify the source file name only when the source entity in the key cannot be used to determine the entity type, for example, when an incident and a change exist with the same key.

The following are the file names in the out-of-the-box HP Service Manager application for change and incidents:

  • Change: cm3r
  • Incident: problem
  • Interaction: incidents
  • Problem: rootcause

No

<depend>

Specifies the dependent entry

Valid values: The key of an existing change, incident, or interaction entry

The following are the keys for the different type of entries:

  • Change: change-number (Change ID on the application UI)
  • Incident: incident-i-d (Incident ID on the application UI)
  • Interaction: call-i-d (Interaction ID on the application UI)
  • Problem: id (Problem ID on the application UI)

Yes

<depend-filename>

Specifies the file name of the dependent entry

You must specify the dependent file name only when the dependent entity in the key cannot be used to determine the entity type. For example, when an incident and a change exist with the same key.

The following are the file names in the out-of-the-box HP Service Manager for change and incidents:

  • Change: cm3r
  • Incident: problem
  • Interaction: incidents
  • Problem: rootcause

No

Notes

  • If the "source" record is a "change" record, then the "depend" record must be an "incident" record.
  • If the "source" record is an "incident" record, then the "depend" record must be a "change" record.
  • If an element in the <instance> element is missing, the element is inherited from the <keys> element. This inheritance is true for multiple missing elements in the <instance> element.
  • Though the <source-filename> and <depend-filename> elements are optional, it is recommended that you provide these values.

The following figure displays a sample adapter request for the Add Association operation.

Sample adapter request for the Add Association operation


 <hp-service-manager-request>
    <entity>association</entity>
    <entity-type />
    <request>
      <operation-name>add-screlation</operation-name>
      <parameters>
        <add-screlation-request>
          <model>
            <keys>
              <source>
                <value>C10001</value>
                <type>String</type>
              </source>
              <source-filename>
                <value>cm3r</value>
                <type>String</type>
              </source-filename>
              <depend>
                <value>IM10002</value>
                <type>String</type>
              </depend>
              <depend-filename>
                <value>problem</value>
                <type>String</type>
              </depend-filename>
            </keys>
            <instance>
              <source>
                <value>C10001</value>
                <type>String</type>
              </source>
              <source-filename>
                <value>cm3r</value>
                <type>String</type>
              </source-filename>
              <depend>
                <value>IM10020</value>
                <type>String</type>
              </depend>
              <depend-filename>
                <value>problem</value>
                <type>String</type>
              </depend-filename>
            </instance>
          </model>
        </add-screlation-request>
      </parameters>
    </request>
  </hp-service-manager-request>


The following figure displays an adapter response for the Add Association operation.

Sample adapter response for the Add Association operation


<hp-service-manager-response>
  <metadata>
    <count>1</count>
  </metadata>
  <responses>
    <response>
      <metadata>
        <count>1</count>
      </metadata>
      <item>
        <metadata>
          <status>success</status>
        </metadata>
        <parameters>
          <model>
            <keys>
              <source>
                <value>C10001</value>
                <type>String</type>
              </source>
              <source-filename>
                <value>cm3r</value>
                <type>String</type>
              </source-filename>
              <depend-filename>
                <value>problem</value>
                <type>String</type>
              </depend-filename>
              <depend>
                <value>IM10020</value>
                <type>String</type>
              </depend>
            </keys>
            <instance>
              <source>
                <value>C10001</value>
                <type>String</type>
              </source>
              <source-filename>
              <value>cm3r</value>
                <type>String</type>
              </source-filename>
              <depend>
                <value>IM10020</value>
                <type>String</type>
              </depend>
              <depend-filename>
                <value>problem</value>
                <type>String</type>
              </depend-filename>
              <uniquequery>source="C10001" and source.filename="cm3r" and depend.filename="problem" and depend="IM10020"</uniquequery>
              <recordid>C10001 - cm3r - problem - IM10020</recordid>
            </instance>
            </model>
          <messages>
            <element>
              <value>screlation record added.</value>
            </element>
          </messages>
          <status>SUCCESS</status>
          <message>Success</message>
          <schema-revision-date>2010.01.22 00:00:00</schema-revision-date>
          <schema-revision-level>1</schema-revision-level>
          <return-code>0</return-code>
        </parameters>
      </item>
    </response>
  </responses>
</hp-service-manager-response>
Was this page helpful? Yes No Submitting... Thank you

Comments