◷ Reading Time: 5 minutes
In this example, we will demonstrate how to add additional costs or discounts to a base premium without accessing the project that calculates the base premium. This restricts editing the basic part of the project and ensures that it is kept untouched.
Running the Sample
1. Open the file MainFlow.xml
2. Click on Logic Run Template.
3. Click on one of the given templates.
4. Click Debug.
5. Click Next Step to go step by step.
6. You will see the output which is the calculated insurance premium under the Parameters window.
These are the process steps.
- Calculate the base premium using the base premium calculation package.
- Get the discount percentage.
- Apply the discount percentage to the base premium to calculate the health premium.
- MainFlow.xml: This is the main flow, which is the orchestration layer that combines the package and decisioning part of the project.
- Discounts.xml: The decision table that determines the discount percentage.
Glossaries and Concepts
- BoxedExpression.xml: The formulas used in the project are stored as a Boxed Expression file.
- BasePremiumCalculation.Concept.xml: The context of the project. This Fact Concept file was created automatically with the uploaded package.
- BasePremiumCalculation.frdp: This is the package file that calculates the base premium. We added it as a Decision Package in the MainFlow and you can see the file in the project folder.
In the project folder, you will see the folder, BasePremiumCalculation which was used to create a package that calculates the premium.
The Project Design
The main focus of this project is to add additional costs/ discounts to the premium while keeping the base premium untouched. So we have created a package of the base premium calculation and added the rest of the costs to that.
So we have created two projects.
- Base Premium Calculation: To calculate the base premium.
- Insurance Policy Discount: To add a discount to the base premium.
Base Premium Calculation
We have first created the project that calculated the base premium based on the applicant data.
- Create the package BasePremiumCalculation. This creates the package file, BasePremiumCalculation.frdp which is linked in the project.
Insurance Policy Discount
- The main flow connects the base premium calculation and discount decision table.
- Decision Package: BasePremiumCalculation.frdp
- Decision Table: Discounts.xml
- The Fact Concept was created using the package file, BasePremiumCalculation.frdp.
If you right-click on the package file, and select, Open Document,
You will see the option to create the above Fact Concept.
- The discount decision table determines the discount according to the years of membership.
- The expressions are stores as Boxed Expressions.
Download the Project
Download the project from the attachment at the end of the page.