Would agenda filters be a good usage in this scenario.
I have a set of objects I want to evaluate in stages, and so I only want
certain rules to fire at certain stages. So the idea would be to have the
main application do some work on those objects then updte and fire rules on
them for stage 1(Agenda Filter 1) where the rule enine would set some bits
based on the objects based on other fields.then the outside appliction would
process some more and then update the objects and fire ther rules for stage
2(Agenda Filter 2) and so on for many stages. This would make it easier to
write rules that only evaluate on the obects at certain stages and would
make it easier to write rules that don't' conflict with each other(i.e. a
rule I only want to evaluate stage 2 objects evaluating stage 1 objects).
IF this *is* a reasonable usage scenario, is there a sample in the
documentation of Firing rules on an agenda filter. I found reference to
writing a rule file that puts rules in certain agendas, but not actually
firing those rules from the client.
Thanks,
Chris
Show replies by date
Yes, you could use agenda filters, but I think agenda groups are more what you're
looking for. Agenda groups allow you to do the staging type behavior easily, usually
implemented by having a rule that is of lower priority than the rest of the rules in the
group moving to the next stage using drools.setFocus() in the action.
________________________________
From: Chris Richmond <crichmond(a)referentia.com>
To: Rules Users List <rules-users(a)lists.jboss.org>
Sent: Friday, September 25, 2009 1:41:44 PM
Subject: [rules-users] Agenda Filters usage
Would agenda filters be a good usage in this scenario.
I have a set of objects I want to evaluate in stages, and so
I only want certain rules to fire at certain stages. So the idea would be
to have the main application do some work on those objects then updte and fire
rules on them for stage 1(Agenda Filter 1) where the rule enine would set some
bits based on the objects based on other fields…then the outside
appliction would process some more and then update the objects and fire ther
rules for stage 2(Agenda Filter 2) and so on for many stages. This would
make it easier to write rules that only evaluate on the obects at certain
stages and would make it easier to write rules that don’t’ conflict
with each other(i.e. a rule I only want to evaluate stage 2 objects evaluating
stage 1 objects).
IF this *is* a
reasonable usage scenario, is there a sample in the documentation of Firing
rules on an agenda filter. I found reference to writing a rule file that
puts rules in certain agendas, but not actually firing those rules from the
client.
Thanks,
Chris