Customize the inferencing cycle with custom functions and inferencing listeners

A rulebase may need to perform a calculation that cannot be done (or cannot be done easily) using the built-in functions of the Oracle Determinations Engine. To work around this, a Java or .NET developer can use custom functions or inferencing listeners to perform calculations that cannot be done in rules.

In general this should be a last resort when rules cannot achieve the desired result, as using custom code can impact the following:


If custom code is required, it can either be in the form of a custom function or an inferencing listener. The main difference between a custom function approach and an inferencing listener approach is that an inferencing listener is able to ‘infer’ anything in the session (by modifying the session directly), whereas a custom function can only calculate individual values and is called by the engine when needed.

Custom Function

A custom function is like any other standard function in Oracle Policy Automation, but the behavior is defined with a custom Java or .NET class. Use a custom function when:

Inferencing Listeners

An inferencing listener is also defined by a custom Java or .NET class and gets called before, during (when triggered by inferencing events) and after the inference cycle. When used to customize the inferencing, the class should minimally implement the endInferencing method to set or update any custom inferred values.

After an inferencing cycle, if an inferencing listener has made changes to the rulebase session then another inferencing cycle is performed.

Use an inferencing listener to customize the inferencing cycle when:


See also:

Rulebase configuration file