Addons Properties

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 IDPropertyTypeDescriptionMandatoryDefault value
[all]nameStringA name for this instance.Nonull
descriptionStringA description for this instance.Nonull

Evaluation Operators

Addon IDPropertyTypeDescriptionMandatoryDefault value
BETWEENminAccessorMinimum accepted value.Nonull
maxAccessorMaximum accepted value.Nonull
COLDISJOINEDNone
COLEQNone
COLINNone
COLINCLUDEDNone
COLINCLUDESNone
COLINTERSECTSNone
COLNENone
COLNOTINNone
EQNone
EMPTYNone
GTNone
GTENone
INNone
LTNone
LTENone
MATCHNone
NENone
NOTCONTAINSNone
NOTEMPTYNone
NOTINNone
NOTMATCHNone
NOTNULLNone
NULLNone

Logical Operators

Addon IDPropertyTypeDescriptionMandatoryDefault value
ANDNone
ORNone
VALBETWEENconsiderValidatedbooleanCount verified or unverified conditions.Notrue
minintMinimum number of verified conditions (or unverified).
-1 for no limit.
No-1
maxintMaximum number of verified conditions (or unverified).
-1 for no limit.
No-1
XORNone

Mathematical Operators

Addon IDPropertyTypeDescriptionMandatoryDefault value
DIVIDED_BYdecimalsRounderRounding specifications ***NoStrip, 10 decimals, half up.
MINUSNone
MODULONone
MULTIPLIED_BYNone
PLUSNone
POWERNone

Accessors

