In SOA 11g, to define configuration properties and values for a BPEL process, add the properties under the service component section of the composite.xml
file.
1 | < component name = "BPELProcess1" > |
2 | < implementation.bpel src = "BPELProcess1.bpel" /> |
3 | < property name = "bpel.preference.myPref" >MyCurrentValueproperty > |
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.
Run the bpel again to see if the new value got used in the process.
No comments:
Post a Comment