My proposal: Insert a List<Root> of your root facts. A low-salience rule matching this List<Root> cleans up the remains of the previous root processing and plucks off N Root objects from the List and inserts them.
-W 2010/3/11 Ryan Fitzgerald <ryan.fitzger...@ericsson.com> > 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. > > > > _______________________________________________ > rules-users mailing list > rules-users@lists.jboss.org > https://lists.jboss.org/mailman/listinfo/rules-users > >
_______________________________________________ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users