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.
Create a 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.
Configure the Replace property like below:
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!
For example, Source system might represent a country with a code while target system may represent a country with the country Name.
Create a 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.
Configure the Replace property like below:
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!
Tidak ada komentar:
Posting Komentar