There are two main components that the ruleengine uses: Rules and Actions.
Rules are based on so called checks. There are a lot of predefined checks available:
- CheckIsEqual
- CheckIsNotEqual
- CheckContains
- CheckNotContains
- CheckIsBetween
- CheckIsNotBetween
- CheckIsEmpty
- CheckIsNotEmpty
- CheckIsEven
- CheckIsNotEven
- CheckIsGreater
- CheckIsGreaterOrEqual
- CheckIsSmaller
- CheckIsSmallerOrEqual
- CheckIsInList
- CheckIsNotInList
- CheckIsLowerCase
- CheckIsUpperCase
- CheckMatches
- CheckNotMatches
- CheckSoundsLike
- CheckNotSoundsLike
- CheckIsNegativNumber
- CheckIsNotNegativeNumber
- CheckLength
- CheckListHasMember
- CheckListNotHasMember
- CheckStartsWith
- CheckNotStartsWith
- CheckEndsWith
- CheckNotEndsWith
- CheckIsNull
- CheckIsNotNull
- CheckIsNumeric
- CheckIsPrime
- CheckIsNotPrime
- CheckLevenShteinDistanceIsEqual
- CheckLevenShteinDistanceIsGreater
- CheckLevenShteinDistanceIsGreaterOrEqual
- CheckLevenShteinDistanceIsSmaller
- CheckLevenShteinDistanceIsSmallerOrEqual
You can use and combine all these checks to build complex logic. You can connect individual rules with "and" and "or" conditions and group them. And you can connect different groups of rules with "and" and "or" conditions and combine those. So you have total flexibility to construct the logic.
The ruleengine will run the rules against given data and the result will be a "passed" or "failed" status. You can also run group of rules, if another group of rules passed or failed.
Based on this status of the rules you can then decide to implement actions. Actions update or modify the data. Following actions are available:
- AddLeadingSpaces
- AddLeadingZeros
- AppendValue
- PrependValue
- TrimValue
- ConcatenateValue
- LowercaseValue
- UppercaseValue
- ReplaceValue
- ReplaceValueFromMappingFile
- ReplaceValueFromList
- SetValue
- SubstringValue
- SetTodaysDate
- SetLastDayOfMonth
- SetFirstDayOfMonth
- SetMidDayOfMOnth
- AbsoluteValue
- Acosinus
- Cosinus
- Cosinush
- Sinus
- Sinush
- SquareRoot
- AddValues
- SubstractValues
- AddPercentage
- SubstractPercentage
- DevideValue
- MultiplyValues
- RoundValue
- RandomValue
- RemainderValue
- AddMinutes
Both rules and actions can be extended. Implementing your own ones is easy and so you can integrate your personal logic and encapsulate it to run with the ruleengine.
The complete documentation is available on GitHub.
Carpe Diem.