1
votes

We are doing POC on business rules using CodeEffects rule engine. Trying to write evaluation rules using rule editor. Here question is how to use + operator between custom functions to evaluate specific rule. For example, I would like to write rule like below

check if(somefunc(somevar1)+somefunc(somevar2)+somefun(somevar3) is greater than [1]

Please help how to write such rule in editor.

1

1 Answers

0
votes

You need to use the calculation option (the "Add calculation..." menu item) as the value of your condition. Keep in mind that in Code Effects each condition must begin with either a field or an in-rule method. Because of that, your rule needs to be changed as follows:

    Check if Somefunc(Somevar1) is greater than
       { Somefunc(Somevar2) + Somefunc(Somevar3) - [1] }

Notice that the result of the evaluation is still the same, I just moved some rule elements around.