[rules-users] CE "not" not working

Edson Tirelli ed.tirelli at gmail.com
Tue Jan 11 14:23:03 EST 2011


   As Wolfgang mentioned, it works with 5.1.1 (although I never heard
about any problem with 5.0.x before either). Try using 5.1.1 and let
us know if you still see the problem.

   Edson

2011/1/11 Piyush Goel <piyush.goel at capillary.co.in>:
> We are using drools 5.0.1. Let me know if you need more information.
>
> thanks,
> piyush
>
> 2011/1/11 Wolfgang Laun <wolfgang.laun at gmail.com>
>>
>> Drools version, please.
>>
>> It works with 5.1.1., and I have seen similar CEs working in 5.0.x
>>
>> -w
>>
>> 2011/1/11 Piyush Goel <piyush.goel at capillary.co.in>
>>>
>>> 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
>>>
>>> _______________________________________________
>>> rules-users mailing list
>>> rules-users at lists.jboss.org
>>> https://lists.jboss.org/mailman/listinfo/rules-users
>>>
>>
>>
>> _______________________________________________
>> rules-users mailing list
>> rules-users at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/rules-users
>>
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>



-- 
  Edson Tirelli
  JBoss Drools Core Development
  JBoss by Red Hat @ www.jboss.com




More information about the rules-users mailing list