Wednesday, 11 January 2017

How to use Domain Value Maps in Oracle Service Bus

Domain Value Maps (DVM) are an interesting feature of Oracle Service Bus for supporting Canonical Data Models. They help to map from one vocabulary, used in a given domain, to another vocabulary used in a different domain.

For example, Source system might represent a country with a code while target system may represent a country with the country Name.

DVM

Create a Country.dvm:

DVM



Below message flow show how to use DVM function to get the Country Name corresponding to the Country Code and if Country code not found then set a default message.

DVM
Configure the Replace property like below:


DVM in OSB

lookup is the DVM function that is used to get value from DVM.

Five parameter need to configure:

1) DVM Path: Location of the DVM file
2) Source Column: In our case CountryCode
3) Source Value: In our case country code will be the input of our service
4) Target Column: Which column in used to get the target value
5) Default value: Configure the default value when country code not found.


Run the Service as test the result

Enter the country code that exist in DVM



Enter the country code that doesn't exist in the DVM





Done!

1 comment:

  1. Thank you Ankur for this post. Could you pleas share a post to fetch DVM value using Xquery? Regards,Sanddy

    ReplyDelete