Oracle SOA Suite 11g, Setting and Getting Preferences

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.

  <property name="myPref">MyCurrentValue</property>

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>

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.


About Eric Elzinga
Eric Elzinga I'm an integration consultant located in The Netherlands. Mainly doing projects based on Oracle integration stacks (Oracle SOA Suite/Oracle Service Bus (OSB)), Java development, and opensource integration products.

20 Responses to Oracle SOA Suite 11g, Setting and Getting Preferences

  1. brad moreland says:

    This was very helpful to me. I had an SR open with oracle support for over a month and they never did figure this out. Thanks for the solution!

  2. Matt Hill says:

    This didn’t work for me until I used single quotes in the getPreference function:

  3. Hi Eric,

    you can also add these properties to the *.componentType file of the bpel component. and use preference.XXX as name instead of bpel.preference.XXX

    <componentType xmlns=";
    <property name="preference.ok" type="xs:string"

    and use this ora:getPreference(‘ok’)

  4. LFB says:

    And to set the value of preference in the BPEL process?
    Something like ora:setPreference?

    • Eric Elzinga says:

      Hm i don’t think you can from within the bpel itself.

      • LFB says:

        I think it is possible to customize the BPEL Functions within ExpressionBuilder, and so to create a setPreference as the getPreference code.

      • Moshe says:

        I see that these prefeerence value does not withstant server bounce . They are rest back to the old values automatically after the bounce.This was not the case in 10g. Can any one suggest.

    • anuppaniPani says:

      Were you able to figure out how to modify the Preference value during runtime? I am thinking if I should write some java routine to do this.

      • Eric Elzinga says:

        That could be an option indeed. Should be possible to connect to the mbean from a java callout

  5. Pingback: SOA 11g: Migration FAQ / Best practice | Service Oriented Architecture - SOA

  6. Pingback: Oracle SOA Suite 11g, Setting and Getting Preferences | Oracle .. Java .. OpenSource .. SOA

  7. Pingback: Techno Babble LOCAL

  8. Pingback: Techno Babble

  9. Moshe says:

    I see that these preference value does not withstant server bounce . They are rest back to the old values automatically after the bounce.This was not the case in 10g. Can any one suggest on how to make this withstand server bounce.It should not get reset after the bounce.

  10. Pingback: Persisting Component Preferences in Oracle SOA Suite 11g « Oracle Technologies Premier

  11. santhosh reddy says:

    thanku vaermuch….really itz very useful .

  12. oscarrays says:

    Great post. Is it possible to set some of these preferences in configuration plan, so I can deploy using a different config plan as I migrate from one environment to another?

  13. Vikas says:

    Thanks for the post. Can you let us know if this preference
    property can be encrypted??

  14. Isai Galindo says:

    how put composite preference property to bpel?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: