Thanks; my primary concern was the code replication, so I'll go with
the intermediate fact approach.
On Thu, Jul 31, 2008 at 4:54 PM, Edson Tirelli <tirelli(a)post.com> wrote:
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.
2008/7/31 Kris Nuttycombe <kris.nuttycombe(a)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?
> rules-users mailing list
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
rules-users mailing list