Addon IDProperty [/ Alias]TypeDescriptionMandatoryDefault value
AVAILABLEpropertyStringProperty for which accessibility must be checked.Yes
ABSsourceAccessorData source. Might be a number or a collection of numbers.Yes
CASTsourceAccessorData sourceYes
targetTypeClassTarget type.Yes
targetGenericTypeClassIf target type is a collection, provides the type of the elements.No
COALESCEsources / sourceAccessorData sourceYes
CONCATsourceAccessorData sourceOne and only one
values / valueAccessor ListData source
separatorStringSeparator inserted between each itemNonull
CONDCOUNTconditions / conditionCondition ListList of conditions to evaluateYes
considerValidatedbooleanCount verified or unverified conditions.Notrue
CONDWRAPPERconditionConditionCondition to « wrap »Yes
COUNTsourceAccessorData source on which count will be performedYes
conditionConditionCondition for countNonull
DATEDIFFdate1AccessorData source of the first dateYes
date2AccessorData source of the second dateYes
fieldAccessorUnit (a character amongst YMDhmsz)Yes
DATEOPsourceAccessorSource of the date to modifyNo0
yearAccessorNumber of years to addNo0
monthAccessorNumber of months to addNo0
dayAccessorNumber of days to addNo0
hourAccessorNumber of hours to addNo0
minuteAccessorNumber of minutes to addNo0
secondAccessorNumber of seconds to addNo0
milliAccessorNumber of millisconds to addNo0
DEFINEDpropertyStringName of the variable for which definition must be checked.Yes
EXEWRAPPERexecutableExecutableExecutable to « wrap »Yes
FILTERsourceAccessorData source on which filtering will be performedYes
conditionConditionCondition for filteringYes
FORMATmessageAccessorMessage to format, containing variables under the form {{var}}.Yes
arguments / argumentList 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
ITERATEsourceAccessorData sourceOne and only one
values / valueAccessor ListData source
separatorStringSeparator for delimitedsource.No";"
MAPENTRIESsourceAccessorData sourceYes
MAPKEYSsourceAccessorData sourceYes
MAPVALUESsourceAccessorData sourceYes
MAXsourceAccessorData source on which search will be performedYes
conditionConditionFiltering conditionNo
onAccessor ListNested properties to compare onNoNatural ordering
nbElementsToRetrieveAccessorMaximum number of elements that will retrievedNo1
nullIsMaxValuebooleanHow to handle null values.Nofalse
MINsourceAccessorData source on which search will be performedYes
conditionConditionFiltering conditionNo
onAccessor ListNested properties to compare onNoNatural ordering
nbElementsToRetrieveAccessorMaximum number of elements that will retrievedNo1
nullIsMinValuebooleanHow to handle null values.Nofalse
NEWclassNameStringName of the class to instanciateYes
arguments / argumentAccessor ListValues of constructor argumentsNonull
argumentsTypes / argumentsTypeString ListTypes of constructor argumentsNonull
NULLIFEMPTYsourceAccessorSource for the data to checkYes
PROPERTYpropertyStringProperty to read or write by introspectionYes
sourceAccessorSource for data to intraspect. Allows to override the base provided by the execution context.Nonull
optimizeMultiReadbooleanAllows to deactivate caching of read data. *Yes
SEARCHsourceAccessorData source on which search will be performedYes
conditionConditionCondition for searchYes
SIZEsourceAccessorData sourceYes
SPLITsourceAccessorData sourceYes
separatorStringRegexp used to split input String.No";"
SUBPARTsourceAccessorData sourceYes
beginIndexintBegin indexYes
endIndexintEnd index.
-1 for no limit.
No-1
TERNARYconditionConditionCondition to evaluateYes
ifTrueAccessorReturn value if trueNonull
ifFalseAccessorReturn value if falseNonull
VALUEtypeStringForces conversion of value to a specific typeNonull
valueObjectConstant value returnedNonull
VALUESvaluesAccessor ListAll accessors whose values ​​will form the result.Yes
VPROPERTYpropertyAccessorDynamically retrieves accessed property name during executionYes
ROUNDsourceAccessorSource for rounded dataYes
decimalsRounderRounding specifications ***No« 0 »
AVERAGE
MOD
MULTIPLY
POW
SUBTRACT
SUM
Source ****AccessorData sourceAt least one on two
values / value ****Accessor ListData source
propertyAccessorSub-property for accessing numberNonull
conditionConditionCondition for taking current item into account. Allows to reproduce Excel SUM.IFNonull
decimalsRounderRounding specifications ***No« 0 »
coefficientsSource (AVERAGE only) *****AccessorTo obtain éventual coefficientsNonull
coefficientsValues (AVERAGE only) *****Accessor ListTo obtain éventual coefficientsNonull
coefficientsProperty (AVERAGE only) *****Accessor ListSub-property to obtain éventual coefficientsNonull
SINGLE_MATHleftAccessorLeft operandYes
rightAccessorRight operandYes
operatorMath OperatorDefinition 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 IDProperty [/ Alias]TypeDescriptionMandatoryDefault value
ADDsourceAccessorSource dataYes
targetAccessorTarget CollectionYes
ADDALLsourceAccessorSource data (Collection, Tableau, Iterable, ...)Yes
targetAccessorTarget CollectionYes
CLEARtargetAccessorTarget Object (Map, Collection, etc).Yes
DEFsourceAccessorSource of data to put in variableYes
varStringVariable nameYes
typeStringVariable type (might imply a cast)Nonull
EXECcommandAccessorSystem command to execute.Yes
varStringVariable receiving exit codeNonull
typeStringType of the variable receiving exit code.Nonull
FLOWCONTROLcommandStringExecution control command *.Yes
appliesToStringEventualy, name of the addon on which to apply command.Nonull
messageAccessorEventualy, a message if raising an error.Nonull
PRINTsources / sourceAccessorSource(s) for data to print.Yes
errorbooleanTo write on error stream.Nofalse
PRINTFmessageAccessorMessage to format, containing variables under the form {{var}}.Yes
arguments / argumentList 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.Nonull
errorbooleanTo write on error stream.Nofalse
RESET_CACHENone
SETsourceAccessorSource dataYes
targetAccessorTarget dateYes
SORTtargetRead AccessorSource dataYes
ascbooleanIs sort to be ascending or descending ?Notrue
nullFirstbooleanIf a value is null, should it be placed first or last ?Notrue
byList of Read AccessorsIf comparison should be made on one or more sub pproperties.No
inplacebooleanIs sort to be made in place, or a new instance of collection should be created ?Notrue

