]
Edson Tirelli commented on JBRULES-1472:
----------------------------------------
This bug shows up when we mix alpha and beta constraints.
Problem when mixing alpha and beta constraints in a composite
constraint
------------------------------------------------------------------------
Key: JBRULES-1472
URL:
http://jira.jboss.com/jira/browse/JBRULES-1472
Project: JBoss Drools
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.4
Reporter: Edson Tirelli
Assigned To: Edson Tirelli
Fix For: 5.0.0-M1, 4.0.5
REPORTED BY Jai Vasanth
The first case
rule "Remove smaller or non-overriden"
dialect "java"
when
L : Response( $r : value && status != "override" )
(Response( value > $r ) or Response( status == "override"))
then
retract( L );
end
breaks down to
rule "Rule1"
dialect "java"
when
L : Response( $r : value && status != "override" )
Response( value > $r )
then
retract( L );
end
and
rule "Rule2"
dialect "java"
when
L : Response( $r : value && status != "override" )
Response( status == "override")
then
retract( L );
end
I see that the first rule removes all objects with smaller values and the second one
removes all the ones that arent overridden if there exists an object that has an override
What I dont understand is, why the second one doesnt have similar behaviour
rule "Remove smaller or non-overriden"
dialect "java"
when
L : Response( $r : value && status != "override" )
Response( value > $r || status == "override" )
then
retract( L );
end
When this rule runs , it should start removing objects with smaller values that are *not*
overridden . So if an overridden object exists finally we will be left with 2 objects
Response( maxvalue, non override status ) and Response( somevalue, "override"
)
When the rule fires now L will take on the first one and the the other object will match
the second one since it has an override even though value <= $r . This L should be
extracted and we should just be left with the overridden object.
But I still seem to be left with both the objects.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: