Configuring the mapping.xml file

The mapping.xml mapping file contains the mapping between Rational Asset Manager asset types and WSRR business model objects.

You use the mapping.xml file and make updates to it to ensure synchronization between elements in Rational Asset Manager and WSRR elements.

There are several types of mappings defined in the file such as for asset types, relationships, and attributes. The mapping file also contains triggers, which are events that are invoked during operations for save, state entrance or manual actions you've configured for a policy.

There is a SOA policy that is provided with Rational Asset Manager. It reads the mapping file and runs the triggers defined for the manual action, state enter or save event. The SOA policy is configured on every state of the SOA lifecycle and has a WSRR connection configuration property to associate with a specific WSRR connection.

The mapping file contains two primary elements, mappings and triggers:

Mappings

The mapping elements map each asset type to a WSRR object.
  • id – ID of the mapping element. Each mapping element has a unique ID.
  • wsrrType – WSRR business model object
  • ramType – RAM Asset type
  • extends – Mapping element supports inheritance. Value of the extends is the ID of another mapping element which is being extended.
  • ramCategory – if ramCategory is defined then the WSRR business model object will be mapped to the ramType which will be classified as ramCategory.
<Mapping id="SPEC" wsrrType="&GEP63;SchemaSpecification" ramType="Specification" extends="ASSET" ramCategory="Software Development/Kind/Schema">
   </Mapping>
Mapping elements map asset types, relationships and attributes:
  • Attribute
    • wsrrName – WSRR attribute name
    • ramName – RAM attribute name
    • type – type of the attribute
    <Attribute wsrrName="gep63_versionAvailabilityDate" ramName="Availability Date" type="date"/>
  • Relationship
    • Map RAM relationship to WSRR relationship:
      • wsrrName – WSRR relationship name
      • ramName – RAM relationship name
      <Relationship wsrrName="gep63_interfaceSpecifications" ramName="specification"/>
    • Map RAM Label to WSRR relationship:
      • wsrrName – WSRR relationship name
      • ramArtifactLabel – Label of RAM artifact
      <Relationship wsrrName="gep63_charter" ramArtifactLabel="Charter"/>

Triggers

Triggers are events that are invoked during operations for save, state entrance or manual actions you've configured for a policy. For example:

<Trigger source="RAM" type="Release" state="Identified">
<Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Process" />
<Action target="WSRR" action="create"/> 
</Trigger>
  • Manual action trigger – the triggers that are invoked when an attempt to transition the asset state is performed. For example, the following trigger is invoked for the “Business Solution” asset type in the ”Proposed” state and the transition (or action) is ”Revise.”
    • <Trigger source="RAM" type="Business Solution" state="Proposed" transition="Revise">
      </Trigger>
  • Save or state entrance trigger – These are the triggers that are invoked when an asset is saved in a specific state or when it first enters a specific state. For example, the following trigger is invoked for asset of type Business Solution when either the asset is saved in state “Rejected” or the asset enters the “Rejected” state:
    • <Trigger source="RAM" type="Business Solution" state="Rejected"> 
      </Trigger> 
Triggers contain two child elements, rules and actions:
  • Rule: A rule specifies the condition or set of conditions that should be met before the actions defined in the triggers can be executed.

    A rule can be a simple rule, or a complex rule.

    Simple Rule example:
    <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Process" />

    A complex rule can be created by using “AND” or “OR” operators to Simple Rules.

    Complex rule example:
    <Rule operator="OR"> <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Web Application" /> 
    <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Service" />
     <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Process" /> 
    </Rule>
    The different types of simple rules supported are:
    • CATEGORIZATION: To specify a categorization rule, set the following attributes:
      • ruleType = "CATEGORIZATION"
      • target = "RAM"
      • categoryValue - Path to the category. For example:
        categoryValue ="Software Development/Kind/Web Application"
      Example of a categorization rule:
      <Rule ruleType="CATEGORIZATION" target="RAM" categoryValue="Software Development/Kind/Web Application" />
    • ARTIFACT: To specify an ARTIFACT rule, set the following attributes:
      • ruleType = "ARTIFACT"
      • target = "RAM"
      • countType – Can be one of the following types:
        • EXACTLY
        • ATMOST
        • ATLEAST
      • count – Integer value for the no of occurrences of Artifact.
      • artifactMatchType – Can be one of the following types:
        • FORMAT_OF – Format or type of artifact.
        • LABEL_OF – Artifact containing label.
        • FILE_EXTENSION_OF – File extension of the artifact.
        • FULL_FILE_NAME_OF – Full file name of the artifact.
      Example of an artifact rule:
      <Rule ruleType="ARTIFACT" target="RAM" countType="EXACTLY" count="1" artifactMatchType="LABEL_OF" artifactMatchTypeValue="Charter" />
    • RELATIONSHIP: To specify a RELATIONSHIP rule, set the following attributes:
      • ruleType = "RELATIONSHIP"
      • target = "RAM"
      • countType – Can be one of the following types:
        • EXACTLY
        • ATMOST
        • ATLEAST
      • count – Integer value for the number of occurrences of the relationship.
      • relatedAssetType – Asset type of related asset, for example:
        relatedAssetType="Implementation"
      • relationshipName – Name of the relationship, for example:
        relationshipName="implementation"
      Example of a relationship rule:
          <Rule target="RAM" ruleType="RELATIONSHIP" countType="ATLEAST" count="1" relatedAssetType="Implementation" relationshipName="implementation"   />
    • ATTRIBUTE
      • target = "RAM"
      • ruleType = "ATTRIBUTE"
      • attributeName – Name of the attribute.
      • attributeValue – Value of the attribute.
      Example of an asset rule:
      <Rule target="RAM" ruleType="ATTRIBUTE" attributeName="Custom Attribute" attributeValue="Value 1" />
    • WSRR_STATE – State of the WSRR Asset.
      • ruleType = "WSRR_STATE"
      • target = "WSRR"
      • state = State of the WSRR asset.
      Example of a WSRR state rule:
      <Rule ruleType="WSRR_STATE" target="WSRR" state="&GEPLifecycle;PlanReview"/>
  • Action: Actions are performed on invocation of the trigger if the rules are valid. There are three types of actions supported by the configuration file:
    • Create or update a WSRR object
      • target="WSRR"
      • action – Possible values are:
        • create – Creates the WSRR object. If it already exists, it updates the WSRR object.
        • update – Updates the WSRR object. Does not create one if no corresponding WSRR object exists.
      Example:
       <Action target="WSRR" action="create"/>
    • Transition a WSRR asset
      • target = "WSRR"
      • transition - Transition action to be performed on the WSRR object.
      • state – Final state of the WSRR object. If the object is already transitioned to the final state then it does not perform the transition.
      Example:
       <Action target="WSRR" 
      transition="&GEPLifecycle;ProposeCharter" 
      state="&GEPLifecycle;CharterReview"/>
    • Create a RAM asset
      • target = "RAM"
      • action = "create"
      • type – RAM asset type to be created.
      • relationshipName – Relationship name to relate the newly created asset and the asset.
      Example:
       <Action target="RAM" action="create" type="Release" relationshipName="release" />

Feedback