web statistics
top of page

How to expose rules variables?

In this tutorial, you will learn how to expose some of the rules settings (such as thresholds) as external variables which you can configure externally

Let's start with a template used in one of the previous examples

This time, we will focus on one particular threshold, just for simplification, that checks if the fund transfer is above a given threshold:

We want to change the hard coded value from 0.7 with a variable that can be changed at the runtime, while still keeping the default value as it is:

here is what we will do:

${variables.Transaction_Value} >= ${variables.Monthly_Revenue} * ${variables.THR_NO_RISK_VALUE}

As soon as I have added a new variable, my setting for this template was added, so I only had to change a type of the variable to double and add the default value 0.7

From then onwards, the template will still work as before, but now if we run a bulk run test, I can change this value at runtime to any other value.

Find more about this feature here

We can as well test this using our console, first as a subrule by running it in the debug mode:

or we can try the same from the parent template, that it is using this subflow as a policy rule, by hitting the button Test on the node AML_FundTransfer

Now let's change this value to a very small value:

and hit the test button again:

Now we see that the value was taken into account and that the policy rule evaluated it to the RISK for that transaction. Obviously we could have changed any other value and repeat the same process.

24 views0 comments


Rated 0 out of 5 stars.
No ratings yet

Add a rating
bottom of page