Math Expression Instalation and Usage

Document created by matmoreno on Jan 24, 2017
Version 1Show Document
  • View in full screen mode



The installation of assertion Math Expression is simple and can be done through the following steps:


  1.           Download the package through the Math Expression Assertion and extract the jar file in your computer;
  2.           Stop the Gateway:


service ssg stop


  1.          Copy jar file to the api gateway to this directory:



  1.           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:





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.


This property allow specify the variable name that contains the result.


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.


  •          ${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



2 people found this helpful