Sunday, June 05, 2011

Business Rules-Globals in SOA Suite 11g

As per following documentation


http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10228/data_model.htm#ASRUG277


In Oracle Business Rules a global is similar to a public static variable in Java. You can specify that a global is a constant or is modifiable.

You can use global definitions to share information among several rules and functions. For example, if a 10% discount is used in several rules you can create and use a global Gold Discount, so that the appropriate discount is applied to all the rules using the global.

Using global definitions can make programs modular and easier to maintain.

In this exercise we will try to find out how to create a global and how to use it.

Go to business rules page ,Click on Global and create a new global as shown

Provide is some logical name and provide appropriate values as per your requirement.




Now we can use this global in our function to be used.

We will use the same function as we have created in our previous exercise and will see how this global can be used in our case.



Here you can see a new property discount is also coming in the list of attributes.

We will select that value and see what is the result.

My function will now look like this.




The previous two assign activity has nothing to do with it ,it is there as i have used it in my previous function.

I will test it to get he result.This is the result i have got.

2 comments:

Anonymous said...

dou youn know how to build and specify the values os a Global of List type?

thanks

Mikku said...

I have not used it ever,Can you let me know what exactly is your requirement ,May be then i can suggest you.