Apama 10.3 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Defining Event Listeners | How the correlator executes event listeners | How the correlator evaluates event listeners for a series of events
How the correlator evaluates event listeners for a series of events
Suppose there are seven event templates defined, which are represented as A, B, C, D, E, F and G. Now, consider a series of incoming events, where Xn indicates an event instance that matches the event template X. Likewise, Xn+1 indicates another event instance that matches against X, but which need not necessarily be identical to Xn.
Consider the following pattern of incoming events:
C1 A1 F1 A2 C2 B1 D1 E1 B2 A3 G1 B3
Given the above event pattern, what should the event expression A() -> B() match upon?
In theory the combinations of events that correspond to "an A followed by a B" are {A1, B1}, {A1, B2}, {A1, B3}, {A2, B1}, {A2, B2}, {A2, B3} and {A3, B3}. In practice it is unlikely that you want your event listener to match seven times on the above example pattern, and it is uncommon for all the combinations to be useful.
In fact, within EPL, on A() -> B() will only match on the first instance that matched the template. Given the above event pattern the event listener will trigger only on {A1, B1}, execute the associated action and then terminate.

Copyright © 2013-2018 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.