Your first rule did not fire for me as expected using drools 5.3. Please ignore my
previous post.
oranoh <olaf.raether(a)emerson.com> wrote:
I have a simple class
public class Dummy {
private int x1, x2, y1, y2;
public Dummy(int x1, int y1, int x2, int y2) {
this.x1 = x1;
this.y1 = y1;
this.x2 = x2;
this.y2 = y2;
}
public int getX1() {
return x1;
}
public int getX2() {
return x2;
}
public int getX2M150() {
return x2-150;
}
public int getY1() {
return y1;
}
public int getY2() {
return y2;
}
}
And a the following Rule:
rule "DummyRule"
ruleflow-group "DummyTest"
when
d1 : Dummy()
d2 : Dummy(y2 == d1.y1, (x1 == (d1.x2 -150) || x2 == (d1.x2 -150)))
then
System.out.println("Rule DummyTest fired");
end
Executing the rule with the following Data - The Rule fires !!! - WRONG
Dummy d1 = new Dummy(-1050, -900, -750, -600);
Dummy d2 = new Dummy(-1050, -1200, -750, -900);
When I modify the Rule the follow way
rule "DummyRule"
ruleflow-group "DummyTest"
when
d1 : Dummy()
d2 : Dummy(y2 == d1.y1, (x1 == d1.x2M150 || x2 == d1.x2M150))
then
System.out.println("Rule DummyTest fired");
end
with the same Data - The Rule fires not !!!! - What is CORRECT
This problem comes up, when I move from drools 5.01 to 5.3
Can anybody help ?
--
View this message in context:
http://drools.46999.n3.nabble.com/simple-subtraction-in-drools-5-3-fires-...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users