Domain value maps are a way of storing lookup values in SOA server such that these lookup values can be easily edited at run time using SOA console, shared across composites and stored in MDS. Creation of MDS is done using Oracle JDeveloper and once it is deployed onto the SOA server, its values can be easily modified and managed using SOA console.
In this example, we have a simple BPEL project which takes an input country name and returns the relevant country code back to the user by using a DVM to look up the country code.
Create a new SOA project
Select a simple BPEL template to create a composite. You can try using DVM from other components on your own.
Hello DVM Project
Create a Hello DVM project.
Hello DVM BPEL
Give HelloDVMBPEL as the BPEL process name. Make sure to select synchronous process with default input and output.
Modify the default XSD so that your process takes country name as input and returns a valid country code as response.
Create a new DVM
Create a new DVM by right clicking the project or transformations folder in JDeveloper and create a DVM as shown below.
DVM Config options
Enter name and default fields of the DVM as shown.
Enter DVM values for the dvm as shown below.
Add a simple assign activity between recieve and reply activities of BPEL. Assign activity will look like below after the expression is added.
Use the dvm lookup function as shown below. Compile and deploy the process onto the server.
From EM console, test the composite by providing a valid country name like INDIA.
You should get a valid response after looking up the value from DVM.
Go to SOA Composer – /soa/composer url on your SOA server – and open the dvm file you have deployed. Add new domain values to it.
Commit changes in the composer
Make sure to save and commit your changes to the DVM.
Test with new value
Test the process with the value you just added.
If the changes to DVM is successfully committed, you should get a valid response..