Advertisements



Service Bus 12c – Using Domain Value Maps (DVM)

In this post, you will learn to use Domain Value Maps (DVM) in message flow.

We consider the business requirement of performing Address Validation in message flow based on a configurable property and we use DVM to store this Configurable Property.

Creating Domain Value Map (DVM)

Create a new folder named DVM in XYZCustomer project. Right click DVM folder and select New -> Domain Value Map.

clip_image001 

Give Config as File Name and give DVM entries as shown below. The domain name PropertyName represents Configurable Properties and the domain PropertyValue represents configurable property values respectively.

Using this DVM, you can extend the same logic to any number of configurable properties in your Service Bus Application. For our requirement, give property name as ValidateAddress and set it’s initial value as Y.

clip_image003

Click OK to bring up DVM editor.

clip_image005

You can use JDeveloper to modify DVM or you can also modify it in sbconsole. Remember you need to create a session before modifying anything.

clip_image007

Using DVM in Message Flow

Drag Stage node into Stages placeholder of Request Pipeline and set name as AddrValidation in Properties tab.

clip_image009

Drag Assign activity into AddrValidation stage from Message Processing. Bring up expression builder for Value property and give expression as shown below. Alternatively you can select the function from Functions -> Custom XPath Functions -> Dvm functions. Make sure that you give complete qualified path of DVM containing Service Bus Project name too.

clip_image011

Set Variable property as ConfigVar. Now your Properties tab should look like below.

clip_image013

Address Validation business service should be invoked only when the value of this configuration property ‘Y’. So drag If Then activity into AddrValidation stage after Assign from Flow Control and set condition as $ConfigVar=’Y’.

clip_image015

Service Bus provides Service Callout, Routing and Publish activities to route incoming request to an appropriate business service. Routing and Service Callout are used for Synchronous where as Publish activity is used for one-way communication.

Routing node always depicts end of message flow so you can’t place any activities after Routing node. Hence use Service Callout for all intermediate service calls in pipeline. Drag Service Callout from Communication into If Then branch as shown below.

clip_image017

In Properties tab, browse and select AddrValidationServiceBS for Service property.

clip_image019

Advertisements

7 Responses to “Service Bus 12c – Using Domain Value Maps (DVM)”


  1. 1 ankesh kumar February 24, 2017 at 4:33 PM

    Hi siva i am also getting null pointer exception while trying to access dvm i am using lookup value function as {dvm:lookupValue(‘Payment/Transformations/error_servererror.dvm’,’errorcodes’,’OSB-380001′, ‘errordescription’,
    ‘error not captured please view log for detail’)}
    and i have kept dvm im transformation folder.

  2. 3 Anonymous March 9, 2016 at 1:40 PM

    pls find the below exception continues to above post

    Caused by: java.lang.NullPointerException
    at com.bea.wli.sb.functions.dvm.DVMFunctions.stripDvmExtension(DVMFunctions.java:125)
    at com.bea.wli.sb.functions.dvm.DVMFunctions.lookupValue(DVMFunctions.java:41)

  3. 5 Anonymous March 9, 2016 at 1:39 PM

    hi Siva I am getting an exception like java NULL Pointer exception. when i am executing dvm


  1. 1 Service Bus 12c – Series of Articles by Siva | SOA Community Blog Trackback on February 19, 2015 at 12:20 PM
  2. 2 Service Bus 12c – Series of Articles | Siva's Blog Trackback on October 30, 2014 at 1:33 PM

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




Advertisements

Pages

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 349 other followers

Enter your email address to follow this blog and receive notifications of new posts by email.