Oracle Domain Value Maps and Business Rules runtime edit with SOA Composer

Last week there was a question on the forum how to add values to the domain value maps on runtime.
In the Oracle SOA Suite 10g we could maintain those values from the console.
In Fusion 11g it’s a little bit different.

Oracle now supplies us a new tool called SOA Composer (patch set 1). This new tool can be used to maintain both rules and domain value maps at runtime.

  1. Create a new composite and add a dvm to it
  2. Create a new dvm

  3. Select the project, goto File > New > SOA Tier > Transformation > Domain Value Map

  4. Create the transformation in the mediator and connect the dvm
  5.   <xsl:template match="/">
        <inp1:CountryInfo>
          <inp1:Code>
            <xsl:value-of select="/inp1:Input/inp1:Code"/>
          </inp1:Code>
          <inp1:Fullname>
            <xsl:value-of select="dvm:lookupValue(&quot;Countries.dvm&quot;,&quot;CODE&quot;,/inp1:Input/inp1:Code,&quot;Fullname&quot;,'not mapped')"/>
          </inp1:Fullname>
        </inp1:CountryInfo>
      </xsl:template>
    

Now deploy the composite and do a little test to see if the dvm works.

In my case it generated the file ‘my_dvm_out_1.txt’ with the next content :

<?xml version="1.0" encoding="UTF-8" ?><inp1:CountryInfo xmlns:inp1="http://xmlns.oracle.com/singleString" xmlns="http://xmlns.oracle.com/singleString">
   <inp1:Code>NL</inp1:Code>
   <inp1:Fullname>Netherlands</inp1:Fullname>
</inp1:CountryInfo>

Test again from the console with the code DE. Content of my file :

<?xml version="1.0" encoding="UTF-8" ?><inp1:CountryInfo xmlns:inp1="http://xmlns.oracle.com/singleString" xmlns="http://xmlns.oracle.com/singleString">
   <inp1:Code>DE</inp1:Code>
   <inp1:Fullname>not mapped</inp1:Fullname>
</inp1:CountryInfo>

Time to add the dvm lookup for code DE.

SOA Composer
The SOA Composer can be found at: http://hostname:port_of_soa_managed_server/soa/composer
Login into the console and go to Open > Open DVM. Open the correct DVM.

Click Edit at top and click the green arrow to add a new lookup.


Last step is to commit the changed dvm (without redeploy).

Let’s test the process again and check the content of file.

<?xml version="1.0" encoding="UTF-8" ?><inp1:CountryInfo xmlns:inp1="http://xmlns.oracle.com/singleString" xmlns="http://xmlns.oracle.com/singleString">
   <inp1:Code>DE</inp1:Code>
   <inp1:Fullname>Deutschland</inp1:Fullname>
</inp1:CountryInfo>

Looks like it works.

Nice new tool from Oracle, available in the new patchset 1 of SOA Suite 11g.

About these ads

About Eric Elzinga
Eric Elzinga I'm an integration consultant located in The Netherlands. Mainly doing projects based on Oracle integration stacks (Oracle SOA Suite/Oracle Service Bus (OSB)), Java development, and opensource integration products.

