On 18/04/2013, burmanator <alexburman(a)gmail.com> wrote:
rule test
when
$primary : Foo($name : Name) over window:length(24)
$prev : ArrayList(size<1) from collect ( Foo(Name == $name, this before
$primary))
then
System.out.println("Found name: " + $name);
end
Apart from the sliding window and the manifest bug: I just wonder why
nobody has pointed out that the rule can be rewritten as:
rule test
when
$primary : Foo($name : Name) over window:length(24)
not Foo(Name == $name, this before $primary)
then
System.out.println("Found name: " + $name);
end
There is no other way the list size can be less than 1 :-)
-W