Instalation
The installation of assertion Math Expression is simple and can be done through the following steps:
- Download the package through the Math Expression Assertion and extract the jar file in your computer;
- Stop the Gateway:
service ssg stop
- Copy jar file to the api gateway to this directory:
/opt/SecureSpan/Gateway/runtime/modules/lib
- Start the Gateway:
Servisse ssg start
After wait the Gateway start and then access Policy Manager and filter assertion by Math Expression.
How to use the Math Expression
The usage of Math expression is very simple, drag and drop the assertion to your policy.
In the Math Expression Assertion allow specify three properties, the following table describe thi bellow:
Property | Description |
formatOutput | This property allow specify the output format. The following the same formatters: - %f%n – Default display result;
- %.3f%n – Displays the result with 3 decimal places.
|
outputVariableName | This property allow specify the variable name that contains the result. |
mathExp | In this property you can enter the mathematical expression using the numeric type context variables. The variables must have a valid number, otherwise a fault is generated. Examples: - ${height}^${width}
- “cos(${height)) + sin(${width})”
The following functions allowed: - abs: absolute value
- acos: arc cosine
- asin: arc sine
- atan: arc tangent
- cbrt: cubic root
- ceil: nearest upper integer
- cos: cosine
- cosh: hyperbolic cosine
- exp: euler's number raised to the power (e^x)
- floor: nearest lower integer
- log: logarithmus naturalis (base e)
- log10: logarithm (base 10)
- log2: logarithm (base 2)
- sin: sine
- sinh: hyperbolic sine
- sqrt: square root
- tan: tangent
- tanh: hyperbolic tangent
- signum: signum function
|