]
Edson Tirelli reassigned JBRULES-953:
-------------------------------------
Assignee: Edson Tirelli (was: Mark Proctor)
memberOf and not memberOf not working
-------------------------------------
Key: JBRULES-953
URL:
http://jira.jboss.com/jira/browse/JBRULES-953
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Drl Parser/Builder
Affects Versions: 4.0.0.MR3
Environment: Windows XP, Drools MR3
Reporter: Brian Enderle
Assigned To: Edson Tirelli
The use of "memberOf" and "not memberOf" does not appear to do
anything as it always evaluates to true.
Example:
given an Address object with countryCd of "US" & List of country codes of
{"US", "MX" and "CA"}
rule "Country must be US, MX or CA"
when
$i : Address( countryCd != null, countryCd not memberOf countryCodes, $countryCd :
countryCd )
then
System.out.println("- Country must be US, MX or CA");
end
rule "Country must not be US, MX or CA"
when
$i : Address( countryCd != null, countryCd memberOf countryCodes, $countryCd :
countryCd )
then
System.out.println("- Country must not be US, MX or CA");
end
The results of these two rules is the following:
- Country must be US, MX or CA
- Country must not be US, MX or CA
One of these should not fire, in this case the first rule should not evaluate to true and
therefore should not fire.
Brian Enderle
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: