Overview
Rule systems, because of their declarative focus, are concerned with bits of knowledge. Rule systems come across this knowledge over time, and the details of this knowledge is subject to frequent change. The rule system typically uses this knowledge to make complex decisions.
Over time, a thing which was once true might cease to be true. The rule system can be trained to acknowledge this change in conditions. As the knowledge in the system changes, it affects decisions that system makes. Sometimes, when the system decides that a bit of knowledge is no longer relevant or useful, that bit of knowledge is forgotten, cleared from the system's memory.
In Drools there are operations for becoming aware of a fact, purging a fact, or modifying a known fact. There are ways to use these operations through Drools' runtime API, and ways to encapsulate these operations into DRL files. But they are summed up here:
Assert
Remember a bit of knowledge or commit it to memory.
Example: Remember that weather is rainy today.
Retract
Forget a bit of knowledge or remove it from your memory.
Example: Forget the weather from last Wednesday — it isn't important anymore.
Modify
Alter a bit of knowledge about something when the conditions change.
Example: Acknowledge when the rain ends and the weather turns sunny and remember from that point on that the weather outside is pleasant.
Working Memory
Knowledge in a Rule Engine is collected into the Working Memory. Knowledge is asserted, retracted and modified within the working memory and the rules are evaluated to determine what actions, if any, should be taken over the course of the rules' execution.
