Monday 8 January 2018

Working with DVM in Oracle SOA Suite 12C

Here we will see how to create and use DVM’s in oracle SOA Suite 12C.
DVM is an interesting topic in Oracle SOA Suite which will allow you to map values used in one domain for specific field to the value used in other doamin for same field.
For example some domains might use the code as country (IN), where as the other doamin can use the complete name as the country (INDIA) . In these cases we can use domain value maps.
If any time you want to change these dvm values or add any any values to your DVM, then you no need to do the code change , you can change these values runtime in soa composer.
 My input:-
dvm
My Output :-
dvm1
Now I have created a synchronous BPEL process with above schema and named it as “DvmBPELProcess”
dvm2.JPG
Now Right click on the project and go to new and click on “DomainValueMap(DVM)” to create a dvm file.
dvm3
It will open a new window , provide file name for dvm, doamin name , domain value and click on OK.
dvm4
Country DVM will gets created, now you can add the rest country’s and SAVE.
dvm5
For using this dvm file in your bpel process you have to use the below function.
dvm:lookupValue(dvmMetadataURI as string, SourceColumnName as string, SourceValue as string, TargetColumnName as string, DefaultValue as string) as string
As per above function it will take the dvm name and source column and source value to be looked in the dvm and target column name which value has to be derived from DVM.
Now open your BPEL process and we have to manipulate the Country code to pick the value from DVM and send to output.
Our expression looks like this .
dvm:lookupValue(“Country.dvm”,”CountryCode”,$inputVariable.payload/client:CountryCode,”CountryName”,””)
dvm6dvm7
Now click Ok , SAVE all and deploy the code and test the results.
Input –>
dvm8
Output –>
dvm9
Checking the DVM in SOA Composer –>
Login to your soa composer and open the project , you will find Country.dvm
dvm10
Click on the DVM , here you can create and update the existing maps SAVE and then Publish.
dvm11

2 comments: