The majority of Addons implementations should be configured correctly to perform as desired.
For example, the SET action allowing to set a value accepts 2 parameters: « source », representing the source value and « target », representing where to put this value.
Tables bellow provide details on available proprerties for all Addons integrated to MRules. Some properties’ ID are underlined: it means that it’s their default property. A value affected to this Addon without anymore directive is automatically assigned to this property (cf. Build the instance).
All Addons
In every cases, properties defined in this table are available for all addons.
Addon ID | Property | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
[all] | name | String | A name for this instance. | No | null |
description | String | A description for this instance. | No | null |
Evaluation Operators
Addon ID | Property | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
BETWEEN | min | Accessor | Minimum accepted value. | No | null |
max | Accessor | Maximum accepted value. | No | null | |
COLDISJOINED | None | ||||
COLEQ | None | ||||
COLIN | None | ||||
COLINCLUDED | None | ||||
COLINCLUDES | None | ||||
COLINTERSECTS | None | ||||
COLNE | None | ||||
COLNOTIN | None | ||||
EQ | None | ||||
EMPTY | None | ||||
GT | None | ||||
GTE | None | ||||
IN | None | ||||
LT | None | ||||
LTE | None | ||||
MATCH | None | ||||
NE | None | ||||
NOTCONTAINS | None | ||||
NOTEMPTY | None | ||||
NOTIN | None | ||||
NOTMATCH | None | ||||
NOTNULL | None | ||||
NULL | None |
Logical Operators
Addon ID | Property | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
AND | None | ||||
OR | None | ||||
VALBETWEEN | considerValidated | boolean | Count verified or unverified conditions. | No | true |
min | int | Minimum number of verified conditions (or unverified). -1 for no limit. | No | -1 | |
max | int | Maximum number of verified conditions (or unverified). -1 for no limit. | No | -1 | |
XOR | None |
Mathematical Operators
Addon ID | Property | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
DIVIDED_BY | decimals | Rounder | Rounding specifications *** | No | Strip, 10 decimals, half up. |
MINUS | None | ||||
MODULO | None | ||||
MULTIPLIED_BY | None | ||||
PLUS | None | ||||
POWER | None |
Accessors
Addon ID | Property [/ Alias] | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
AVAILABLE | property | String | Property for which accessibility must be checked. | Yes | |
ABS | source | Accessor | Data source. Might be a number or a collection of numbers. | Yes | |
CAST | source | Accessor | Data source | Yes | |
targetType | Class | Target type. | Yes | ||
targetGenericType | Class | If target type is a collection, provides the type of the elements. | No | ||
COALESCE | sources / source | Accessor | Data source | Yes | |
CONCAT | source | Accessor | Data source | One and only one | |
values / value | Accessor List | Data source | |||
separator | String | Separator inserted between each item | No | null | |
CONDCOUNT | conditions / condition | Condition List | List of conditions to evaluate | Yes | |
considerValidated | boolean | Count verified or unverified conditions. | No | true | |
CONDWRAPPER | condition | Condition | Condition to « wrap » | Yes | |
COUNT | source | Accessor | Data source on which count will be performed | Yes | |
condition | Condition | Condition for count | No | null | |
DATEDIFF | date1 | Accessor | Data source of the first date | Yes | |
date2 | Accessor | Data source of the second date | Yes | ||
field | Accessor | Unit (a character amongst YMDhmsz) | Yes | ||
DATEOP | source | Accessor | Source of the date to modify | No | 0 |
year | Accessor | Number of years to add | No | 0 | |
month | Accessor | Number of months to add | No | 0 | |
day | Accessor | Number of days to add | No | 0 | |
hour | Accessor | Number of hours to add | No | 0 | |
minute | Accessor | Number of minutes to add | No | 0 | |
second | Accessor | Number of seconds to add | No | 0 | |
milli | Accessor | Number of millisconds to add | No | 0 | |
DEFINED | property | String | Name of the variable for which definition must be checked. | Yes | |
EXEWRAPPER | executable | Executable | Executable to « wrap » | Yes | |
FILTER | source | Accessor | Data source on which filtering will be performed | Yes | |
condition | Condition | Condition for filtering | Yes | ||
FORMAT | message | Accessor | Message to format, containing variables under the form {{var}}. | Yes | |
arguments / argument | List of arguments, composed of a name (String) and a value (Accessor). | Name of the variable to replace in the String (ex: "var") and replacement value. | No | ||
ITERATE | source | Accessor | Data source | One and only one | |
values / value | Accessor List | Data source | |||
separator | String | Separator for delimitedsource. | No | ";" | |
MAPENTRIES | source | Accessor | Data source | Yes | |
MAPKEYS | source | Accessor | Data source | Yes | |
MAPVALUES | source | Accessor | Data source | Yes | |
MAX | source | Accessor | Data source on which search will be performed | Yes | |
condition | Condition | Filtering condition | No | ||
on | Accessor List | Nested properties to compare on | No | Natural ordering | |
nbElementsToRetrieve | Accessor | Maximum number of elements that will retrieved | No | 1 | |
nullIsMaxValue | boolean | How to handle null values. | No | false | |
MIN | source | Accessor | Data source on which search will be performed | Yes | |
condition | Condition | Filtering condition | No | ||
on | Accessor List | Nested properties to compare on | No | Natural ordering | |
nbElementsToRetrieve | Accessor | Maximum number of elements that will retrieved | No | 1 | |
nullIsMinValue | boolean | How to handle null values. | No | false | |
NEW | className | String | Name of the class to instanciate | Yes | |
arguments / argument | Accessor List | Values of constructor arguments | No | null | |
argumentsTypes / argumentsType | String List | Types of constructor arguments | No | null | |
NULLIFEMPTY | source | Accessor | Source for the data to check | Yes | |
PROPERTY | property | String | Property to read or write by introspection | Yes | |
source | Accessor | Source for data to intraspect. Allows to override the base provided by the execution context. | No | null | |
optimizeMultiRead | boolean | Allows to deactivate caching of read data. * | Yes | ||
SEARCH | source | Accessor | Data source on which search will be performed | Yes | |
condition | Condition | Condition for search | Yes | ||
SIZE | source | Accessor | Data source | Yes | |
SPLIT | source | Accessor | Data source | Yes | |
separator | String | Regexp used to split input String. | No | ";" | |
SUBPART | source | Accessor | Data source | Yes | |
beginIndex | int | Begin index | Yes | ||
endIndex | int | End index. -1 for no limit. | No | -1 | |
TERNARY | condition | Condition | Condition to evaluate | Yes | |
ifTrue | Accessor | Return value if true | No | null | |
ifFalse | Accessor | Return value if false | No | null | |
VALUE | type | String | Forces conversion of value to a specific type | No | null |
value | Object | Constant value returned | No | null | |
VALUES | values | Accessor List | All accessors whose values will form the result. | Yes | |
VPROPERTY | property | Accessor | Dynamically retrieves accessed property name during execution | Yes | |
ROUND | source | Accessor | Source for rounded data | Yes | |
decimals | Rounder | Rounding specifications *** | No | « 0 » | |
AVERAGE MOD MULTIPLY POW SUBTRACT SUM | Source **** | Accessor | Data source | At least one on two | |
values / value **** | Accessor List | Data source | |||
property | Accessor | Sub-property for accessing number | No | null | |
condition | Condition | Condition for taking current item into account. Allows to reproduce Excel SUM.IF | No | null | |
decimals | Rounder | Rounding specifications *** | No | « 0 » | |
coefficientsSource (AVERAGE only) ***** | Accessor | To obtain éventual coefficients | No | null | |
coefficientsValues (AVERAGE only) ***** | Accessor List | To obtain éventual coefficients | No | null | |
coefficientsProperty (AVERAGE only) ***** | Accessor List | Sub-property to obtain éventual coefficients | No | null | |
SINGLE_MATH | left | Accessor | Left operand | Yes | |
right | Accessor | Right operand | Yes | ||
operator | Math Operator | Definition of the operator used to perform computation. | Yes |
* Advanced proprerty. Its usage might have consequences on global exécutions performances.
** For a standard compilation, this property is mostly unuseful: target type is automatically determined.
*** The Rounder class allows to round numbers. A representation as char sequence is possible, under the form
[T|F]{0,1}[0-9]*[RoundingMode Value]{0,1}
With:
- T|F : delete non-representative zeros (i.e. on the right of the decimal part) : True or False. True if omitted.
- Decimals number.
- RoundingMode : CEILING, DOWN, FLOOR, HALF_DOWN, HALF_EVEN, HALF_UP, UNNECESSARY, UP.
Example : “2UP” means 2 décimals, rounded up.
**** “source” and “values” may have different semantics :
- If one is filled, it will be the source of all values. Convenient for sums, averages, etc …
- If both are filled, “source” will be the first number(or numbers if it’s an iterable) and values will follow. Convenient for subtractions.
***** “coefficient” and “coefficients” may have different semantics:
- If only “coefficients” is filled, it must provide Numbers and will be the source of all coefficients.
- If only “coefficient” is filled, it will be used to read a sub-property on iterated values.
- If both are filled, “coefficients” will iterated and “coefficient” will be used to read a sub-property on iterated coefficients.
Actions
Addon ID | Property [/ Alias] | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
ADD | source | Accessor | Source data | Yes | |
target | Accessor | Target Collection | Yes | ||
ADDALL | source | Accessor | Source data (Collection, Tableau, Iterable, ...) | Yes | |
target | Accessor | Target Collection | Yes | ||
CLEAR | target | Accessor | Target Object (Map, Collection, etc). | Yes | |
DEF | source | Accessor | Source of data to put in variable | Yes | |
var | String | Variable name | Yes | ||
type | String | Variable type (might imply a cast) | No | null | |
EXEC | command | Accessor | System command to execute. | Yes | |
var | String | Variable receiving exit code | No | null | |
type | String | Type of the variable receiving exit code. | No | null | |
FLOWCONTROL | command | String | Execution control command *. | Yes | |
appliesTo | String | Eventualy, name of the addon on which to apply command. | No | null | |
message | Accessor | Eventualy, a message if raising an error. | No | null | |
sources / source | Accessor | Source(s) for data to print. | Yes | ||
error | boolean | To write on error stream. | No | false | |
PRINTF | message | Accessor | Message to format, containing variables under the form {{var}}. | Yes | |
arguments / argument | List of arguments, composed of a name (String) and a value (Accessor). | Name of the variable to replace in the String (ex: "var") and replacement value. | No | null | |
error | boolean | To write on error stream. | No | false | |
RESET_CACHE | None | ||||
SET | source | Accessor | Source data | Yes | |
target | Accessor | Target date | Yes | ||
SORT | target | Read Accessor | Source data | Yes | |
asc | boolean | Is sort to be ascending or descending ? | No | true | |
nullFirst | boolean | If a value is null, should it be placed first or last ? | No | true | |
by | List of Read Accessors | If comparison should be made on one or more sub pproperties. | No | ||
inplace | boolean | Is sort to be made in place, or a new instance of collection should be created ? | No | true |
* All flow control commands are :
- DONTSTOP: If targeted block has the “stopAtFirstValidatedCondition” to true, forces an exception to this directive. “appliesTo” property might precise the block targeted by the exception. If not, first parent block is targeted.
- STOP: Stops execution. “appliesTo” property might precise a block to stop. If not, first parent block is stopped.
- RESTART: Restarts execution. “appliesTo” property might precise a block to restart. If not, first parent block is restarted.
- CONTINUE: Specific command of the “FOREACH” addon, tells to continue directly to the next element.
- RAISEERROR: Throws an error, error code “RAISEERROR”, containing the optional “message” property. “appliesTo” property is ignored.
Les Exécutables
Addon ID | Property [/ Alias] | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
ACCEXEC | accessor | Accessor | Accessor to wrap | No | null |
BLOCK | executables / executable | Executables List | What will be executed in this block. | No | null |
stopAtFirstValidatedCondition | boolean | If a condition is verified, stop execution? | No | false | |
FOREACH | executables / executable | Executables List | What will be executed at each iteration. | No | null |
source | Accessor | Source for data to iterate | Yes | ||
var | String | Variable name | Yes | ||
indexVar | String | Name of the variable receiving current item index. | No | null | |
type | String | Variable type (might imply a cast) | No | null | |
stopAtFirstValidatedCondition | boolean | If a condition is verified, stop execution? | No | false | |
resetCache * | boolean | Clear execution cache at each execution ? | No | false | |
FOREACHNUMBER | executables / executable | Executables List | What will be executed at each iteration. | No | null |
start | Accessor | Start value | No | 1 | |
end | Accessor | End value | At least one on two | ||
iterations | Accessor | Maximum number of iteration (if end value is precised, it will not be exceeded) | |||
increment | Accessor | Value added at each iteration | Yes | ||
var | String | Variable name | Yes | ||
indexVar | String | Name of the variable receiving current item index. | No | null | |
type | String | Variable type (might imply a cast) | No | null | |
stopAtFirstValidatedCondition | boolean | If a condition is verified, stop execution? | No | false | |
resetCache * | boolean | Clear execution cache at each execution ? | No | false | |
INDEX | source | Accessor | Source for the value to find in index. | Yes | |
index | Map [Object --> Executables List] | What will be executed, depending on source value. | Yes | ||
defaultRedirect | Object | If the value is not found in index, execute what is associated to this value. | No | null | |
defaultActions / defaultAction | Executables List | If the value is not found in index, execute these actions. | No | null | |
stopAtFirstValidatedCondition | boolean | If a condition is verified, stop execution? | No | true | |
stopAtFirstValidatedDefaultCondition | boolean | For default actions, if a condition is verified, stop execution? | No | false | |
RULE | condition | Condition | Condition to evaluate | No | null |
thens / then | Executables List | What to execute if condition is verified. (no condition is considered as always verified). | No | null | |
elses / else | Executables List | What to execute if condition is unverified. | No | null | |
stopAtFirstValidatedCondition | boolean | If a condition is verified, stop execution? | No | false |
* Advanced proprerty. Its usage might have s consequences on global exécutions performances.
Les Conditions
Addon ID | Property [/ Alias] | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
NOT | condition | Condition | Condition for which negate result. | Yes | |
ACCWRAPPER | accessor | Accessor | Accessor for which the result must be « wrapped » to be interpreted as a Condition. | Yes | |
CONDSET | not | boolean | Allows to negate result | No | false |
operator | Logical operator | Operator to apply between each Condition evaluation. | Yes | ||
conditions / condition | Condition List | List of Conditions to evaluate | Yes | ||
EVAL | not | boolean | Allows to negate result | No | false |
source | Accessor | Allows to retrieve source value, in general from input beans or variables. | Yes | ||
operator | Evaluation operator | Action to perform on values (equality, inequality...) | Yes | ||
reference | Accessor | Allows to retrieve reference value, in general a constant. | Yes | ||
iterationOperator | Logical operator | If at least one of the source or reference values should be iterated, gives the logical operator to apply at each iteration | Yes when iterating. | ||
optimizeMultiEval * | boolean | Allows to deactivate caching of results | No | true |
* Advanced proprerty. Its usage might have s consequences on global exécutions performances.
Les Fabriques de Contexte
Addon ID | Property [/ Alias] | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
CONTEXT | classIn | String | Complet Input / Output bean class name. (or short name if the package is part of the imports) | Yes | |
INOUTCONTEXT | classIn | String | Complet Input bean class name. (or short name if the package is part of the imports) | Yes | |
classOut | String | Complet Output bean class name. (or short name if the package is part of the imports) | No | « classIn » property value. | |
LISTCONTEXT | classProperties / classProperty | List of MListContextClassProperty | List of descriptors for all Object types which can be placed in the context. | Yes | |
LISTCONTEXT > MListContextClassProperty | className | String | Name of the class to describe | Yes | |
name | String | A name for the virtual getter created in the context for this class. If multiple: will return a Collection. Otherwise will contain directly the instance. | Yes | ||
multiple | boolean | Can we have several instances of this object in the context? | No | false |
Le Rule Set
Addon ID | Property [/ Alias] | Type | Description | Mandatory | Default value |
---|---|---|---|---|---|
RULEEXECUTIONSET | contextFactory | Context Factory | Context Factory implementation to use | No | null |
defaultObjectFilter | String | ObjectFilter class name to use with the sessions (cf. JSR 94 Specs). | No | null | |
loggerName | String | Allows to override default Logger name for this instance. | No | « name » property value. | |
stopAtFirstValidatedCondition | boolean | If a condition is verified, stop execution? | No | true | |
executables / executable | Executable List | All Executables to invoke during an execution. | Yes |