Does anyone know if there is a problem using a "not" combined with a
predicate expression? Drools gives me a NullPointerException
sometimes when evaluating my predicate. The example from the user
guide is:
Person( girlAge : age, sex = "F" )
Person( boyAge : age -> ( girlAge.intValue() == boyAge.intValue() + 2
), sex = 'M' )
Buy I'm trying something similar to:
Person( girlAge : age, sex = "F" )
not Person( boyAge : age -> ( girlAge.intValue() == boyAge.intValue()
+ 2 ), sex = 'M' )
And also:
Person( girlAge : age, sex = "F" )
not Person( boyAge : age, sex = 'M' )
eval ( girlAge.intValue() == boyAge.intValue() + 2 )
Is there anything wrong with these? The compiler does not have a
problem with the former, but does not like the latter. I'm using
Drools 3.0.5. I'm basically trying to say "there is a girl, and there
is not a boy whose age is 2 years less than the girl".
Any thoughts on this would be greatly appreciated.
Thanks,
-Chris West