1.

What Is Global In Drl File?

Answer»

Global is the keyword used in drools to define a global variable. Global variable is the one which will be visible to all the rules inside a DRL file.

Globals must be used very carefully in a DRL file, since the changes in a global variable are not NOTIFIED to the WORKING memory. For example, you are USING a list variable as a global and in any rule you are adding a value in a list and in one particular rule, you are CHECKING if list size() > 0, then in this case rule may not FIRE. Global variable can be used for any type of object.

Global is the keyword used in drools to define a global variable. Global variable is the one which will be visible to all the rules inside a DRL file.

Globals must be used very carefully in a DRL file, since the changes in a global variable are not notified to the working memory. For example, you are using a list variable as a global and in any rule you are adding a value in a list and in one particular rule, you are checking if list size() > 0, then in this case rule may not fire. Global variable can be used for any type of object.



Discussion

No Comment Found