Developing Apama Applications > Apama EPL Reference > Events and Event Listeners > Event templates > By-position qualifiers
By-position qualifiers
The correlator evaluates a positional event template against the event field that is at the same position in the event definition as the qualifier's position in the qualifier list.
ByPositionQualifierList
Example
For example, suppose an event has the fields shown below:
event sample1
{
   string itemName;
   float price;
   integer quantity;
}
An example of a by-position qualifier list for this event is as follows:
sample1 ("eggs", 0.50, 3)
This template matches sample1 events that have an itemName value of "eggs", a price value of 0.50, and a quantity value of 3.
ByPositionQualifier
Rule components
In ByPositionQualifier constructs, * matches any value of an event field in the corresponding position.
A RangeExpression(see Range expressions) matches the event field values in the corresponding position to a low and high boundary value of the range. A match occurs when the field value is within the range.
The relational operators < (less than), <= (less than or equal to), > (greater than), >= (greater than or equal to), and = (equal to) specify a comparison of the event field value with the expression value that follows. A match occurs when the relation result is true. The expression to the right of the relational operator cannot contain any references to the event’s fields and must have a result type that is the same as the event field’s type and must be one of decimal, float, integer or string.
Copyright © 2013 Software AG, Darmstadt, Germany and/or Software AG USA Inc., Reston, VA, USA, and/or Terracotta Inc., San Francisco, CA, USA, and/or Software AG (Canada) Inc., Cambridge, Ontario, Canada, and/or, Software AG (UK) Ltd., Derby, United Kingdom, and/or Software A.G. (Israel) Ltd., Or-Yehuda, Israel and/or their licensors.