Monday, September 01, 2008

Domain Value Mapping (DVM) example

Here are some examples how to use domain-value-mapes in XSLT transformations.

Domain value maps are used to map code-values from one into another one. Commonly used in SOA patterns and in canonical datamodels.

For example in Oracle AIA, DVM are used to map statuses farom Siebel to AIA canonical data format and then to Oracle BRM format.

Example call to DVM lookup

<xsl:variable name="Salutation" select="orcl:lookup-dvm('CONTACT_SALUTATION','SEBL_01','Miss.','PMDM_01','')">
<xsl:if test="$Salutation!=''">
<xsl:value-of select="$Salutation">
</xsl:if>

In more general terms:

<xsl:variable name="RESULT" select="orcl:lookup-dvm(DVM_NAME,$SOURCE_SYSTEM,$KEY,$TARGET_SYSTEM,'')">
<xsl:choose>
<xsl:when test="$ RESULT!=''">
<xsl:value-of select="$ RESULT ">
</xsl:when>
<xsl:otherwise>DEFAULT</xsl:otherwise>
</xsl:choose>

‘SOURCE_SYSTEM’ variable either retrieved from EBM Header and lookup in AIA registry OR hard-coded to ‘COMMON’ (when message from AIA to application

‘TARGET_SYSTEM ‘ would be a target system either retrieved from EBM Header and lookup in AIA registry or hard-coded to ‘COMMON’ (when message from application to AIA’

Lookup in AIA registry example:

<xsl:variable name="TargetSystemID">
<xsl:choose>
<xsl:when test="boolean(/telcocustmr:CreateCustomerPartyEBM/corecom:EBMHeader/corecom:Target/corecom:ID/text())">
<xsl:value-of select="/telcocustmr:CreateCustomerPartyEBM/corecom:EBMHeader/corecom:Target/corecom:ID">
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="aia:getServiceProperty('{http://xmlns.oracle.com/ABCSImpl/Portal/Industry/Telco/CreateCustomerPartyPortalProvABCSImpl/V1}CreateCustomerPartyPortalProvABCSImpl','BRMCUSTService.Routing.Target.Default.SystemID',true())">
</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name=" SOURCE_SYSTEM " select="$TargetSystemID">

Note the way the identification of the system is used BRMCUSTService. If your application is not (yet) registered in AIA, like PMDM, a hardcoded system identification would be more appropriate, example:

<xsl:variable name="TargetSystemID">
<xsl:choose>
<xsl:when test="boolean(/telcocustmr:CreateCustomerPartyEBM/corecom:EBMHeader/corecom:Target/corecom:ID/text())">
<xsl:value-of select="/telcocustmr:CreateCustomerPartyEBM/corecom:EBMHeader/corecom:Target/corecom:ID">
</xsl:when>
<xsl:otherwise>PMDM_01</xsl:otherwise>
</xsl:choose>
</xsl:variable>

<xsl:variable name=" SOURCE_SYSTEM " select="$TargetSystemID">


Post a Comment