* 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 IDProperty [/ Alias]TypeDescriptionMandatoryDefault value
ACCEXECaccessorAccessorAccessor to wrapNonull
BLOCKexecutables / executableExecutables ListWhat will be executed in this block.Nonull
stopAtFirstValidatedConditionbooleanIf a condition is verified, stop execution?Nofalse
FOREACHexecutables / executableExecutables ListWhat will be executed at each iteration.Nonull
sourceAccessorSource for data to iterateYes
varStringVariable nameYes
indexVarStringName of the variable receiving current item index.Nonull
typeStringVariable type (might imply a cast)Nonull
stopAtFirstValidatedConditionbooleanIf a condition is verified, stop execution?Nofalse
resetCache *booleanClear execution cache at each execution ?Nofalse
FOREACHNUMBERexecutables / executableExecutables ListWhat will be executed at each iteration.Nonull
startAccessorStart valueNo1
endAccessorEnd valueAt least one on two
iterationsAccessorMaximum number of iteration (if end value is precised, it will not be exceeded)
incrementAccessorValue added at each iterationYes
varStringVariable nameYes
indexVarStringName of the variable receiving current item index.Nonull
typeStringVariable type (might imply a cast)Nonull
stopAtFirstValidatedConditionbooleanIf a condition is verified, stop execution?Nofalse
resetCache *booleanClear execution cache at each execution ?Nofalse
INDEXsourceAccessorSource for the value to find in index.Yes
indexMap [Object --> Executables List]What will be executed, depending on source value.Yes
defaultRedirectObjectIf the value is not found in index, execute what is associated to this value.Nonull
defaultActions / defaultActionExecutables ListIf the value is not found in index, execute these actions.Nonull
stopAtFirstValidatedConditionbooleanIf a condition is verified, stop execution?Notrue
stopAtFirstValidatedDefaultConditionbooleanFor default actions, if a condition is verified, stop execution?Nofalse
RULEconditionConditionCondition to evaluateNonull
thens / thenExecutables ListWhat to execute if condition is verified.
(no condition is considered as always verified).
Nonull
elses / elseExecutables ListWhat to execute if condition is unverified.Nonull
stopAtFirstValidatedConditionbooleanIf a condition is verified, stop execution?Nofalse

* Advanced proprerty. Its usage might have s consequences on global exécutions performances.

Les Conditions

Addon IDProperty [/ Alias]TypeDescriptionMandatoryDefault value
NOTconditionConditionCondition for which negate result.Yes
ACCWRAPPERaccessorAccessorAccessor for which the result must be « wrapped » to be interpreted as a Condition.Yes
CONDSETnotbooleanAllows to negate resultNofalse
operatorLogical operatorOperator to apply between each Condition evaluation.Yes
conditions / conditionCondition ListList of Conditions to evaluateYes
EVALnotbooleanAllows to negate resultNofalse
sourceAccessorAllows to retrieve source value, in general from input beans or variables.Yes
operatorEvaluation operatorAction to perform on values (equality, inequality...)Yes
referenceAccessorAllows to retrieve reference value, in general a constant.Yes
iterationOperatorLogical operatorIf at least one of the source or reference values should be iterated, gives the logical operator to apply at each iterationYes when iterating.
optimizeMultiEval *booleanAllows to deactivate caching of resultsNotrue

* Advanced proprerty. Its usage might have s consequences on global exécutions performances.

Les Fabriques de Contexte

Addon IDProperty [/ Alias]TypeDescriptionMandatoryDefault value
CONTEXTclassInStringComplet Input / Output bean class name. (or short name if the package is part of the imports)Yes
INOUTCONTEXTclassInStringComplet Input bean class name. (or short name if the package is part of the imports)Yes
classOutStringComplet Output bean class name. (or short name if the package is part of the imports)No« classIn » property value.
LISTCONTEXTclassProperties / classPropertyList of MListContextClassPropertyList of descriptors for all Object types which can be placed in the context.Yes
LISTCONTEXT >
MListContextClassProperty
classNameStringName of the class to describeYes
nameStringA 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
multiplebooleanCan we have several instances of this object in the context?Nofalse

Le Rule Set

Addon IDProperty [/ Alias]TypeDescriptionMandatoryDefault value
RULEEXECUTIONSETcontextFactoryContext FactoryContext Factory implementation to useNonull
defaultObjectFilterStringObjectFilter class name to use with the sessions (cf. JSR 94 Specs).Nonull
loggerNameStringAllows to override default Logger name for this instance.No« name » property value.
stopAtFirstValidatedConditionbooleanIf a condition is verified, stop execution?Notrue
executables / executableExecutable ListAll Executables to invoke during an execution.Yes