Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in EPL | Defining Event Listeners | How the correlator executes event listeners | Evaluating event listeners for an A-event followed by all B-events
 
Evaluating event listeners for an A-event followed by all B-events
Consider an event listener defined as follows:
on A() -> all B() success();
The monitor would now match on all the patterns consisting of the first A and each possible following B.
For clarity this is the same as:
on ( A() -> ( all B() ) ) success();
The way this works is that the correlator creates a second event listener after finding a matching B. The second event listener watches for the next B, and so on repeatedly until the monitor is explicitly killed.
Therefore on A() -> all B() would match {A1, B1}, {A1, B2} and {A1, B3}.
Graphically this would now look as follows:
The table shows the early states of L' and L'' in light color because those event listeners actually never really went through those states themselves. However, since they were created as a clone of another event listener, it is as though they were.
The master event listener denoted by on (A() -> all B()) will never terminate as there will always be a sub-event-listener looking for a B.

Copyright © 2013-2019 | 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.