Inside eval() you must use code in the chosen semantic dialect (either Java or MVEL). None of them have "not in" operator that is a DRL syntax sugar.
    So, you need to either properly write Java or MVEL code inside the eval, or use a regular DRL constraint.

    In this specific case, if you are asserting the Map into the working memory, you can do something like:

rule XXX
    Map( this['name'] not in ("amit","siddhartha") )
   // do something


2007/9/11, Gaurav2007 <>:

Hi All,

I am using drool4.0.1 in my application,

I have one map in global memory this map contains mapping of id and value,i
want to validate these values.

but when i am using in and not in rule like:

eval(validatorMap.get("name")  not in("amit","siddhartha"))

where validatorMap is a map of id and value inserted in global memory.

it is giving following error:
org.drools.rule.InvalidRulePackage : Rule Compilation error : [Rule
name=Short Name, agendaGroup=MAIN, salience=0, no-loop=false]
        com/telekurs/nva/mde/fe/ak/validation/ (8:330) : The
left-hand side of an assignment must be a variable
        com/telekurs/nva/mde/fe/ak/validation/ (8:357) :
Syntax error on token "not", invalid AssignmentOperator

please help me how to validate value from a map using in and not in operator
of drool.

View this message in context:
Sent from the drools - user mailing list archive at

rules-users mailing list

  Edson Tirelli
  Software Engineer - JBoss Rules Core Developer
  Office: +55 11 3529-6000
  Mobile: +55 11 9287-5646
  JBoss, a division of Red Hat @