How to use Domain Value Map in SOA Suite 12C

When information transmits between different domains, each domain might use different codes to define a same entity. For example, one domain use country code for representing country and other domain use original country name. In this case Domain Value Map is preferable. Domain Value Map is static in nature. DVM should be specified at the design time in jdeveloper and at the run time application will perform a look for the values in the DVM (Domain Value Map).

Description of Example

Here we will perform DVM operation using File adapters. SOA application will read the city code from one file and write the city name in the other file. Follow the below steps to see how to implement Domain Value Map in SOA application.

  1. Create an application for DVM implementation. Select File -> Application -> SOA Application. Enter application name DVMApplicationDomain_Value_Map_1
  2. Click on Next and Enter project name. Select Composite With Mediator as Composite type in the next wizard.Domain_Value_Map_2
  3. Mediator creation window will open. Enter mediator name DVMMediator and select Define Interface Later as template typeDomain_Value_Map_3
  4. Now create file adapter in both lane Exposed Services and External References. Select File adapter from Technology component palate and drag and drop it in the Exposed Services laneDomain_Value_Map_4
  5. Enter the service name and select the option Define from operation and schema(specified later)Domain_Value_Map_5
  6. Click on Next and select Read File as operation type in the next wizardDomain_Value_Map_6
  7. Navigate to next wizard and enter file directory where input file will be located an also enter the name pattern of the file. File adapter will process only the files which will be matched by the pattern.Domain_Value_Map_7
  8. Click on Next and enter the polling frequency. Then define schema for file adapter in the next wizard by click on cog iconDomain_Value_Map_8
  9. Enter schema file name and directory. Choose Delimited file type in the next wizard and file description also like below screenshot.Domain_Value_Map_9
  10. Click on Next and select the options as shown in the below screenshotDomain_Value_Map_10
  11. Schema is createdDomain_Value_Map_11
  12. Drag and drop a file adapter in the External References laneDomain_Value_Map_12
  13. Select Write file as operation type for this file adapterDomain_Value_Map_13
  14. Enter configuration property of file and select same schema which is create for input file earlier in this example.Domain_Value_Map_14
  15. Now the composite will look like below screenshotDomain_Value_Map_15
  16. Create Domain Value Map for city values. Right click on the project and select From Gallery -> SOA Tier -> Transformations/Translations -> Domain Value Map(DVM)Domain_Value_Map_16
  17. DVM file creation window will open. Enter file name and initials DVM entries as per below screenshots.Domain_Value_Map_17 Domain_Value_Map_18
  18. Create mapping in the mediator between exposed service and external reference. Click on transform icon to create mapper fileDomain_Value_Map_19
  19. Select dvm:lookup from Advanced XPath -> DVM Functions in the components palate and drag and drop it in the middle lane of the mapper file.Domain_Value_Map_20
  20. Double click on the icon Domain_Value_Map_21A�and enter dvmLocation, sourceColumnName, souirceValue, targetColumnName and defaultValue as per below screenshotDomain_Value_Map_22
  21. Now mapper file will look like below screenshotDomain_Value_Map_23
  22. Save the project. SOA Composite will look like thisDomain_Value_Map_24
  23. Deploy the project and test the project in EM Console. Keep the input file in the indir directory. Use the sample file for testing in the testing folder.Domain_Value_Map_25
  24. Output file will be created in the ourdir that is specified during the configuration of file adapterDomain_Value_Map_26

Note: If business user adds another domain value with same citycode, below error will come at the time of testing.Domain_Value_Map_27 Domain_Value_Map_28

To overcome from this type of system error, qualifier will come into the picture. Refer this link for qualifier.

Leave a Reply

Your email address will not be published. Required fields are marked *

Show my latest post here