AFAIK, your understanding is correct.
What fireAllRules does is it executes rules on agenda(contains rules with
all conditions matched) until the agenda is empty. A rule can get to agenda
when you modify a fact or insert/retract a fact. If you call fireAllRules on
an empty agenda no rule will be fired.
The ruleflow groups just make the rules execute in specific order.
On Thu, Jan 15, 2009 at 11:22 PM, keithnielsen <keithnielsen(a)discover.com>wrote:
I have a fairly involved rule flow consisting of rule flow groups. I am
trying to understand
if the behavior I am seeing and my understanding of it are correct.
The flow executes as exepected the first pass through, objects are inserted
and the rules associated with the different nodes are executed. On the
second pass through the flow various nodes are triggered but none of the
ruleflow groups are activated/executed. My understanding of this is as
follows:
1) The only way to have these ruleflow groups fire/execute again is to
insert objects that cause a match or to fire all rules on the session
again.
2) Constraints on split/join nodes are always evaluated and don't need to
be
activated which is different than the constraints on a given rule
3) Rules that don't have any constraints, i.e. they are always true will
only execute once and will only execute with a call to fire all rules
Assuming my understanding of what is going on correct I have the following
questions:
Q. My particular use case is really screen flow/business process, and it
would be nice if I came to a node, that the rule was always evaluated, i.e.
currently rules that always evaluate to true aren't fired more than once.
For instance I have a node that simply instantiates a dialog and waits for
user input and I always want to instantiate that dialog when I come to that
node, regardless of the facts. Is there a way to achieve this without
firing
all rules again?
Q. Is firing all rules within a rule flow a legitimate way of achieving the
desired affect?
Shouldn't the ruleflow-group associated with a node always be evaluated if
the node is triggered? As it happens now, the rule flow gets stuck in an
infinite loop as the node contraints are conitniously evaluated but the
actual rule contraints are not. Seems inconsistent too me especially in the
context of a business process/rule flow.
Thanks
--
View this message in context:
http://www.nabble.com/Firing-Rules-in-Rule-Flows-tp21489239p21489239.html
Sent from the drools - user mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users