How to use Domain Value Maps in Oracle Service Bus
Let’s see how to use DVM in Service Bus Project.
Let’s suppose we already have a Service Bus Project. In the project, create a DVM with name Country.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.
Click on the Replace activity in Response pipeline and configure provide expression as below:
lookup is the DVM function that is used to get value from DVM
The lookup function takes five parameter as below:
1) DVM Path: Location of the DVM file
2) Source Column: This parameter represents the source column in DVM, in this case CountryCode
3) Source Value: The parameter should map with the actual values coming from source system, in this case country code will be the input of our service
4) Target Column: This parameter represents the source column in DVM, in this case CountryName
5) Default value: Configure the default value when country code does not found in DVM.
This is how the DVM can be configured in Oracle Service Bus pipleline.
This is time to test Service.
Enter the country code(IN) which exist in DVM and click on Execute button
see the Country Name(India) corresponding to the Country Code(IN) should fetch from DVM.
Run service again and enter country code which doesn’t exist in the DVM
This is how Data Value Map(DVM) can be used in Oracle Service Bus.
Thank you Ankur for this post. Could you pleas share a post to fetch DVM value using Xquery? Regards,Sanddy