Variables

Local

While configuring the rule engine, it might be useful to integrate variables. For example, to perform a count, to store current index in a loop, etc…

3 Addons allow to define a variable:

  • DEF: Dedicated to this purpose.
  • FOREACH: 2 variables might be defined: current item an index.
  • FOREACHNUMBER: 2 variables might be defined: current item an index.
  • EXEC: Exit code is stored in a variable.

These Addons are given the variable name as a parameter. It may be accessed later by prefixing this name with the « $ » character.

Global

In addition to local variables, globales ones are natively available for all exécutions. They must be prefixed by the « # » character to be accessed. Here is the list:

  • DATE: Current date.
  • DATETIME: Current date + time.
  • TIME: Current time (as Java Runtime before 1.8 does not integrate time representation, a standard Date is used, with date components reset to the “zero epoch”).
  • NOW: Alias for datetime.
  • NULL: The Java “null” value.
  • RULESETNAME: Rule set name.
  • WRITEBASE: Force access to context read base.
  • READBASE: Force access to context write base.