Apama 10.3 | 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. The following example shows how this can be done. Each of the parameters can be replaced with a string variable in this way.
string minutes = "*/30";
on all at(minutes,9:17,[*/2,1],*,*) success();
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();
See also the description of the sequence type in the API Reference for EPL (ApamaDoc) .

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.