Custom rule utility functions
In the Business Rules editor, the Rule Condition builder permits the definition of expressions that contain custom utility functions. It is possible for a custom function to return a string formatted as a money amount in the given currency if given a big decimal value and a currency type.
To access a custom function in the expression builder, use the following syntax, with xxxx being the name of the custom method
Util.xxxx()
Gosu class PolicyContextDefinitionLibrary, in the
gw.bizrules.provisioning.contexts package, defines the
available custom functions. In the base configuration, this class contains such
functions as hasGoodDriverDiscount and
monetaryAmount.
To add new functions to this class, use the existing functions as examples of how to define a new function. In this way, you can make a utility function accessible as a context symbol. You can also exclude a utility function from a rule context.
