流口水 drl 如何做到不条件
我正在尝试用 drools drl 语言编写一条规则,我想做类似 !(A && B) 的事情,但它似乎不喜欢!运算符或单词 not。我正在努力寻找有关 drools 的良好文档,
请参阅下面的示例代码:
rule "Test Rule"
when
testBean : testBean(!(testList contains "test" && testList2 contains "test2"))
then
testBean.setText( "This is a test" );
end
我将不胜感激任何人可以
提前给我的帮助
I am trying to write a rule in drools drl language where I am want to do something like !(A && B) but it doesnt seem to like the ! operator or the word not. I am struggling to find good documentation on drools
Please see sample code below:
rule "Test Rule"
when
testBean : testBean(!(testList contains "test" && testList2 contains "test2"))
then
testBean.setText( "This is a test" );
end
I would appreciate any help than anyone can give me
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看起来 not 运算符存在一个开放缺陷
https://jira.jboss.org/ browser/JBRULES-2404
另一篇关于否定的好文章,使用“neg”或“naf”而不是“not”
http://blog.athico.com/search?q=negation
It looks like there is an open defect with the not operator
https://jira.jboss.org/browse/JBRULES-2404
Another good article on negation, uses 'neg' or 'naf' instead of 'not'
http://blog.athico.com/search?q=negation
对我来说,我使用
==false
语法For me, I use
==false
syntax