Friday, 6 December 2013

Set and Get Preferences in Oracle SOA Suite 11G


Hello Folks.

Now we will learn how to set Preference Dynamically in SOA composite.
This will be usable to change the Filename or Email or whatever in any environment run-time. 

       Preference is like a variable, whose value can be changed from EM console requiring no code change. 
      Open "Composite.xml".
        Set the preference in the component tag as a property tag.


       Double click on BPEL process drop an assign activity.
      Double click on assign activity and set result in output as mentioned below.

           Complete the BPEL and Deploy it.

Changing Preferences from EM-Console

       In EM-Console right click on SOA-infra à
Administrator à system MBEAN Browser.

       Go to oracle.soa.configàServer : AdminServer à SCA Component à select your project à SCAComposite.SCAComponent.

    Double click on your BPEL process displayed à Go to the properties in attributes tab.




       In this, you can change the preferences whatever you want in run-time.
There is no code change, No server restart required.

If you restart the server the preference value reset to old one, To be on the same value even after your server restart, you can do one step below.

After clicking "Apply" click "Return".
       Go to the "Operations" tab and click on the "Save" operation. Click "Invoke" and "Return".



Now if you restart the server you will get the same old value.

In case if you are working in cluster environment you should change the preference value in both the Nodes and do the above step in both the nodes.

Happy Learning......!!!!!!!!!!!!      Fun Sharing..............!!!!!!!!!!!!!!


1 comment: