Humberto, Although Flink CEP lacks notFollowedBy at the end of a Pattern, there is a way to implement this by exploiting the timeout feature.
The Flink training includes an exercise [1] where the objective is to identify taxi rides with a START event that is not followed by an END event within two hours. You'll find a solution to this exercise that uses CEP in [2]. [1] https://training.ververica.com/exercises/longRides.html [2] https://github.com/ververica/flink-training-exercises/blob/master/src/main/java/com/ververica/flinktraining/solutions/datastream_java/cep/LongRidesCEPSolution.java Best, David On Thu, Mar 19, 2020 at 4:41 AM Zhijiang <wangzhijiang...@aliyun.com> wrote: > Hi Humberto, > > I guess Fuji is familiar with Flink CEP and he can answer your proposed > question. I already cc him. > > Best, > Zhijiang > > ------------------------------------------------------------------ > From:Humberto Rodriguez Avila <rhumber...@outlook.com> > Send Time:2020 Mar. 18 (Wed.) 17:31 > To:user <user@flink.apache.org> > Subject:FlinkCEP - Detect absence of a certain event > > In the documentation of FlinkCEP, I found that I can enforce that a > particular event doesn't occur between two other events using > notFollowedBy or notNext. > > However, I was wondering If I could detect the absence of a certain event > after a time X. For example, if an event *A* is not followed by another > event *A* within 10 seconds, fire an alert or do something. > > Could be possible to define a FlinkCEP pattern to capture that situation? > > Thanks in advance, Humberto > > >