Advertisements
RSS

How to use the Domain Value Map (DVM) in Oracle Service Bus 12c

26 Feb

Introduction

Due to the tighter integration of Oracle Service Bus 12c in the whole Oracle SOA Suite product it’s now much easier for developers to use general SOA Suite components like the Domain Value Map (DVM).

Getting Started

First I use the OSB 12c clone project ability to copy th earlier created/blogged OSB 12c Database adapter project and create a project named GetCaseServiceDVM. In the new project we add a Domain Value Map (DVM):

01

The file name and description speak for themself. The Initial DVM Entries forces us to define the minimum amount of 2 domain names (source and target of our value) and if we want we can inmediately configure the 1st record here.

02

The result is a DVM file in our project which we can easily edit within JDeveloper 12c.
For this blogpost we will add 2 records which will allow us to translate the value “1” and “2” which we receive from the database to a basic description of that value.

03

In our XSLT transformation we can drag the DVMFunctions:lookupValue on our canvas.
(You can easily find the function using the search function in components)

04

05

Finally we can configure the DVM input fields with the 5 arguments:

  1. The relative path (including the SBProject to your DVM file without mentioning the .DVM extension)
  2. Source table
  3. mapping of the input element we want to translate
  4. Target table to retrieve that specific output value
  5. Default value, in case no match was found in the DVM

06

In the source code of the XSLT this will look like this:

<tns:Type id="{/ns0:OutputParameters/ns0:GET_CASE_BY_CASENUMBER/ns0:CASETYPE}">
<xsl:value-of select='DVMFunctions:lookupValue ("GetCaseServiceDVM/CaseType", "Type", string (/ns0:OutputParameters/ns0:GET_CASE_BY_CASENUMBER/ns0:CASETYPE ), "Description", "Unknown" )'/>
</tns:Type>

If we test the result we see that the source element with value “2” is succesfully translated to the “Claim” value.

10

Advertisements
 
3 Comments

Posted by on 26-02-2015 in Oracle, OSB

 

Tags: ,

3 responses to “How to use the Domain Value Map (DVM) in Oracle Service Bus 12c

  1. Gouda

    15-02-2016 at 15:59

    can we get the sample code?
    for DVM OSB

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: