Kris Nuttycombe wrote:
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?
'or' conditional element will result in subrule generation, but you
would need to put all your logic in a single rule. You could try a DSL
to create building blocks of your re-usable parts. Also your predicate
logic should be in a function, so that function is re-usable.
Thanks,
Kris
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users