Disclaimer : This blog space does not necessarily reflect my views/ideas on the technology and beyond doubt, never reflects the views of my employer.

Tuesday, September 23, 2008

Domain Value Mapping in Oracle ESB

First of all, DVM is one of the features that will remain as a part of Oracle Service Bus in future. But yes, I’m not going to discuss how to create Domain Value Mapping (DVM) in ESB control. I will try to put some other information I have been working on and I have observed.

In a real time scenario there it is very common that two applications being integrated use two different values to represent the same information. Creating DVMs helps to hold a specific category of value mappings among multiple applications. Thus, multiple DVMs which are available across multiple applications enable you to associate values from one application with values from another.

Once DVM is created, you can find the metadata file at \integration\esb\oraesb\artifacts\store\metadata\files\dvm\.xml.def.xml. you can observe that xml file name contains data is stored in property “displayname” as below



The file containing DVM data can be found at \integration\esb\oraesb\artifacts\store\content\files\dvm\.xml. The typical DVM data file looks like below

< ?xml version = '1.0' encoding = 'UTF-8'?>
< name="StateCodes" isnew="null">
<>Mapping of state names, abbreviations, and codes < /description>
  <>  < name="Long">< name="Abbrev">< name="Short">  < /columns>
  <>
    <> <>Massachusetts< /cell>Mass< /cell><>MA< /cell>< /row>
    <> <>California< /cell><>Calif< /cell><>CA< /cell>< /row>
  < /rows>  < /dvm>


You can always create the similar xml files manually. Just make sure that you keep the name of the file similar to the name attribute in DVM tag. Then you can simply import this new DVM in the ESB Console.

What looks like below at the design time,



Looks like below in the Source XSL file

<>match="/">

< select="/imp1:Root/imp1:name">

< /imp1:name> <>

< select="orcl:lookup-dvm('Country','FullName',/imp1:Root/imp1:country,'ShortName',">

< /imp1:country> < /imp1:Root> < /xsl:template>




If you know only BPEL and ESB (or say the well-known SOA Suite), then you may also like to note that DVMs is used in implementation of AIA also.


So, is it the end of discussing DVM ? No, one last point. Typically in real time scenario, at the starting of development, you will get the list of code-value pair and generally they are very large in number. So, be prepared to create some Java program to make it .xml file which can be imported in ESB Console instead of entering all the code-value pair.


So, are you ready to work with DVMs?


Cheers

Nirav

2 comments:

Unknown said...

It seems like some XML contents are missing and has not become visible.

rmouniak said...

This blog gives very important info ,thanks for sharning
Oracle SOA Online Training Bangalore