Google News
logo
jBPM - Interview Questions
What is global in DRL file?
* 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.
Advertisement