Monday, November 21, 2011

Using Preference in Oracle SOA 11g

In the Oracle SOA 11g, how can we config the timeout of a callback service at runtime? Where can we put these property? A preferences in composite.xml will solve these questions in BPEL process.


Where to add?
In the composite.xml, locate the component element.

  <component name="SubmitOrder" version="2.0">
    <implementation.bpel src="SubmitOrder.bpel"/>
    <property name="bpel.preference.timeout">PT90S</property>
  </component>


Then we can use the function ora:getPreference(preferenceName) in a bpel process.

Note: The preference have a prefix and you doesn't need it when you reference it. The prefix is 'bpel.preference'.

How to config it in production?
In Oracle SOA Suite 11g, we can change the value of prefences with Enterprise Manager, which url is http://hostname:port/em.

1. Find the SOA domain, in my example, it is Farm_soa_domain\Weblogic Domain\soa_domain
2. Right click on the domain name and select ‘System MBean Browser’ from the popup menu.
4. From the right frame, locate your component. The navigate path is
Application Defined MBeans\oracle.soa.config\Server:{server name}\SCAComposite\{project name}\SCAComposite.SCAComponent\{component name}.

5. Click on the Attribute 'Properties', the preference will be displayed.

You can modified it and apply the new value to that property.