FSM Calculator
Details for setting up FSM calculator sevice
Overview
FSM Calculator is a system that enables FSM Admin to create billing slabs for the FSM application(s) with different combinations of propertyType, slum, tank capacity and etc.
Generates the Demand after calculating the charges for the given application using the billing slab already configured. This document contains the details about how to set up the fsm-calculator service and a description of the functionalities it provides.
Pre-requisites
Before you proceed with the configuration, make sure the following pre-requisites are met -
Java 8
Kafka server is up and running
egov-persister service is running and has fsm-calculator-persister config path added to it
PSQL server is running and a database is created to store FSM Application data
Following services should be up and running:
egov-persister
egov-mdms
fsm
billing-service
Key Functionalities
FSM Admin an Employee of ULB with FSM Admin role can create, update billing slab(s)
ULB Employee with FSM_CREATOR and FSM_EDITOR can search billing slab(s)
ULB Employee Citizen can file, track and rate the application for cleaning septic tank
ULB Employee can get the estimate for FSM Application
FSM service internally calls fsm-calculator to generate a demand
Deployment Details
Deploy the latest version of FSM.
Add fsm-calculator-persister.yml file in the config folder in git and add that path in persister. (The file path should be added in the environment yaml file in param called persist-yml-path)
Configuration Details
MDMS Configuration
FSM MDMS Configuration is sufficient
Business Service / Workflow Configuration
NA
Actions & Role Action Mapping
Actions
Role Action Mapping
Infra Ops Configuration
Configurations that we can manage through values.yml fsm-calculator in infraops repo are listed below. values.yml for fms-calculator can be found here
Description | name in values.yml | Current Value |
contextPath of the api’s | SERVER_CONTEXTPATH | /fsm-calculator |
Kafka Consumer Group | SPRING_KAFKA_CONSUMER_GROUP_ID | fsm-calculator |
kafka topic to which service push data to save new billing slab | PERSISTER_SAVE_BILLING_SLAB_TOPIC | save-fsm-billing-slab |
kafka topic to which service push data to update the existing billing slab | PERSISTER_UPDATE_BILLING_SLAB_TOPIC | update-fsm-billing-slab |
mdms service host | EGOV_MDMS_HOST | egov-mdms-service from egov-service-host |
billing-service host | EGOV_BILLINGSERVICE_HOST | billing-service from egov-service-host |
fsm service host | EGOV_FSM_HOST | fsm from egov-service-host |
Configurations sample in Values.yml
Data Setup
Billing Slab Setup
Create Billing Slabs based on distinct property types, slum details, and vehicle capacity details.
PropertyType values are available in PropertyType Mdms
Slum (Yes/No) - user input value either Yes or No
capacityFrom and capacityTo refers to Vehicle Tank Capacity
Sample Curl
Integration
Integration Scope
FSM-calculator is integrated with FSM Application. FSM Application internally invokes the fsm-calculator service to calculate and generate demand for the charges.
Integration Benefits
Calculation and demand generation logic will be separated from the FSM service. For each implementation, calculation implementation can be changed if required without modifying the fsm service.
Steps to Integration
FSM application to call fsm-calculator/v1/_calculate to calculate and generate the demand for the FSM application
ULB employees can call fsm-calculator/v1/_estimate to get the estimates for the FSM application
ULB employees can create billing slabs calling fsm-calculator/v1/billingSlab/_create
ULB employees can update billing slabs calling fsm-calculator/v1/billingSlab/_update
ULB employees can search billing slabs calling fsm-calculator/v1/billingSlab/_search
Interaction Diagram
TBD
Reference Docs
Doc Links
Title | Link |
Workflow Technical Document | Workflow Service |
User Technical Document | User Service |
MDMS Technical Document | NEEDS TO BE UPDATED |
IDGen Technical Document | NEEDS TO BE UPDATED |
Localization Technical Document | NEEDS TO BE UPDATED |
Persister Technical Document | NEEDS TO BE UPDATED |
SMS Notification Technical Document | NEEDS TO BE UPDATED |
API Contract | |
Postman Scripts |
API List
Title | Link |
fsm-calulator/v1/_calculate | |
fsm-calculator/v1/_estimate | |
fsm-calculator/v1/billingSlab/_create | |
fsm-calculator/v1/billingSlab/_update | |
fsm-calculator/v1/billingSlab/_search |
Last updated