1. Home
  2. Sample Projects
  3. Liability Fee Calculation

Liability Fee Calculation

◷ Reading Time: 5 minutes

The Liability Fee Calculation sample will show how to calculate the premium for a given liability amount based on a given set of rules.

In this tutorial, we are going to create a decision table that calculates premium based on the liability amount of an insured asset. Therefore, in case of a loss or damage, the insurance company will compensate the owner based on the rules below:

  • Up to and including $50 000 –> fixed amount of $500.00 (Base premium)
  • $50 001 to $100 000 –> Add $40.00 for each $10 000 increment
  • $100 001 to $200 000 –> Add $30.00 for each $10 000 increment
  • $200 001 to $300 000 –> Add $20.00 for each $10 000 increment
  • $300 001 to $1 000 000 –> Add $10.00 for each $10 000 increment
  • $1 000 001 to $3 000 000 –> Add $7.00 for each $10 000 increment
  • $3 000 001 to $5 000 000 –> Add $10.00 for each $10 000 increment

How to Run the Liability Fee Calculation

1. Click on Debug with JSON composer.

Detail of the Debug with JSON composer menu item

2. Enter the liability amount

Input JSON composer modal with the liability test data entered

3. Click OK

Detail of the OK button

4. Click Next Step to go step by step.

Detail of the Debug Next Step menu item

5. Matching rules are shown in Green and the rule that will be to be executed next is shown in Yellow.

Liability Fee Calculation decision table in debug mode showing successful rule execution highlighted green and next step highlighted yellow

6. Once the rules are processed, the Liability Fee Calculation execution is completed.

Execution complete alert modal

Output can be seen in the Parameters window.

Parameters view showing the execution output results

Project Description

The Liability Fee Calculation project contains the following files:

Decision Table

  • Liability Fee Calculation.xml: To define the rules to calculate the premium

Business Glossary

  • Liability Fee Calculation Glossary.xml: To define the business terms used in the project
Project Explorer view showing the Liability Fee Calculation glossary file selected

Liability Fee Calculation process steps

These are the process steps of the project.

1. Add new Decision Table

FlexRule Designer new document modal showing a number of logic document types and Decision table selected

2. Define variables

Variables definition view with variables entered

3. Add a new Business Glossary

New document modal showing a range of logic documents and the Business Terms document selected

4. Define the variables as terms in the Business Glossary that will be used in the Decision Table

This makes it easier for users to understand the business terms used in the project.

Business Glossary term input view showing the Name and Domain of each term

5. Add rules to the Decision Table

Liability Fee Calculation decision table with rules entered

Terms defined in the Business Glossary were used in the Decision Table

Decision Table with condition selected and showing the term used from the business glossary

Download the project

The project can be downloaded from the attachment at the end of the page.

Updated on February 12, 2024

Article Attachments

Was this article helpful?

Related Articles