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.

Advertisements

Install Oracle Fusion11g repositories on 11g db

The rcu installer does a db prerequisite check on the version of the db you’re installing on.
Since i’m using the 11.1.0.6.0 version the installer would fail with the message ‘The database you are connecting is not a supported version. Enter Database with version equal to or higher than 10.2.0.4.0 in 10g or version equal to higher than 11.1.0.7.0 in 11g. Refer to the certification matrix for supported DB versions’.

Go to the file

<rcuHome>\rcu\config\ComponentInfo.xml

and find this xml

<DBPrerequisite PREREQ_TYPE="CustomSQL" DATA_TYPE="NUMBER" COMPARE_OPERATOR="EQ">
        <ValidIf  DBTYPE="ORACLE" >
        <CustomQueryFilter DATA_TYPE="NUMBER" COMPARE_OPERATOR="EQ" VALUE="0">
            select 1 from dual where exists (select column_name from dba_tab_columns where table_name(+) like 'V_$INSTANCE' and column_name(+) = 'EDITION') union select 0 from dual where not exists (select column_name from dba_tab_columns where table_name(+) like 'V_$INSTANCE' and column_name(+) = 'EDITION')
          </CustomQueryFilter>
        </ValidIf>
        <PrereqIdentifier>select count(*) from product_component_version  where product like 'Oracle%Database%'  AND version BETWEEN '11' AND '11.1.0.6.0' </PrereqIdentifier>
        <PrereqValue>0</PrereqValue>
		<PrereqErrorMsg>
				The database you are connecting is not a supported version.  Enter Database with version equal to or higher than 10.2.0.4.0 in 10g or version equal to higher than 11.1.0.7.0 in 11g. Refer to the certification matrix for supported DB versions
		  </PrereqErrorMsg>
	</DBPrerequisite>

And change the value of ‘PrereqValue’ from 0 to 1.
Run install again and it will pass the check.

Thanks to Edwin for pointing me to the file 🙂

Jumpstart for Oracle Service Bus Development

The article which i wrote together with Ronald van Luttikhuizen is posted on the OTN site.
My first one for OTN and i’m proud of it.
otn
If you still have any questions about it or other related subjects, i will be happy to help you.

link :

Jumpstart for Oracle Service Bus Development