Right... it is a simple constraint should work. To verify problem is not with
Classloaders and String intern, I tried the second rule using eval and that
worked, so problem is not interning
vdelbart wrote:
I try with this and it's working. I don't know why your case doesn't work.
public class Experience {
private String primary;
public String getPrimary() {
return primary;
}
public void setPrimary(String primary) {
this.primary= primary;
}
}
and rules :
rule "test1"
dialect "mvel"
when
exp : Experience( eval(exp.getPrimary() == "SY") )
then
System.out.println("SY1");
end
rule "test2"
dialect "mvel"
when
Experience( primary == "SY")
then
System.out.println("SY2");
end
And in my console, I have :
SY2
SY1
regards,
V.
--
View this message in context:
http://www.nabble.com/Difference-between-constraint-within-a-pattern-and-...
Sent from the drools - user mailing list archive at
Nabble.com.