Oana,
Your rules seems to be correct. I also copy and pasted your sample
here and it is working.
Can you send us the stack trace for the exception or maybe a self
contained test case in a way we can investigate it better?
[]s
Edson
nicolae oana wrote:
Hi all!
Please help me with this problem: I have a class Employed ( name,
workedHours, extraHours), and two facts asserted into working memory:
Employed("Susan",10,5);
Employed("Fred",16,8);
I also have two rules. First one is ok, it fires and print the
correct results, but the second one give this error:"emp can not be
resolved "
rule "Extra Hours-Predicate Expression"
when
Employed(employedID=="Fred", extra:extraHours)
Employed(ext:extraHours ->(extra.intValue()==ext.intValue()+3))
then
System.out.println("Predicate Constraint -- extra:"+extra+"
ext:"+ext);
end
rule "allEmployedFacts"
when
Employed(emp:employedID)
then
System.out.println("Name:"+emp);
end
Please tell me what can be the problem and where I did something wrong!
Regards, Oana
------------------------------------------------------------------------
Access over 1 million songs - Yahoo! Music Unlimited.
<http://pa.yahoo.com/*http://us.rd.yahoo.com/evt=36035/*http://music.yahoo.com/unlimited/>
--
---
Edson Tirelli
Software Engineer - JBoss Rules Core Developer
Office: +55 11 3124-6000
Mobile: +55 11 9218-4151
JBoss, a division of Red Hat @ www.jboss.com
IT executives: Red Hat still #1 for value
http://www.redhat.com/promo/vendor/
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email