[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-953) memberOf and not memberOf not working

Edson Tirelli (JIRA) jira-events at lists.jboss.org
Thu Jun 28 18:33:57 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBRULES-953?page=all ]

Edson Tirelli resolved JBRULES-953.
-----------------------------------

    Fix Version/s:  4.0.0.MR4
       Resolution: Done

The problem was actually related to the use of a global in the field constraint.

Fix was committed and will be included in MR4. 

Thanks for reporting and let me know if you have any other problem.


> 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
>             Fix For:  4.0.0.MR4
>
>
> 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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list