[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1031) using Not only allows me to use 4 equality checks for fact

Eric Miles (JIRA) jira-events at lists.jboss.org
Thu Jul 26 14:49:57 EDT 2007


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

Eric Miles updated JBRULES-1031:
--------------------------------

    Attachment: drools-not-fact-test.tar.gz

Here is the test case I used to reproduce this issue.

> using Not only allows me to use 4 equality checks for fact
> ----------------------------------------------------------
>
>                 Key: JBRULES-1031
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1031
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions:  4.0.0.MR3
>         Environment: Fedora 7, JDK 1.5.0_12
>            Reporter: Eric Miles
>         Assigned To: Mark Proctor
>         Attachments: drools-not-fact-test.tar.gz
>
>
> I have a single rule in my test bed as such:
> rule "5th Item Not Test"
>     
>     when
>         $first : FirstClass($i1 : item1, $i2 : item2, $i3 : item3, $i4 : item4, $i5 : item5)
>         not SecondClass(item1 == $i1, item2 == $i2, item3 == $i3, item4 == $i4, item5 == $i5)
>     then
>         System.out.println("NOT test matched");
>        
> end
> In the not SecondClass() section of the test, the last equality checks always fail, no matter what it is.  I can switch the order around of the checks, no matter what the last one is, it causes THEN clause to not fire, even when I am absolutely positive there is not a match.  (I can remove the not and the equality works fine).  Is there a limit on the number of equality tests I can do with a not?  It seems as though it is 4.  I have attached a test case that can reproduce this (it is different from my project's code, but I have been able to reproduce this in multiple projects).  It is a maven Eclipse project and includes a junit with some minor instructions.  I have created a rule that will fire as the opposite of the rule I'm trying to test and it prints out the values to the console.  You can see in the console that the values are not equal, although the rule fired that they were.
> If these instructions do not make sense, please email me. 

-- 
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