Doing a function or procedure in a rules file

Hi all,

I have a question, is there a way to make a procedure or function in a rules file which can be called from multiple rules (in order to prevent code duplication)?

Thank you,


Which language? If Rules DSL, see Reusable Functions: A simple lambda example with copious notes but be sure to pay attention to the limitations (only visible in that one .rules file, everything needed myst be passed in as an argument, limit of seven arguments total.

But, if you want to do this, it’s probably a sign that you’ve outgrown Rules DSL and would be happier with any of the other rules language options where you’ll have full language features.

Yes I think im using Rules DSL. And indeed maybe I need something more flexible. But thx for the pointer!