[rules-users] Issues when comparing attribute values to null

Joshua Undesser jundesse at cdmtech.com
Mon Apr 7 18:24:17 EDT 2008


I am not sure if anyone else is having this issue or not, but I can not do
in-line attribute compares to null.   

For instance.....

when
ObjectA(
   objectBKey == null
)
then
....


objectBKey is a String in this case.  
This doesn't evaluate properly as the rule was firing even though the slot
contained the key of ObjectB.   


Then I did this as a test....

when
ObjectA(
   $objBKey : objectBKey
)

not ObjectB(
   objectBKey == $objBKey
)
then
.....


This works because if the slot is populated there must be an ObjectB in the
system with that unique key.    If the $objBKey is null then there obviously
is not an ObjectB in the system.

I tried searching through the archieve but couldn't find anything for this
issue.   Also for what it's worth I'm using the official 4.0.5 release.

Thanks in advance!

Joshua


-- 
View this message in context: http://www.nabble.com/Issues-when-comparing-attribute-values-to-null-tp16541733p16541733.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list