【发布时间】:2016-04-16 14:04:54
【问题描述】:
我正在使用 drools 6 + CEP(融合),我需要检查某些事件是否在当前检查规则的时间前 10 分钟发生。为此,我采取了以下方法:
rule "Before rule test"
when
$fall : Fall()
$current : Date(this after[10m] $fall)
then
System.out.println("Fall older than 10m at least");
结束
如果我每次运行都插入一个事实new Date(),这将正常工作,所以我想知道是否有任何对象可以做这样的事情:
rule "Before rule test"
when
$fall : Fall(this before[10m] drools.currentDate)
then
System.out.println("Fall older than 10m at least");
结束
非常感谢!
【问题讨论】:
标签: date drools complex-event-processing