[rules-users] Correlating 2 independent streams of events

Wolfgang Laun wolfgang.laun at gmail.com
Mon Jan 7 06:17:52 EST 2013


Use "wrapper" or "marker" facts to identify the last three EventA's
and a rule to "push" EventA's through these markers. Then, a simple
rule will give you all EventBs between the extremes of the marker set.

Take care to get the start-up right ;-)

-W

On 07/01/2013, Esteban Aliverti <esteban.aliverti at gmail.com> wrote:
> Let's say I have two independent streams of different events: EventA and
> EventB. Which is the best way to get all the occurrences of EventB that
> happened between the last 3 occurrences of EventA?
>
> For example:
>
> from:
> $b1:EventB, $a1:EventA, $b2:EventB, $b3:EventB, $a2:EventA,
> $b4:EventB, $b5:EventB, $a3:EventA, $b6:EventB
>
> I would like to get $b2, $b3, $b4, $b5
>
> Best Regards,
>
>
>
>
> XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
>
> Esteban Aliverti
> - Blog @ http://ilesteban.wordpress.com
>


More information about the rules-users mailing list