October 28, 2009 20 Comments
In Oracle Bpel 10g we had the functionality to add preferences to your bpel process.
By adding the next xml to the bpel.xml file we could get the value as variable into our process and change the value from the console.
<preferences> <property name="myPref">MyCurrentValue</property> </preferences>
In the new Oracle SOA 11g things changed a little but. Like Marc already described in his blog we now need to add the preferences to the composite.xml of our Composite Application.
Add the next xml to the composite.xml :
<component name="BPELProcess1"> <implementation.bpel src="BPELProcess1.bpel"/> <property name="bpel.preference.myPref">MyCurrentValue</property> </component>
Now we can use the function ora:getPreference(myPref) in our bpel process to retrieve the value of the preference.
Watch the naming convention. It expects it to start with “bpel.preference”.
Create the composite application and deploy it.
We only added an assign to the flow which will get assign the value of the preference to the outputVariable.
Run the bpel and check if the value of ‘MyCurrentValue’ is in the outputVariable.
In Oracle SOA Suite 10g we could change the value of the preferences from the bpel console.
In Oracle SOA Suite 11g things changed a but, we got a new fancy console to manage all the components.
To change to values from the prefences go to the ‘Enterprise Manager’ (http://localhost:7001/em).
On the left go to :
Farm_soa_domain > Weblogic Domain > soa_domain > right mouseclick and select ‘System MBean Browser’.
Navigate to Application Defined MBeans > oracle.soa.config > Server : soa_server1 > SCAComposite > your_project > SCAComposite.SCAComponent > your bpel_process.
Select the Attribute ‘Properties’.
Change the value of our preference and click apply.