No, the entire rule set does not get re-evaluated if the WorkingMemory
changes.  When a new fact is asserted, that fact gets "matched" against the
rule set, but *only* that fact.  Previous matches don't happen again,
otherwise you'd constantly be getting recursion problems.  Drools isn't that
inefficient -- it can't afford to be!

Take a look at the example code and DRL files distributed with Drools.
Those examples should show you how various very simple problems are solved,
and reveal more of how rules interact with each other.  Also, you should
definitely dive right into trying out some code and rules of your own, that
will help you iteratively build up your rules set.  I think you'll find it's
simpler than you think.  More complex rules do require complex logic, but it
is quite possible to start simple.

Also, read the manual and become familiar with the RETE algorithm and other
algorithms Drools uses -- they're only lightly explained in the manual, but
there are plenty of other engines based on Rete and other info sources (like
the Wikipedia page on RETE:  http://en.wikipedia.org/wiki/Rete_algorithm).
That will better explain how rule matching happens.

---
Michael J. Suzio
[EMAIL PROTECTED]

Reply via email to