re[rules-users] -use of an object used in a previous rule

Mounir Chattou mcbaco at hotmail.fr
Tue Jun 10 04:34:09 EDT 2008


Hi,
I have a problem : a fact is inserted in a rule but when I cast for it in
another, nothing happened, here is a simplified code to understand better :

rule "eco"
ruleflow-group "economic"
salience 20
	when
        a : Alpha()
	then 
		Beta beta = new Beta()
		beta.add(a)
		beta.setStatus("eco")     // the property status is setted
		insert(beta)
end

rule "fl eco"
ruleflow-group "economic"
salience 20
	when 
		f : Fl ()			
	then
		Fl fl = new Fl();
		fl.add(f);
		fl.setStatus("eco")        // the property status is setted
		insert(fl)
end


rule "pack eco"
ruleflow-group "economic"
	when
	f : Fl(status == "eco")           //those two conditions are never casted
... while I inserted the facts
    	a : Alpha(status == "eco") 
    then
        
end


Could someone explain me why ?
-- 
View this message in context: http://www.nabble.com/re-use-of-an-object-used-in-a-previous-rule-tp17750384p17750384.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list