[rules-users] the "not in" expression does not work...have u ever had this issue before?

Edson Tirelli tirelli at post.com
Wed Apr 9 08:49:50 EDT 2008


   No, I did not had this problem before. Can you please open a JIRA and add
a self contained test to reproduce the problem?

   Thanks,
        Edson

2008/4/9 mmquelo massi <mmquelo at gmail.com>:

>
> Hi there!
>
> I am using  a svn-built version of drools-core.jar and
> drools-decisiontable.jar runtime lib (3rd March 2008).
>
> I have got the following "Decision table" generated row:
>
>
> *#From row number: 25*
>
> *rule "Otherwise_25"*
>
> **
>
> *no-loop true*
>
> *ruleflow-group "Convert"*
>
> *when*
>
> *  cw:ContractWrapper(mycontract.serviceDetail.name not in ("STRING 1",
> "STRING 2", "STRING 3", "STRING 4", "STRING 5", null))*
>
> *then*
>
> *  ...*
>
> *end*
>
>  The point is... despite of a ContractWrapper fact that DOES NOT
> encapsulate a
>
>  nested 'name' whose value is in the above set, the rule does not fire
> anyway.
>
> For instance, if i have got a fact (in working memory) cw1 of class
> ContractWrapper with cw1.mycontract.serviceDetail.name = "*STRING *6",
>
> i expect the rule "Otherwise_25" to fire BUT IT ACTUALLY DOES NOT!
>
> Furthermore if i omit the 'not' operator and i insert a fact cw2 with
> cw2.mycontract.serviceDetail.name = "*STRING *2",
>
> the RULE DOES fire!
>
> For this reason there should be something wrong with the "not" operator.
>
> but I do not know what exactly!
>
> By the time the rule is generated from an .xls decision table
>
> i really would not express the "otherwise" rule simply using
>
> a sequence of "!=" and "and" operators (which would be a workaround)
>
> .... If I did so the decisiontable would appear "too technical" and
>
> not suitable for a business user.
>
> Have u ever had this issue before?
>
> I have also tried to omit the "null" value from the set but thait is not
>
> the problem.
>
> Please let me know.
>
> Massi
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>


-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080409/99e009d1/attachment.html 


More information about the rules-users mailing list