Sunday, June 19, 2011

How to create DVM in SOA Suite 11g

Domain value mapping or DVM as the name suggest ,it mean a mapping of values among different domains.

Let suppose we have two domain in our integration

One end we have finance domain and other end we have Security Domain

So there might be a case that finance domain will ask for two different fields as

Fname and Lname so if your name is Anil kumar you will put Fname as Anil and Lname as Kumar

But again we have full chance that in Secutiry domain we will not have the same concept of

Fname and Lname but instead there will be only one filed Name so how it will map the Fname and Lname to Name they must be some mapping file which i should refer to understand these things that mapping file is our Domain Value mapping.We will see how we can create a dvm and we will see how we can use it in our process.


In order to create a DVM click on your project then go to File-->New

then choose in SOA Tier-->Transforamtion on left side and DVM on right side as shown below



When you will say next it will come up with a page with two default values for dvm which i have changed in my case as per my requirement.



So once you will say ok you will get a tabular column something like this.

To make it meaningful i have defined two domain

one is code that contains the code for the Country

and other is the name of the country as you can see.




Now i will just create a simple process to show its functionality.

My simple process consist of a mediator and a file adpater as you can see below.

I am just taking an input data to initiate the process then in the mediator i am using the DVM function and then a file adapter to write the data in a file.

We can use the DVM in a xsl file.So we will create a transformation as shown in the picture.




Now once your transformation comes up.

In the component pallete Choose advanced and then choose DVM Function

There you will get two attributes

lookupValue and lookupValue1M

If you want to pass a default value also in case there is no mapping for DVM you can use lookupValue however in my case i am using lookupValue1M.

Everything should be clear from the screenshots.

I have chosen my code as IN so i should get back as result India in my file adapter.



And this is the result i got.

No comments: