Here is a simple example:
val pattern =
Pattern.begin[Event]("start").where(_.getId == 42).
next("middle").subtype(classOf[SubEvent]).where(x => x.getVolume == **first event matched**.getVolume) ...
Essentially the second event ("middle") need to access the state of the first event ("start"). Is it possible to do this within FlinkCEP without requiring an external state?