Overview
* See here for an overview of DVM.
* DVM can be used to supply runtime property values in Oracel ESB and BPEL applications using the following function.
orcl:lookup-dvm('Properties','Property','propertyName','Value','default value')
How to
Create DVM in ESB Console
* Login ESB console and create a new DVM file. Name first column ‘Property’ and second ‘Value’.
* Add two rows of data: Property1/Value1 and Property2/Value2
* Save DVM.
Use DVM in BPEL Diagram
* Create an wsdl file and define a property message.
<definitions targetNamespace="http://www.my.com/properties/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:tns="http://www.my.com/properties/wsdl" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"> <types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.my.com/properties/wsdl"> <xsd:complexType name="PropertiesType"> <xsd:sequence> <xsd:element name="property1" type="xsd:int"/> <xsd:element name="property2" type="xsd:string"/> </xsd:sequence> </xsd:complexType> <xsd:element name="Properties" type="tns:PropertiesType"/> </xsd:schema> </types> <message name="Properties"> <part name="PropertiesPart" element="tns:Properties"/> </message> <portType name="PropertiesPortType"> <operation name="PropertiesPT"> <input message="tns:Properties"/> <output message="tns:Properties"/> </operation> </portType> </definitions>
* Define a Partner Link using the previous wsdl document in bpel diagram.
* Define a variable named PropertiesMsg of the {http://www.my.com/properties/wsdl}Properties type bpel diagram.
* Add a Transform activity with PropertiesMsg as both source variable and target variable. Create a new xsl mapping file and populate property values with orcl:lookup-dvm() function.
<xsl:template match="/"> <tns:ITVProperties> <tns:property1> <xsl:value-of select="orcl:lookup-dvm('Properties','Property','property1','Value','Default property1 value')"/> </tns:property1> <tns:property2> <xsl:value-of select="orcl:lookup-dvm('Properties','Property','property2','Value','Default property2 value')"/> </tns:property2> </tns:ITVProperties> </xsl:template>
* Use PropertiesMsg in future bpel activities.
One Response to Use Domain Value Map (DVM) to Supply Oracle BPEL Property Values