[rules-users] "not in" error

Mike D mike.dalaker at kewill.com
Mon Jun 16 14:29:04 EDT 2008


I will do so Edson.  When I changed the not in to include a hardcoded "B"
(value in TariffValidSpi), the rule passed.  Then, I changed the variable
name to $spiP, it also passed.  

Thanks for the prompt reply.

 

   Are you sure that it is only the variable name that differs? I see you
use an extra condition in your second rule:

id.spiProgram not in (null, " ", "", $spiP )

   You are testing for a single space here, while in the first rule you are
not.

   I'm asking because drools does not make any "processing" on variable
names... it does not matter if you call them xyz, banana or apple. Also, the
"$" as you probably know is a valid variable name identifier and so, drools
also does not care about it.

   If you are positive that the variable name is the only difference, I ask
you please to isolate a self contained test case that we can reproduce in
order to fix whatever is happening there. In your example rule above, there
is only one gotcha, but that should not cause any problem: since you are
using a nested access ("id.spiProgram"), the actual constraint is delegated
to MVEL for resolution, but again, mvel uses the variables injected by
drools to resolve the constraint and drools makes no change on variable
names.

   []s
   Edson


-- 
View this message in context: http://www.nabble.com/%22not-in%22-error-tp17867925p17870642.html
Sent from the drools - user mailing list archive at Nabble.com.




More information about the rules-users mailing list