Thursday, February 23, 2012

Changing properties of a BPEL process at runtime

Often it is useful to be able to set properties influencing behavior of a BPEL process after it has been deployed. Of course, a danger with changing settings at runtime is that they also need to be applied to the development branche in order to avoid the changes to be overwritten at redeployment of a process. Oracle provides several mechanisms of changing settings of a BPEL process at runtime. I will illustrate two of them below.

Polling for files

Suppose a path on the filesystem which is polled for files, changes. The File Adapter configuration wizard provides the option to use a logical name to specify a path;

This logical name can be set in the composite.xml;

During runtime this logical name can be changed;

This example is also explained in the SOA Suite manual and is pretty straightforward. The File Adapter properties screen displays the logical names and allows them to be changed. However, what if you want to use preferences not linked to a specific adapter service? The below example illustrates how that can be accomplished.

Other BPEL preferences

You can add preferences to the composite.xml file as shown below. The property name should start with bpel.preference

In the BPEL process you can use the preference with the ora:getPreference XPath function.

Then you can change the setting with the MBean browser by going to;
Application Defined MBeans -> oracle.soa.config -> Server : soa_server1 -> SCAComposite -> name project -> SCAComposite.SCAComponent -> name process. This is illustrated below.

Do keep in mind that the settings are reset to default once the applicationserver is restarted if you don't take additional action. See;

No comments:

Post a Comment