RuLa Functions
User-defined RuLa functions are a way to think about complicated rule situations only once and make actual rules shorter, cleaner and less error prone. Functions are essentially an expression: They either no or as many parameters (or arguments) as possible and always have a single return value.

How to create a user defined RuLa function

Configure RuLa Functions by opening Configuration -> Rula Functions and clicking "Add RuLa Function":

Structure of a function definition

Each function needs a name and a body expression.
1
function simple_function_without_arguments():
2
'this function returns a string'
3
end
Copied!
If necessary add arguments:
1
function function_with_two_arguments(first_string, second_string):
2
'this function returns a string plus ' + first_string + second_string
3
end
Copied!
Last modified 1mo ago