Consider a rule A and another one, B, extending it. If both are activated
and
A fires first, it may change a fact so that A's consequence isn't true any
more.
But this would deactivate B so that it can't fire at all. You can also
write a consequence for B that modifies facts so that A's condition becomes
false.
The only reliable way seems to let B's consequence modify only
facts bound in B's (additional) conditions and to give it a higher
constraint - then A's consequence will fire later and modify facts
bound in A's condition.
There's no documentation on "extends" for rules, although it has been
around
for quite some time. Perhaps it's just an experimental feature that will
disappear again...?
-W
On 7 September 2012 22:47, lhorton <LHorton(a)abclegal.com> wrote:
Good points. And in fact, decision tables are already designed to do
the
kind of thing I'm experimenting with using "extends," i.e. they let one
put
a set of common conditions in one CONDITION column that can be used by
one-to-many rules in the table.
Is there documentation about how 'extends' works as a rule option? In my
experiments so far I see the base rule usually firing before the rule that
extends it, but in some cases i see only the extended rule firing, which
didn't make sense to me. We're still on 5.2.0.Final though, so maybe
things
have changed. Don't worry, I'm not going to file a bug report! Just
experimenting with this new-to-me feature.
--
View this message in context:
http://drools.46999.n3.nabble.com/Can-we-use-rule-extends-option-in-decis...
Sent from the Drools: User forum mailing list archive at
Nabble.com.
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users