[
http://jira.jboss.com/jira/browse/JBRULES-318?page=all ]
Edson Tirelli reopened JBRULES-318:
-----------------------------------
Hi,
Thanks for having fixed this.
Unfortunately, I think that I am facing a regression when using the same example (just use
the conditions under comment "Works great"):
rule "Order"
salience 200
when
#Works great
n1 : NumberTest($nb1 : nb, $index1 : index);
n2 : NumberTest($nb2 : nb -> ($nb2.compareTo($nb1) < 0), index >
$index1);
then
System.out.println("Swapping " + n1 + " with " + n2);
check(n1, n2);
swap(n1, n2);
modify(n1);
modify(n2);
end
I got an error in the middle of the test (using 3.0.2), which wasn't the case with
3.0.1.
Did I made a mistake writing my rules, or is it a regression?
Swapping N[4] index=1 with N[3] index=2
Swapping N[3] index=1 with N[2] index=3
Swapping N[2] index=1 with N[1] index=4
Swapping N[1] index=1 with N[0] index=5
Swapping N[4] index=2 with N[1] index=5
Swapping N[2] index=4 with N[1] index=2
Shouldn't come here... false
Swapping N[3] index=3 with N[1] index=4
Swapping N[2] index=2 with N[1] index=3
Number is N[0] index=1
Number is N[1] index=2
Number is N[2] index=3
Number is N[3] index=4
Number is N[4] index=5
Thanks,
Jean-Pierre Grillon
eval() not re-evaluated when objects were modified
--------------------------------------------------
Key: JBRULES-318
URL:
http://jira.jboss.com/jira/browse/JBRULES-318
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 3.0.1
Environment: JBossRules 3.0.1
Eclipse 3.2 rc7
JDK 5
Reporter: Jean-Pierre GRILLON
Assigned To: Edson Tirelli
Fix For: 3.0.2
Attachments: Drools-eval.zip
I face a problem (bug?): I have a condition using ?eval? which doesn?t seem to be
reevaluated when objects are modified.
The class NumberTest wraps a number (field nb) and the index (field index).
The rule gets 2 NumberTest, the first number is greater than the second one ; and the
eval condition should test that the first index is less than the second. But the rule is
fired even if this condition is not fulfilled (see the check function).
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira