Cisco Cisco Customer Voice Portal Downloads Guida Dello Sviluppatore
A
CTION
E
LEMENT
:
M
ATH
E
LEMENT
S
PECIFICATIONS FOR
C
ISCO
U
NIFIED
C
USTOMER
V
OICE
P
ORTAL
R
ELEASE
4.0(1)
44
Math
The Math action element is used to evaluate basic mathematical expressions. The mathematical expression is composed of operators
and functions in the form of a string which is passed as a setting to the element, parsed and evaluated at runtime. The result is a
double value stored as a string in either element data or session data. All common arithmetic operators are supported. Boolean
operators are also fully supported. Boolean expressions are evaluated to be either 1.0 or 0.0 (true or false respectively).
and functions in the form of a string which is passed as a setting to the element, parsed and evaluated at runtime. The result is a
double value stored as a string in either element data or session data. All common arithmetic operators are supported. Boolean
operators are also fully supported. Boolean expressions are evaluated to be either 1.0 or 0.0 (true or false respectively).
Examples
Expression: 2 * 4
Result:
8.0
Expression:
sqrt(16)
Result:
4.0
Expression: {Data.Session.myNumber} == 4
Result:
1.0
Settings
Name (Label)
Type
Req’d
Single
setting
value
Substitution
allowed
Default
Notes
Type
(Type)
(Type)
string
enum
Yes
true false Element
This setting specifies the type of data that will
store the result of the mathematical expression.
Possible values are: Element | Session.
Default = Element.
store the result of the mathematical expression.
Possible values are: Element | Session.
Default = Element.
Name
(Name)
(Name)
string Yes
true true None
This setting specifies the name to assign to the
data that will store the result of the mathematical
expression.
data that will store the result of the mathematical
expression.
Expression
(Expression)
(Expression)
string
Yes
true true None
This setting specifies the mathematical
expression to parse and evaluate. For supported
operators and functions see tables below.
expression to parse and evaluate. For supported
operators and functions see tables below.