[rules-users] the "not in" expression does not work...have u ever had this issue before?
mmquelo massi
mmquelo at gmail.com
Wed Apr 9 04:32:42 EDT 2008
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080409/e5d90092/attachment.html
More information about the rules-users
mailing list