[rules-users] CE "not" not working

Piyush Goel piyush.goel at capillary.co.in
Tue Jan 11 10:13:52 EST 2011


Hi,

We have a few rules like the ones given below.

rule "4"
     salience 0
     dialect "mvel"
     when
    av1 : AttributeValue( str == "Boys" )
    exists InventoryAttribute( attribute == "DIVISION" && value == av1 )

    av2 : AttributeValue( str == "Blazer" )
    exists InventoryAttribute( attribute == "SUBCATEGORY" && value == av2 )

    av3 : AttributeValue( str == "Boys Upper" )
    not InventoryAttribute( attribute == "CATEGORY" && value == av3 )

     then
         VoucherSeries fact0 = new VoucherSeries();
         fact0.setSeriesCode( "BUPPER1" );
         fact0.setPriority(100);
         fact0.setRuleName(drools.getRule().getName());
         insert(fact0);
end

The CE "not" is never evaluating to true in the above rule. The "not" CE is
working only for very simple conditions like 'not AttributeValue( str ==
"Blazer")' .

Any idea what are we doing wrong ?

Regards,
piyush
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20110111/9c8aebe6/attachment.html 


More information about the rules-users mailing list