This sample shows how the rule engine executes many rules
on a few objects.
Prerequisites
You
must have Rule
Designer installed
to import and run this sample.
Description
This
sample shows how the rule engine executes many rules on a few objects
using financial events, such as deposits and refunds, as an example.
The rules require no stateful behavior of the algorithm. You can execute
rules using either the RetePlus algorithm or the sequential algorithm.
The
key features of this sample include:
- IlrRulesetArchiveBuilder ruleset archive building
API
- IlrRuleset and IlrContext parsing
and execution API
- IRL constructs:
- Ruletask declaration (ruletask main { ... } construction)
- Sequential and RetePlus algorithms (property algorithm
= ... and other property constructions)
- Runtime selection of rules in a ruletask in a rule domain (body
= dynamicselect()... construction)
- Common pattern matching syntax for both sequential and RetePlus
algorithms. Patterns include existence tests, tests on object attributes
and method values, joins between objects
- Use of scope, dynamicselect, collect
IlrRule(...) and cache to improve performance