◷ Reading Time: 4 minutes
The 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
The project contains the following files:
- Liability Fee Calculation.xml: To define the rules to calculate the premium
- Liability Fee Calculation Glossary.xml: To define the business terms used in the project
These are the process steps of the project.
1. Add new Decision Table
3. Add a new Business Glossary
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.
5. Add rules to the Decision Table
Terms defined in the Business Glossary were used in the Decision Table
Running the project
Click on Debug with JSON composer.
Enter the liability amount
Click Next Step to go step by step.
Matching rules are shown in Green and the rule that will be to be executed next is shown in Yellow.
Once the rules are processed, the execution is completed.
Output can be seen in the Parameters window.
Download the project
The project (LiabilityFeeCalculation.zip) can be downloaded from the attachment at the end of the page.