6 Customization of the Request Templates

You can modify the request.xsl templates if the default template does not conform to your requirements:

  • createEvent_request.xsl
  • updateEvent_request.xsl

The response.xsl templates must not be modified:

  • createEvent_response.xsl
  • updateEvent_response.xsl

Note that attribute names should not be altered, added, or removed in the XSL template. Attribute names use the <string name="attributeName"> format. The content within these attributes may be modified, except for the following attributes, which serve backend purposes and must not be changed:

  • requestType
  • id
  • resolutionState

Note:

Custom attributes are not supported. If custom content is required, place it within the content of the message attribute.

The most commonly modified attributes are those where the default mappings might not conform with internal alerting practices. These include:

  • severityLevel
  • severityCode
  • priorityCode

Only the createEvent_request.xsl template contains the severityLevel attribute. This attribute must always match the corresponding severityCode, as defined by the following mapping rules:

severityLevel severityCode
Information 0
Warning 1
Error 2

The following example shows how to modify the createEvent_request.xml template to map a severity of Warning in Oracle Enterprise Manager to an Error alert in SCOM, and an Oracle Enterprise Manager priority of Medium to a priority code of 2 in SCOM:

createEvent_request.xml (Default)

<string name="severityLevel">
  <xsl:choose>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'MINOR_WARNING'">Warning</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'WARNING'">Warning</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'CRITICAL'">Error</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'FATAL'">Error</xsl:when>
    <xsl:otherwise>Information</xsl:otherwise>
  </xsl:choose>
</string>

<!-- … -->

<string name="severityCode">
  <xsl:choose>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'MINOR_WARNING'">1</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'WARNING'">1</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'CRITICAL'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'FATAL'">2</xsl:when>
    <xsl:otherwise>0</xsl:otherwise>
  </xsl:choose>
</string>

<string name="priorityCode">
  <xsl:choose>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Low'">0</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Medium'">1</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'High'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Very High'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Urgent'">2</xsl:when>
    <xsl:otherwise>1</xsl:otherwise>
  </xsl:choose>
</string>

createEvent_request.xml (Modified with changes in bold)

<string name="severityLevel">
  <xsl:choose>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'MINOR_WARNING'">Warning</xsl:when>

    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'WARNING'">Error</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'CRITICAL'">Error</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'FATAL'">Error</xsl:when>

    <xsl:otherwise>Information</xsl:otherwise>
  </xsl:choose>
</string>

<!-- … -->

<string name="severityCode">
  <xsl:choose>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'MINOR_WARNING'">1</xsl:when>

    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'WARNING'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'CRITICAL'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:SeverityCode = 'FATAL'">2</xsl:when>

    <xsl:otherwise>0</xsl:otherwise>
  </xsl:choose>
</string>

<string name="priorityCode">
  <xsl:choose>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Low'">0</xsl:when>

    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Medium'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'High'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Very High'">2</xsl:when>
    <xsl:when test="emcf:SystemAttributes/emcf:Priority = 'Urgent'">2</xsl:when>

    <xsl:otherwise>1</xsl:otherwise>
  </xsl:choose>
</string>