Apama 10.3.1 | Apama Documentation | Developing Apama Applications | Developing Apama Applications in Java | Defining Event Expressions | Defining advanced event expressions
 
Defining advanced event expressions
 
Specifying other temporal operators
Specifying a perpetual listener for repeated matching
Deactivating a listener
Temporal contexts
Specifying the timer operators
An event template is the simplest form of an event expression. All event expression operators, including ->, can themselves take entire event expressions as operands.
It is useful to think of event expressions as being Boolean expressions. Each clause in an event expression can be true or false, and the whole event expression must evaluate to true before the listener triggers and calls the match listener's match method.
As before, for the sake of brevity, let us use the letters A, B, C and D to represent event templates, and A', B', C' and D' to represent individual events that match those templates, respectively.
Once more, consider this representation of an event expression,
A -> B -> C -> D
When the listener is first activated it is helpful to consider the expression as starting off by being false. When an event that satisfies the A clause occurs, the A clause becomes true. Once B is satisfied, A -> B becomes true in turn, and evaluation progresses in a similar manner until eventually all A -> B -> C -> D evaluates to true. Only then does the listener trigger and call the associated match listener's match method. Of course, this event expression might never become true in its entirety (as the events required might never occur) since no time constraint (see Specifying the timer operators) has been applied to any part of the event expression.

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.