<div dir="ltr"><br>&nbsp;&nbsp; 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.<br>
<br>&nbsp;&nbsp; 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&#39;t have it yet.<br>
<br>&nbsp;&nbsp; []s<br>&nbsp;&nbsp; Edson<br><br><div class="gmail_quote">2008/7/31 Kris Nuttycombe <span dir="ltr">&lt;<a href="mailto:kris.nuttycombe@gmail.com">kris.nuttycombe@gmail.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi, all,<br>
<br>
I have a set of rules where the LHS is essentially the same except for<br>
a couple of additional conditions in each case. What is the best way<br>
to factor out these common predicates? Should I simply create an<br>
intermediate fact based upon the common set of conditions and then<br>
reason with that fact, or is there a way of reusing them without<br>
adding another fact to the mix?<br>
<br>
Thanks,<br>
<br>
Kris<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</blockquote></div><br><br clear="all"><br>-- <br> Edson Tirelli<br> JBoss Drools Core Development<br> JBoss, a division of Red Hat @ <a href="http://www.jboss.com">www.jboss.com</a><br>
</div>