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 in the "Types" section of the
Apama EPL Reference.
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.