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

Corneil du Plessis corneil at tsctech.com
Tue Jun 10 10:52:00 EDT 2008


I can't see where you insert an object of type Alpha that would fire 'pack
eco' 

-----Original Message-----
From: rules-users-bounces at lists.jboss.org
[mailto:rules-users-bounces at lists.jboss.org] On Behalf Of Mounir Chattou
Sent: 10 June 2008 10:34
To: rules-users at lists.jboss.org
Subject: re[rules-users] -use of an object used in a previous rule


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-tp17750384
p17750384.html
Sent from the drools - user mailing list archive at Nabble.com.

_______________________________________________
rules-users mailing list
rules-users at lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list