CEP timeout occurs even for a successful match when using followedBy
Posted by
Moiz Jinia on
URL: http://deprecated-apache-flink-user-mailing-list-archive.369.s1.nabble.com/CEP-timeout-occurs-even-for-a-successful-match-when-using-followedBy-tp12914.html
When using "next", this pattern works fine for the both a match as well as a timeout:
Pattern<Event, Event> pattern = Pattern.<Event>begin("start")
.where(evt -> evt.value.equals("ni"))
.next("last").where(evt -> evt.value.equals("ar")).within(Time.seconds(5));
1. "ni" then "ar" within 5 seconds - triggers match
2. "ni" then no "ar" within 5 seconds - triggers timeout
But with "followedBy", this does not behave as expected:
Pattern<Event, Event> pattern = Pattern.<Event>begin("start")
.where(evt -> evt.value.equals("ni"))
.followedBy("last").where(evt -> evt.value.equals("ar")).within(Time.seconds(5));
"ni" then "ar" within 5 seconds - triggers match and also triggers timeout.
Why is the timeout triggered when using followedBy (when there is a match)?
Version - 1.1.5.