2009/11/26 Leonardo Gomes <firstname.lastname@example.org>
On Tue, Nov 24, 2009 at 10:42 PM, Leonardo Gomes <email@example.com> wrote:
Now, let's say FactA(1) indicates a fact of type FactA and id = 1.
- Then, in the beginning, I insert FactA(1) and FactA(2) in my working memory and fire the rules.
rule "test non existence"
not FactA( id == 4 )
output.add("there's no FactA id 4");
- This rule is fired and the message is added to my output object.
Later on, I have a notification that a FactA has changed, then I:
- retract all FactAs from my working memory
- clear all FactA-related messages from my output object
- reload FactAs (let's say now I have FactA(1), FactA(3), but NOT FactA(4))
- reinsert them in the WM
- fire the rules
The rule that checks that there's no FactA(4) doesn't refire.