remove the get and just use the field name as follows
rule
"Your First
Rule"
when
RuleTest(name ==
1)
#conditions
then
#actions
end
Hi all:
I am a new comer to Drools. After I read the user guide, and I've write my HelloWorld, but I got the error like this
'Unable to create Field Extractor', when I use getXXX function name nor xxxx variable name.
BTW, my IDE is eclipse.
This is my code and rule:
Code:
package com.sample;
public class RuleTest {
public int name;
public int getName(){
return name ;
}
}
Rule:
#created on: 2006-11-9
package rules
import com.sample.RuleTest;
rule "Your First Rule"
when
RuleTest(getName == 1)
#conditions
then
#actions
end
--
Ali Abdel-Aziz
http://www.aliabdelaziz.com
http://aabdelaziz.blogspot.com
