【发布时间】:2019-07-16 06:18:28
【问题描述】:
我正在尝试编写一个有多个条件的滑动窗口规则。我要写的规则是:
rule "1"
when
$test : Test (num1 > 100 && num2 > 101) && $number:Number() from accumulate(Test($t : num1) over window:time(20s), sum($t))
then
System.out.println("Output is "+$test.getNum1()+" and sum is "+$number+"");
end
在上述规则中,引擎正在累积 num1 和 num2 的值,即使它们不满足条件。 && 关键字按位 AND 工作,即它正在评估 LHS 和 RHS。
谁能向我解释一下这种行为?
【问题讨论】:
标签: drools drools-fusion