[rules-users] Agenda-group in fact insert time

Mark Proctor mproctor at codehaus.org
Sat May 11 11:49:40 EDT 2013


On 11 May 2013, at 16:23, Sonata <plz.write.to at gmail.com> wrote:

> After a few testing, it seems that this "rule extends rule" feature is not
> exactly what I want.
> 
> Say rule "B" extends "A"
> 
> rule "A" will be evaluated. This is OK.
> 
> when it comes to rule "B", first, conditions in rule "A" will be evaluated
> again, then the conditions in rule "B" will be evaluated.
> 
> That is not what I expected in this feature. May be it is only half baked?
> 
> I would love to see this feature to be enchanted. Like if rule "B" extends
> "A", rule "C" extends "A"
> then once rule "A" is evaluated, the result (to be executed or not) should
> be used when evaluating rule "B" and rule "C".
> 
> If rule "A" does not match the conditions, none of rule "B" nor rule "C"
> should be evaluated again.
> 
> If rule "A" matches the conditions, when it comes to rule "B" or rule "C",
> those conditions in rule "A" should not be evaluated again.
> 
> Otherwise it is just like I repeated the conditions of rule "A" in rule "B"
> and rule "C" again. The only saving from this feature is in the code by
> typing less.
"extends" implicitly takes advantage of node sharing.
If B extends A, when you evaluate B you effectively get A for free. It will not need to re-evaluate any conditions specific to A, as they re already done. 

Mark
> 
> 
> 
> --
> View this message in context: http://drools.46999.n3.nabble.com/Agenda-group-in-fact-insert-time-tp4023749p4023779.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users




More information about the rules-users mailing list