4 Responses to Oracle Domain Value Maps and Business Rules runtime edit with SOA Composer

  1. Pingback: Oracle Domain Value Maps and Business Rules runtime edit with SOA Composer | Oracle .. Java .. OpenSource .. SOA

  2. Jawahar says:

    Nice article.

    I have follwed the given steps and it is working till the add operation. but when we commit saved rows in edit operation , the change is not get reflected and throwing exception. Can I have help here?

    • Eric Elzinga says:

      Can you show me part of the stacktrace ?

      • Jawahar says:

        Thanks eric, PFB
        Expected ‘]’ instead of ’1.0′.
        oracle.xml.xpath.XPathException: Expected ‘]’ instead of ’1.0′.
        at oracle.xml.xpath.XPathPredicate.(XPathPredicate.java:79)
        at oracle.xml.xpath.XPathStep.(XPathStep.java:311)
        at oracle.xml.xpath.PathExpr.(XSLNodeSetExpr.java:630)
        at oracle.xml.xpath.PathExpr.parse(XSLNodeSetExpr.java:669)
        at oracle.xml.xpath.IntersectExceptExpr.parse(XSLNodeSetExpr.java:407)
        at oracle.xml.xpath.XSLNodeSetExpr.parse(XSLNodeSetExpr.java:207)
        at oracle.xml.xpath.UnaryExpr.parse(XSLExpr.java:1808)
        at oracle.xml.xpath.AdditiveExpr.parseMultExpr(XSLExpr.java:1692)
        at oracle.xml.xpath.AdditiveExpr.parse(XSLExpr.java:1667)
        at oracle.xml.xpath.ComparisonExpr.parse(XSLExpr.java:1374)
        at oracle.xml.xpath.AndExpr.parse(XSLExpr.java:389)
        at oracle.xml.xpath.OrExpr.parse(XSLExpr.java:285)
        at oracle.xml.xpath.ExprSingle.parse(XSLExpr.java:266)
        at oracle.xml.xpath.XSLExpr.parse(XSLExpr.java:150)
        at oracle.xml.xpath.XSLExprBase.createExpression(XSLExprBase.java:181)
        at oracle.xml.parser.v2.XMLNode.selectNodes(XMLNode.java:2474)
        at oracle.tip.dvm.sdk.util.XMLUtil.isDVMDocumentValid(XMLUtil.java:187)
        at oracle.tip.dvm.sdk.DVMObject.initialize(DVMObject.java:187)
        at oracle.tip.dvm.sdk.DVMObject.(DVMObject.java:135)
        at oracle.integration.dvm.model.DVMHandler.setDetails(DVMHandler.java:77
        )
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
        java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
        sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyU
        tilsBean.java:1773)
        at org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(Prop
        ertyUtilsBean.java:1759)
        at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
        Utils.java:577)
        at oracle.adfinternal.controller.beans.ManagedBeanFactory.setSimplePrope
        rty(ManagedBeanFactory.java:308)
        at oracle.adfinternal.controller.beans.ManagedBeanFactory.setManagedProp
        erties(ManagedBeanFactory.java:262)
        at oracle.adfinternal.controller.beans.ManagedBeanFactory.newInstance(Ma
        nagedBeanFactory.java:203)
        at oracle.adfinternal.controller.beans.ManagedBeanFactory.instantiateBea
        n(ManagedBeanFactory.java:860)
        at oracle.adfinternal.controller.state.ScopeMap.get(ScopeMap.java:82)
        at javax.el.MapELResolver.getValue(MapELResolver.java:164)
        at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:143)
        at com.sun.faces.el.FacesCompositeELResolver.getValue(FacesCompositeELRe
        solver.java:72)
        at com.sun.el.parser.AstValue.getValue(AstValue.java:118)
        at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)

        at org.apache.myfaces.trinidadinternal.taglib.ForEachTag.doStartTag(ForE
        achTag.java:117)
        at jsp_servlet.__dvm_jsff._jspx___tag5(__dvm_jsff.java:344)
        at jsp_servlet.__dvm_jsff._jspx___tag4(__dvm_jsff.java:306)
        at jsp_servlet.__dvm_jsff._jspx___tag3(__dvm_jsff.java:256)
        at jsp_servlet.__dvm_jsff._jspx___tag2(__dvm_jsff.java:205)
        at jsp_servlet.__dvm_jsff._jspx___tag1(__dvm_jsff.java:150)
        at jsp_servlet.__dvm_jsff._jspService(__dvm_jsff.java:67)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
        (StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
        tyHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
        a:300)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
        a:183)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(Request
        DispatcherImpl.java:526)
        at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
        cherImpl.java:447)
        at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163
        )
        at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184
        )
        at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(Incl
        udeTag.java:440)
        at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTa
        g.java:153)
        at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTa
        g.java:128)
        at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRe
        gion.java:492)
        at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(Regi
        onTag.java:127)
        at jsp_servlet.__workspace_jsff._jspx___tag18(__workspace_jsff.java:1037
        )
        at jsp_servlet.__workspace_jsff._jspx___tag17(__workspace_jsff.java:1003
        )
        at jsp_servlet.__workspace_jsff._jspx___tag16(__workspace_jsff.java:958)

        at jsp_servlet.__workspace_jsff._jspx___tag15(__workspace_jsff.java:914)

        at jsp_servlet.__workspace_jsff._jspx___tag14(__workspace_jsff.java:869)

        at jsp_servlet.__workspace_jsff._jspx___tag13(__workspace_jsff.java:818)

        at jsp_servlet.__workspace_jsff._jspx___tag12(__workspace_jsff.java:765)

        at jsp_servlet.__workspace_jsff._jspx___tag11(__workspace_jsff.java:721)

        at jsp_servlet.__workspace_jsff._jspService(__workspace_jsff.java:376)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
        (StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
        tyHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
        a:300)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
        a:183)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(Request
        DispatcherImpl.java:526)
        at weblogic.servlet.internal.RequestDispatcherImpl.include(RequestDispat
        cherImpl.java:447)
        at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:163
        )
        at weblogic.servlet.jsp.PageContextImpl.include(PageContextImpl.java:184
        )
        at oracle.adfinternal.view.faces.taglib.region.IncludeTag.__include(Incl
        udeTag.java:440)
        at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTa
        g.java:153)
        at oracle.adfinternal.view.faces.taglib.region.RegionTag$1.call(RegionTa
        g.java:128)
        at oracle.adf.view.rich.component.fragment.UIXRegion.processRegion(UIXRe
        gion.java:492)
        at oracle.adfinternal.view.faces.taglib.region.RegionTag.doStartTag(Regi
        onTag.java:127)
        at jsp_servlet.__home_jspx._jspx___tag5(__home_jspx.java:324)
        at jsp_servlet.__home_jspx._jspx___tag4(__home_jspx.java:290)
        at jsp_servlet.__home_jspx._jspx___tag3(__home_jspx.java:245)
        at jsp_servlet.__home_jspx._jspx___tag2(__home_jspx.java:194)
        at jsp_servlet.__home_jspx._jspx___tag0(__home_jspx.java:107)
        at jsp_servlet.__home_jspx._jspService(__home_jspx.java:65)
        at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
        (StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
        tyHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
        a:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:1
        59)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at weblogic.servlet.internal.RequestDispatcherImpl.invokeServlet(Request
        DispatcherImpl.java:527)
        at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispat
        cherImpl.java:253)
        at com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImp
        l.java:410)
        at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch
        (ExternalContextDecorator.java:44)
        at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch
        (ExternalContextDecorator.java:44)
        at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch
        (ExternalContextDecorator.java:44)
        at org.apache.myfaces.trinidad.context.ExternalContextDecorator.dispatch
        (ExternalContextDecorator.java:44)
        at org.apache.myfaces.trinidadinternal.context.FacesContextFactoryImpl$O
        verrideDispatch.dispatch(FacesContextFactoryImpl.java:267)
        at com.sun.faces.application.ViewHandlerImpl.executePageToBuildView(View
        HandlerImpl.java:473)
        at com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.
        java:141)
        at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrap
        per.java:189)
        at org.apache.myfaces.trinidadinternal.application.ViewHandlerImpl.rende
        rView(ViewHandlerImpl.java:193)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._renderResponse
        (LifecycleImpl.java:710)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(L
        ifecycleImpl.java:273)
        at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.render(Lifecycl
        eImpl.java:205)
        at javax.faces.webapp.FacesServlet.service(FacesServlet.java:266)
        at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run
        (StubSecurityHelper.java:227)
        at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecuri
        tyHelper.java:125)
        at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.jav
        a:300)
        at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.j
        ava:191)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter
        (RegistrationFilter.java:97)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
        istChain.doFilter(TrinidadFilterImpl.java:420)
        at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter
        .java:60)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterL
        istChain.doFilter(TrinidadFilterImpl.java:420)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilt
        erImpl(TrinidadFilterImpl.java:247)
        at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilte
        r(TrinidadFilterImpl.java:157)
        at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFi
        lter.java:92)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:94)
        at java.security.AccessController.doPrivileged(Native Method)
        at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:31
        3)
        at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUt
        il.java:414)
        at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:1
        38)
        at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:1
        59)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at oracle.dms.wls.DMSServletFilter.doFilter(DMSServletFilter.java:330)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsF
        ilter.java:27)
        at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.ja
        va:56)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
        n.doIt(WebAppServletContext.java:3684)
        at weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
        n.run(WebAppServletContext.java:3650)
        at weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
        dSubject.java:321)
        at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
        121)
        at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppS
        ervletContext.java:2268)
        at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletC
        ontext.java:2174)
        at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.j
        ava:1446)
        at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)

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

Follow

Get every new post delivered to your Inbox.

Join 37 other followers

%d bloggers like this: