Apama Documentation : Developing Apama Applications : Developing Apama Applications in EPL : Defining Event Listeners : Defining event listeners with temporal constraints : Using variables to specify times
Using variables to specify times
If you wish to programmatically parameterize usage of the at operator, you have to use variables in conjunction with it. You can replace any of the parameters to the at operator with a string variable or with a sequence of integer variables.
The first alternative, using a string variable, allows you to define the matching criteria within a string variable and then specify the variable within the at call.
For example,
string minutes = "*/30";
on all at(minutes,9:17,[*/2,1],*,*) success();
shows how this can be done. Each of the parameters can be replaced with a string variable in this way.
The other alternative is to use a sequence of integer variable. This is only useful when you want to specify a selection of valid values for the parameter.
sequence<integer> days = new sequence<integer>;
days.append(1); // Monday is ok
days.append(3); // and so is Wednesday
on all at(*,*,*,*,days) success;
Sequences are described in sequence.
Copyright © 2013-2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback