Not sure if you are worried about syntax or performance. If you are worried about performance, just write your common Patterns in the same order among your multiple rules and the engine will reuse them.

   If you are worried about the syntax, i.e. not replicating the same code among multiple rules, the intermediate fact is probably the best solution right now. We want to implement rule inheritance or rule templates, but we don't have it yet.

   []s
   Edson

2008/7/31 Kris Nuttycombe <kris.nuttycombe@gmail.com>
Hi, all,

I have a set of rules where the LHS is essentially the same except for
a couple of additional conditions in each case. What is the best way
to factor out these common predicates? Should I simply create an
intermediate fact based upon the common set of conditions and then
reason with that fact, or is there a way of reusing them without
adding another fact to the mix?

Thanks,

Kris
_______________________________________________
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users



--
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com