[rules-users] Reusing predicates

Edson Tirelli tirelli at post.com
Thu Jul 31 18:54:22 EDT 2008


   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 at 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 at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080731/5dffb6a3/attachment.html 


More information about the rules-users mailing list