Though we set up the dvm in esb console,orcl:lookup-dvm() can be used in BPEL for hot configuring your mappings. One of the main advantages of dvm configurations is independence from deployment i.e for changing the mappings, there is no re-deployment needed.
There are two ways you can use orcl:lookup-dvm() in BPEL.
1) In Assign node and 2) In Transformation xsl.
Lets say the DVM is configured like Fig-1 in your ESB dvm tab under your esb console.Now in assign node, the code to assign appropriate age to name would be
<assign name="Assign_DVM>
<copy>
<from expression='orcl:lookup-dvm("SampleDVM","Name",rbi:Details/vhr:name,"Age","")'/>
<to variable="OutputVariable" part="payload" query="/ns1:Details/ns2:Employee/ns21:Age"/>
</copy>
</assign name="Assign_DVM>
In the above code, the age will be dynamically assigned for variable rbi:Details/vhr:name by using orcl:lookup-dvm() advance funtion.
In any Transformation xsl, the same logic can be used under BPEL project for dynamically mapping the Age value based on the dvm configuration.
<tns:Age>
<xsl:value-of select='orcl:lookup-dvm("SampleDVM","Name",rbi:Details/vhr:name,"Age","")'>
</tns:Age>
I hope you find this article useful.
Regards,
Amol
No comments:
Post a Comment