[rules-users] Issue with not Fact equality checks?

Eric Miles eric.miles at kronos.com
Wed Jul 25 00:07:35 EDT 2007


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 2 are, they cause 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.  If these instructions do not make sense, 
please email me.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: drools-not-fact-test.tar.gz
Type: application/x-gzip
Size: 2390 bytes
Desc: not available
Url : http://lists.jboss.org/pipermail/rules-users/attachments/20070725/a9dc8b77/attachment.gz 


More information about the rules-users mailing list