[rules-users] Globals and Boolean object

vdelbart delbart.v at mipih.fr
Tue Sep 18 09:39:06 EDT 2007


Hi, 

My rule is :
#created on: 29 août 2007
package example

#list any import classes here.
global Boolean test

rule "Your Third Rule"
	#include attributes such as "salience" here...
	when
	then 
		#actions
		test = true;
		System.out.println("OK-" + test);
end

In my java codes, I have :

session.setGlobal("test", new Boolean(false));
System.out.println("global " + session.getGlobal("test"));
session.fireAllRules();
System.out.println("global " + session.getGlobal("test"));

I expect this :
global false
OK-true
global true

but I have :
global false
OK-true
global false

Anybody have a solution to manipulate Boolean object in globals ?


thanks,

V.


-- 
View this message in context: http://www.nabble.com/Globals-and-Boolean-object-tf4474442.html#a12757328
Sent from the drools - user mailing list archive at Nabble.com.





More information about the rules-users mailing list