【发布时间】:2016-08-10 15:57:33
【问题描述】:
我正在互联网上寻找一些文章,谷歌搜索,但到目前为止还没有发现任何关于我的需要的太明确的内容。
我想做一个 - 就我的看法 - 不是那么简单的案例评估。
rule "Send email E-mail based on rule evaluation"
/*
If
kind is equal 1 or 2 AND
code is equal 1 or 341 AND
payment is equal S
I do whatever I need to do
*/
when
$item : Item((kind == 1 || kind == 2 ),(code == 1 || code == 341),payment = S);
then
//do whatever I need to do
end
困难在于添加一个新的评估条件,该条件类似于日期限制(最新工作日,因此它不是静态的),并且必须由我的代码提供以提供规则(使用 kSession.insert ?)然后比较如果 item 中的 issueDate 更小(是我提供的最近一个工作日之前的日期),则可以做我需要做的任何事情。
有可能吗?怎么样?
【问题讨论】: