Relation Mapping

Using the relation mapping you can create relations between CIs. For topology synchronization, the OM associations are not synchronized as relations by default. You must explicitly define these relations.

<RelationTo>
  <To>
     [Operand]
  </To>
  <Type>[RelationType]</Type>
</RelationTo>

Define a relation from the current CI to the CI that is returned by the operand. The operand may either return a string, an instance of a CI, a list of CIs or a list of strings. String values must match the OM ID of the CI to which the relation is created. In the case of a list, a relation is created for each item (that is in turn either a string or a CI) contained in the list.

The relation has the type specified by [RelationType]. This type is the name of the relation, not the label.

<RelationFrom>
  <From>
     [Operand]
  </From>
  <Type>[RelationType]</Type>
</RelationFrom>

Works just as the previous mapping, but in the opposite direction.

Root Container Mapping

The CMDB model defines certain root container CIs that have to be created before the actual CI can be created. Topology synchronization must know such relations to be able to create the CIs in the correct order.

<RootContainer>
  [Operand]
</RootContainer>

The root container of the current CI is set to the CI specified by the return value of the operand. The return value may either be a String or a CI.

Message Alias Mapping for CI Resolution

<RedirectMessagesOf>
  [Operand]
</RedirectMessagesOf>

The aliases of the current CI is set to the OMId(s) specified by the return value of the operand. The return value may either be a String or a CI or a list of CIs or Strings.

In the following example, the CI with the STDtypeExch2k7_ByServer gets a relation of the type is_impacted_from to the node on which it is hosted and a relation of the type deployed to all descendant CIs with an OM Typea type that starts with Exch2k7_Role_.

The same node is also the root container CI.

Example:

<Mapping>
  <Rules Context="exchange">
    <Rule name="Create relation server to node">
      <Condition>
        <Equals>
          <OMType/>
          <Value>Exch2k7_ByServer</Value>
        </Equals>
      </Condition>
      <MapTo>
        <RelationTo>
          <To>
            <DependencyCI relationType="hosted_on">
               <True/>
            </DependencyCI>
          </To>
          <Type>is_impacted_from</Type>
        </RelationTo>
        <RelationTo>
          <To>
            <DescendantCIList>
               <StartsWith>
                  <OMType>
                  <Value>Exch2k7_Role_</Value>
               </StartsWith>
            </DependencyCI>
          </To>
          <Type>deployed</Type>
        </RelationTo>
        <RootContainer>
          <DependencyCI relationType="hosted_on">
             <True/>
          </DependencyCI>
        </RootContainer>
        <RedirectMessagesOf>
           <ChildCIList/> 
        </RedirectMessagesOf>
      </MapTo>
    </Rule>
  </Rules>
</Mapping>