One of the very important needs in rules execution is collecting all sorts of information during the execution process. For example, what rules have fired, or what conditions were or were not met. This information helps you to understand how a particular decision is made based on the defined business rules.

Explainability

This means once rules are executed, and events are collected, you can create a view to explain what decisions has been made, based on what rules execution as part of what process and under what circumstances.

eventV

Event viewer of FlexRule Designer showing the runtime behaviour of a decision.

The above image shows the hierarchical view of what has happened at runtime and why a decisions has been made. These events can be used to build Trace, Log and or provide an application custom view of what's happening at runtime.

Additionally, at an application level they can embed trace into the system and present different perspective to the user:

financial reporting, xbrl, ifrs

The application must be able to explain why a decision was taken and allows drilling down to the reasons.

There are many different ways to collect this information. You can collect them at service call on both client side or store them at the server storage. Or, in the authoring environment when execution is finished, you can collect all of the events from the result using Parameters and Watch Windows:

Car Insurance- event

In addition to that if you only want to generate a log information from these events, you can simply collect a ready-to-use one from the ConclusionLog property of the execution result.

rules execution trace

Conclusion

Events allow you to understand “why” a decision is taken when it is taken. And you can simply store this information along with the result into your system for future use. Business rules execution should not be like running a black box, you need to have full visibility during the modeling as well as at execution time.

For more information please visit our Resource Hub at https://resource.flexrule.com/knowledge-base/events-at-runtime/

Last updated January 15th, 2024 at 08:49 am, Published November 25th, 2016 at 08:49 am