[rules-users] Globals from functions...

bob.breitling bob.breitling at rrd.com
Wed Jul 20 18:13:06 EDT 2011


I have a global defined and I am trying to use it from a function.  When my
rule gets loaded into my knowledge base, I always get an error complaining
about the global not being resolved.  

---- simplified snippet ----

global int x;

function void foo(int n) {
    x = n;
}

------------------------------

I get this kind of error "Function Compilation error: foo (line:20) x can
not resolved".

Should this work?

TIA,

Bob

--
View this message in context: http://drools.46999.n3.nabble.com/Globals-from-functions-tp3186882p3186882.html
Sent from the Drools: User forum mailing list archive at Nabble.com.



More information about the rules-users mailing list