Implementing rule engines for leading insurers

BBD designed and implemented a fully scalable generic rules engine for a leading short-term insurer, enabling them to remain competitive in a marketplace where complex risk-based rules define the price and allow an insurer to position themselves as a sector leader.



  • Create complex user-defined formulas using input parameters, lookup values, user functions and constant values
  • Real-time validation of these user-created formulas and functions
  • Determine possible discrepancies through real-time comparisons with different simulation results
  • Ability to run simulations on custom datasets with input override capabilities



  • Risks now calculated based on a variety of baseline factors
  • Quick real-time changes in decision models
  • In-memory execution with minimal database and disk actions during calculations
  • Reduction in simulation timing from days to a few hours

Overview of the solution


Decisions made in the insurance sector are based on thousands of factors categorised by different rule sets, with a proliferation of rules that manage the policy lifecycle. The speed at which these calculations are performed drives the ability to be able to produce multiple results, based on client input, all while the sales process is in progress.

Furthermore, the ability to change any risk-based rules and do “what-if” analyses and result comparisons on the changes is also important, as it reduces risk on possible inefficient or ineffective rule changes. This can be a timely process, depending on the amount and complexity of the rules and the base dataset used for comparison.

To navigate these challenges, the insurance client approached BBD to design and implement a generic rule-based decision engine. The engine is fully scalable to allow multiple instances to be run within any environment. The generic interface ensures the engine can be used for multiple purposes such as premium calculations using risk data, risk level determination using multiple risk points, and device and alarm requirements. The engine management system also allows the running of multiple simulations on an existing base dataset, using thousands of rules and referencing more than a million datapoints.

This generic rules engine provides the client with a lot more “what-if” scenarios than what was previously possible. It also allows for the rules to be changed using an effective database activation pattern and proper versioning.

Deployments have been greatly simplified with a single deployment package.

The engine has been designed as a stand-alone service and can therefore be used for disparate systems. Implementation of the engine has greatly improved the ability to act, in a timely fashion, on external factors that impact the insurance industry, ensuring all relevant risks are addressed.

Due to the clean separation between the architectural components, the solution also lends itself to be deployed in a distributed fashion on either public, private or cloud infrastructure. By leveraging cloud offerings such as Database-as-a-Service, Simple Object Storage and Virtual Machines, the solution can be hosted on any of the public cloud providers in a traditional manner. Alternatively, with minor changes, the solution can easily be re-platformed for any of the major public vendors, to realise cost and operational overhead savings by using the latest cloud offerings such as serverless functions, managed NoSQL databases and cloud telemetry functionality.


The generic rules engine allows custom rules and model definitions, and comprises two main components, namely the UI (user interface) and the simulator.

The UI allows the user to do the following:

  • Easy changes to factor data
  • Easy creation of new rating models and rules without development requirements
  • Maintainability of custom defined rules and models
  • Running of real-time simulations in a specific data environment that will not impact the online system
  • Better control over the deployment of rule models
  • Introduce version control for the different rule models

The simulator allows the user to rerun risk calculations based on new calculation models and factor data, comparing the results against previous calculations or existing production results. This is required to make an informed decision on potential risk calculation changes. Input and result data for each of the calculation points defined in the formula section can also be stored. When a simulation run is done, the data from the new run can be compared against a previous data set.

The system also has the ability to store calculation results for each run, for statistical analysis on different sets.

Impact of BBD’s partnership

BBD’s solution has decreased the time taken to do the simulations from multiple days to a few hours, allowing for real-time changes in decision models. This enables viable pricing and risk considerations influencing the long-term view. Through effective rules governance the insurer can now avoid unnecessary complexity, drive consistency and ensure compliance. This has competitively positioned them as a leader in the insurance sector.

Read more

If you’d like to engage with us, we’d love to hear from you