Hi Ana, Thanks for the codes. I just want to share my own experience when debugging CEP patterns: 1. It should work when adding breakpoints in IntelliJ. But you should add the breakpoint on the filter function like the call of isBetweenHoursRange or the line65 in your gist. The reason is that the pattern object will be built once, when no events entered as the env.execute is not called. But the filter method in condition object of the pattern will be executed to detect if the NFA should advance to next phase. 2. You can add some System.out.println in the condition so you may know which condition is matched and which condition is not matched. It is helpful in most cases.
For test writing, you can reference to codes of org.apache.flink.cep.CEPITCase. My final thought is that your line63 and 64 use 2 where clauses so these 2 condition will be joined with "and"(i.e. for a single event, it should fulfill both of the 2 conditions). You can check if that is what you really want. Best, Biao Geng Ana Gómez González <angog...@gmail.com> 于2023年4月19日周三 05:09写道: > Here's a link for the previous code in a gist so you don't struggle with > the format. Sorry. > > https://gist.github.com/angoglez/d9eb6e12f259aba306387b5c23488fb4 > >>