no when its finished, the agenda is clear.

I think what you really want is "Agenda Groups" where it is partioned based
on some logic - but this is an upcoming drools 3 feature.

in the meantime, you can also iterate through and "modify" all the objects
that are already in working memory, causing rules to be put on the agenda
again (possibly).

However, I think the correct way is what you suggested, as you are talking
about 2 different points in your applications workflow, hence 2 rulesets.
The facts just happen to be the same. In any case, the "cost" is not so much
in iterating and calling assertObject, but the work done to calculate what
rules should fire, which in any case needs to happen twice.

Someone may have another more efficient suggestion however.

On 3/7/06, Lionel Port <[EMAIL PROTECTED]> wrote:
>
> When you use the fireAllRules(AgendaFilter) method on the WorkingMemory
> does
> it clear the Agenda when its done or can you fire different rules in the
> working memory at different points in time without modifying the facts in
> between.
>
> The rules I have can be broken into two distinct rulesets that need to be
> executed at different points but the conditions largely operate on the
> same
> facts, so I was trying to save time by asserting all the facts once and
> then
> doing something like:
>
> memory.fireAllRules(agendaFilter1);
> // do something not related to drools
> memory.fireAllRules(agendaFilter2);
>
>
> It doesn't seem to be working though. Should I just put the rules in
> different rule bases and assert the facts before I use it.
>
>

Reply via email to