Water Service - Technical Document

Water Services:

This is the egov application, which helps and gives flexibility to municipal and citizen to handle the water service like apply for water connection, search water connection. The application will go on different stages that state can verify by given roles, If that role can take the action then the application will go to the next state. Based on the state, citizen will get notification (SMS and in-app ). Citizens also can pay for application fees or employees can collect the fee for the application.

The setup of the Application is as follows

Requirements:

  • Knowledge of Java/J2EE(preferably Java 8 version)

  • Knowledge of Spring Boot and spring-boot microservices.

  • Knowledge of Git or any version control system.

  • Knowledge of RESTful Web services.

  • Knowledge of the Lombok library will helpful.

  • knowledge of eGov-mdms service, eGov-persister, eGov-idgen, eGov-sms, eGov-email,eGov-user, eGov-localization, eGov-workflow-service will be helpful.

Functionality:

  1. Apply for water connection.

  2. Searching for water connections.

  3. Apply for Property creation.

  4. Can take different action based on state (Workflow)

  5. Notification based on the application state.

Setup and usage:

The Application is present among the municipal services group of applications available in the eGov-services git repository.  The spring boot application needs the Lombok* extension added in your IDE to load it. Once the application is up and running API requests can be posted to the URL and ids can be generated. 

  • in case of IntelliJ, the plugin can be installed directly, for eclipse the Lombok jar location has to be added in eclipse.ini file in this format  javaagent:lombok.jar

API Information :

Application.properties File Information:

kafka topics persister configs for eGov persister

  • egov.waterservice.createwaterconnection = save-ws-connection

  • egov.waterservice.updatewaterconnection=update-ws-connection

  • egov.waterservice.updatewaterconnection.workflow.topic=update-ws-workflow

URLs for the external API references:

egov.idgen.wcapid.name=waterservice.application.id
egov.idgen.wcapid.format=WS_AP/[CITY.CODE]/[fy:yyyy-yy]/[SEQ_EGOV_COMMON]

Configuration:

Mdms configuration:

https://github.com/egovernments/egov-mdms-data/tree/master/data

ws-services-calculation ws-services-masters PropertyTax

master-config.json for water service

"ws-services-masters": { "connectionCategory": { "masterName": "connectionCategory", "isStateLevel": true, "uniqueKeys": [ "$.code" ] }, "connectionType": { "masterName": "connectionType", "isStateLevel": true, "uniqueKeys": [ "$.code" ] }, "waterSource": { "masterName": "waterSource", "isStateLevel": true, "uniqueKeys": [ "$.code" ] }, "billingPeriod": { "masterName": "billingPeriod", "isStateLevel": true, "uniqueKeys": [ "$.billingCycle" ] }, "waterSourceWithSubSource": { "masterName": "waterSourceWithSubSource", "isStateLevel": true, "uniqueKeys": [] } }, "ws-services-calculation": { "WaterCess": { "masterName": "WaterCess", "isStateLevel": true, "uniqueKeys": [] }, "Interest": { "masterName": "Interest", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "Rebate": { "masterName": "Rebate", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "Penalty": { "masterName": "Penalty", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "WCBillingSlab": { "masterName": "WCBillingSlab", "isStateLevel": true, "uniqueKeys": [] }, "WS_CHARGE": { "masterName": "WS_CHARGE", "isStateLevel": true, "uniqueKeys": [] }, "WS_TIME_PENALTY": { "masterName": "WS_TIME_PENALTY", "isStateLevel": true, "uniqueKeys": [] }, "WS_WATER_CESS": { "masterName": "WS_WATER_CESS", "isStateLevel": true, "uniqueKeys": [] }, "MeterStatus": { "masterName": "MeterStatus", "isStateLevel": true, "uniqueKeys": [] }, "WS_Round_Off": { "masterName": "WS_Round_Off", "isStateLevel": true, "uniqueKeys": [] }, "PlotSizeSlab": { "masterName": "PlotSizeSlab", "isStateLevel": true, "uniqueKeys": [] }, "PropertyUsageType": { "masterName": "PropertyUsageType", "isStateLevel": true, "uniqueKeys": [] }, "FeeSlab": { "masterName": "FeeSlab", "isStateLevel": true, "uniqueKeys": [] }, "RoadType": { "masterName": "RoadType", "isStateLevel": true, "uniqueKeys": [] }, "CalculationAttribute": { "masterName": "CalculationAttribute", "isStateLevel": true, "uniqueKeys": [] } }

 

Property creation through WNS module
https://github.com/egovernments/egov-mdms-data/blob/DEV/data/pb/PropertyTax/PTWorkflow.json

Persister configuration:

water-persist.yml
https://github.com/egovernments/configs/blob/master/egov-persister/water-meter.yml

Postman link:

https://www.getpostman.com/collections/b5b7248d1aeacc9431cb

Workflow business service config:

{ "RequestInfo": { "apiId": "Rainmaker", "action": "", "did": 1, "key": "", "msgId": "20170310130900|en_IN", "requesterId": "", "ts": 1513579888683, "ver": ".01", "authToken": "{{Auth_Token}}" }, "BusinessServices": [ { "tenantId": "pb", "businessService": "NewWS1", "business": "ws-services", "businessServiceSla": 259200000, "states": [ { "sla": null, "state": null, "applicationStatus": null, "docUploadRequired": false, "isStartState": true, "isTerminateState": false, "isStateUpdatable": false,