Friday, March 2, 2012

How to Set and Get Preferences in SOA 11G

For your reference visit

http://www.xenta.nl/blog/2009/10/28/oracle-soa-suite-11g-setting-and-getting-preferences/

In SOA 11g we had the functionality to add preferences to our bpel process.

By adding below property in composite.xml we could get the value as variable into our BPEL process and
Later we can change the value from the EM console.

<component name="Helloworld">
    <implementation.bpel src="Helloworld.bpel"/>
    <property name="bpel.preference.MyPreference">Value</property>
</component>

Now we can use this MyPreference value in our BPEL process by using the following function

ora:getPreference(MyPreference)

=====================================
(Sample for initializing MyPreference value to Temp variable as per BPEL 2.0 Spec)

<Assign>
     <copy>
        <from>ora:getPreference(MyPreference)</from>
        <to>$Temp</to>
     </copy>
</Assign>
======================================

After deployment we can change these preference values in EM console.

Follow below steps to change the preference values .

Step1: Open em console

Step2:

On the left go to :
Farm_soa_domain > Weblogic Domain > soa_domain > right mouseclick and select 'System MBean Browser'.

mbean

Step3:

Navigate to Application Defined MBeans > oracle.soa.config > Server : soa_server1 > SCAComposite > your_project > SCAComposite.SCAComponent > your bpel_process.
Select the Attribute 'Properties'.

properties

Step4:

Change the value of your preference and click apply.


preference

No comments:

Post a Comment