Wolfgang, I was expecting you to do that :) Btw, I don't know the requirements, but I wonder if some window filter or temporal horizon (i.e. before[x,y]) shouldn't be applied to the second pattern too... the use of a plain "before" requires to keep all events in the WM since the beginning of time
On 04/19/2013 08:48 PM, Wolfgang Laun wrote: > On 18/04/2013, burmanator <[email protected]> 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 > _______________________________________________ > rules-users mailing list > [email protected] > https://lists.jboss.org/mailman/listinfo/rules-users > _______________________________________________ rules-users mailing list [email protected] https://lists.jboss.org/mailman/listinfo/rules-users
