IT:AD:Rule Engine:Concepts
## Types of rule engines ##
#### Forward Chaining #### * Pros:
- Much closer to normal programming (ie lower cost to understand by devs, BAs etc).
* Cons:
- Not too many.
* Syntax: - IF [AND…] THEN
* Process:
- Takes inputs (Data),
- On first match, adds THEN result to data set (inputs)
- continues till no match.
* Types:
- Stateless Inference Rules:
- [AND…AND…] THEN
- Pros:
- Suitable in Stateless (read Web) environment.
- Rective/Event Condition Action
- [EVENT] [IF] [AND...AND...] [THEN]
- Cons:
- Leads towards (but not necessarilly) Statefulness (read non-Web).
Note:What is not clear is whether reprocessing of Rules should always start from next rule, or reprocess from Top to account for new matches. If reprocessing from Top, one would have to keep a stack of previous matches...
Also known as DATA-Driven versus Backward Chaining, which is GOAL-DRIVEN.
## Backward Chaining ##
Completely different… it starts with the property type and collects conditions that check against it.
## Rete algorithm ##