Hi,
In our application, we want to process a large amount of facts. However, to avoid an
overload on memory and drools, we would like to process the facts in batches.
Our rules are setup so that we only insert a small number of initial or "root"
facts, and then these facts trigger rules to fire that cause many other facts to be
inserted, themselves triggering other rules.
One way of batching this would be for the application to only insert the root facts into
memory one by one and not inserting the next root fact until the previous one (and the
batch of facts associated with it) have been processed and subsequently revoked.
However, instead of the batching being controlled by the application, I would like to use
a rule to do this i.e. insert all the root facts into memory and then call fireAllRules
and have them processed one at a time.
Does anyone have an idea how I can write a rule that causes a set of facts to trigger
their rules, one fact at a time?
Thanks.