如果系统中发生了两个事件,我想触发一个动作。
目前,我提出了以下规则:
rule "if there are two events trigger another one"
when
$e1: Event(type == "Reconnaissance", name == "first")
$e2: Event(type == "Authentication", name == "second")
then
System.out.println("Action called");
insert(new Event(...));
end
我可能读错了该信息,因为我看到两个事件都被其他规则触发,但是它们并未触发此规则。
如何实现?我应该在这里添加一些时间/窗口约束吗?