Sewerage Services:
This is one of the major application of the egov stack which helps municipal and citizens to handle sewerage services like creating sewerage connection , searching sewerage connection, sewerage connection , also creating property if it doesnt exist and creating and updating workflow where depending on different roles of the logged-in user he/she can perform various actions like editing or perform document verification and many more specified in workflow documentation and SMS & email notification sent to owner for various actions performed in workflow.
The setup of the Application is as follows
Requirements:
Prior Knowledge of Java/J2EE(Java 8 version preferrable).
Prior Knowledge of Spring Boot.
Prior Knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.
Prior knowledge of Git.
Prior knowledge of eGov-mdms service, eGov-persister, eGov-user, eGov-location, eGov-localization, eGov-idgen, eGov-workflow-service will be helpful.
FUNCTIONALITY:
The sewerage service provides multiple functionality starting from serving as a central repository where one can create sewerage connection, update sewerage connection, search for a particular sewerage connection based on different criterias like mobile number, sewerage connection nos etc. and also creating property if it doesnt exist ,creating and updating workflow where depending on different roles of the logged-in user he/she can perform various actions like editing or perform document verification and many more specified in workflow documentation and SMS & email notification sent to owner for various actions performed in workflow.The different services provided by the sewerage services are
Creating sewerage connection
Updating sewerage connection
Searching sewerage connection based on few criterias mentioned in swagger documentation later
Creating property if it doesnt exist
Creating and updating workflow.
SETUP AND USAGE:
The Application is present among the municipal group of applications available in the eGov-services git repository. The spring boot application needs 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 :
Please refer Swagger API for YAML file details. Link -https://app.swaggerhub.com/apis/egov-foundation/Water-Sewerage-1.0/1.0.0.
The variables in the Application.properties to be updated are as follows
kafka topics persister configs for eGov persister
egov.sewarageservice.createconnection=save-sw-connection
egov.sewarageservice.updateconnection=update-sw-connection
egov.sewerageservice.updatesewerageconnection.workflow.topic=update-sw-workflow
URLs for the external API references
eGvo mdms :-> egov.mdms.host = https://egov-micro-dev.egovernments.org
eGov -idGen :-> egov.idgen.host = https://egov-micro-dev.egovernments.org/
localization service :-> egov.localization.host = https://egov-micro-dev.egovernments.org
workflow-service:-> egov.workflow.host = https://egov-micro-dev.egovernments.org/
Url-Shortner
egov.url.shortner.host=http://egov-url-shortening.egov:8080idGen Id formats :->
egov.idgen.scid.name=sewerageservice.connection.id
egov.idgen.scid.format=SW/[CITY.CODE]/[fy:yyyy-yy]/[SEQ_EGOV_COMMON]
egov.idgen.scapid.name=sewerageservice.application.id
egov.idgen.scapid.format=SW_AP/[CITY.CODE]/[fy:yyyy-yy]/[SEQ_EGOV_COMMON]
Configuration:
Mdms configuration:
https://github.com/egovernments/egov-mdms-data/tree/master/data
sw-services-calculation
master-config.json for sewerage service
"sw-services-calculation": { "Interest": { "masterName": "Interest", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "Rebate": { "masterName": "Rebate", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "Penalty": { "masterName": "Penalty", "isStateLevel": true, "uniqueKeys": [ "$.fromFY" ] }, "SCBillingSlab": { "masterName": "SCBillingSlab", "isStateLevel": true, "uniqueKeys": [] }, "billingPeriod": { "masterName": "billingPeriod", "isStateLevel": true, "uniqueKeys": [ "$.billingCycle" ] }, "SW_CHARGE": { "masterName": "SW_CHARGE", "isStateLevel": true, "uniqueKeys": [] }, "SW_TIME_PENALTY": { "masterName": "SW_TIME_PENALTY", "isStateLevel": true, "uniqueKeys": [] }, "SW_Round_Off": { "masterName": "SW_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": [] } }
Persister configuration:
https://github.com/egovernments/configs/blob/master/egov-persister/sewerage-persist.yml
Postman link:
https://www.getpostman.com/collections/27458a8c6249d786317c
Workflow business service config:
{ "BusinessServices": [ { "tenantId": "pb", "businessService": "NewSW1", "business": "sw-services", "businessServiceSla": 259200000, "states": [ { "sla": null, "state": null, "applicationStatus": null, "docUploadRequired": false, "isStartState": true, "isTerminateState": false, "isStateUpdatable": false, "actions": [ { "action": "INITIATE", "nextState": "INITIATED", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "INITIATED", "applicationStatus": "INITIATED", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "SUBMIT_APPLICATION", "nextState": "PENDING_FOR_DOCUMENT_VERIFICATION", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "PENDING_FOR_CITIZEN_ACTION", "applicationStatus": "PENDING_FOR_CITIZEN_ACTION", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "RESUBMIT_APPLICATION", "nextState": "PENDING_FOR_DOCUMENT_VERIFICATION", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "PENDING_FOR_DOCUMENT_VERIFICATION", "applicationStatus": "PENDING_FOR_DOCUMENT_VERIFICATION", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "VERIFY_AND_FORWARD", "nextState": "PENDING_FOR_FIELD_INSPECTION", "roles": [ "SW_DOC_VERIFIER" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_DOC_VERIFIER" ] }, { "action": "SEND_BACK_TO_CITIZEN", "nextState": "PENDING_FOR_CITIZEN_ACTION", "roles": [ "SW_DOC_VERIFIER" ] } ] }, { "sla": null, "state": "REJECTED", "applicationStatus": "REJECTED", "isStateUpdatable": false, "docUploadRequired": false, "isStartState": false, "isTerminateState": true }, { "sla": 86400000, "state": "PENDING_FOR_FIELD_INSPECTION", "applicationStatus": "PENDING_FOR_FIELD_INSPECTION", "docUploadRequired": false, "isStartState": false, "isStateUpdatable": true, "isTerminateState": false, "actions": [ { "action": "VERIFY_AND_FORWARD", "nextState": "PENDING_APPROVAL_FOR_CONNECTION", "roles": [ "SW_FIELD_INSPECTOR" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_FIELD_INSPECTOR" ] }, { "action": "SEND_BACK_FOR_DOCUMENT_VERIFICATION", "nextState": "PENDING_FOR_DOCUMENT_VERIFICATION", "roles": [ "SW_FIELD_INSPECTOR" ] } ] }, { "sla": 43200000, "state": "PENDING_APPROVAL_FOR_CONNECTION", "applicationStatus": "PENDING_APPROVAL_FOR_CONNECTION", "docUploadRequired": false, "isStartState": false, "isStateUpdatable": true, "isTerminateState": false, "actions": [ { "action": "APPROVE_FOR_CONNECTION", "nextState": "PENDING_FOR_PAYMENT", "roles": [ "SW_APPROVER" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_APPROVER" ] }, { "action": "SEND_BACK_FOR_FIELD_INSPECTION", "nextState": "PENDING_FOR_FIELD_INSPECTION", "roles": [ "SW_APPROVER" ] } ] }, { "sla": 43200000, "state": "PENDING_FOR_PAYMENT", "applicationStatus": "PENDING_FOR_PAYMENT", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": false, "actions": [ { "action": "PAY", "nextState": "PENDING_FOR_CONNECTION_ACTIVATION", "roles": [ "CITIZEN", "SW_CEMP" ] } ] }, { "sla": null, "state": "PENDING_FOR_CONNECTION_ACTIVATION", "applicationStatus": "PENDING_FOR_CONNECTION_ACTIVATION", "isStateUpdatable": true, "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "actions": [ { "action": "ACTIVATE_CONNECTION", "nextState": "CONNECTION_ACTIVATED", "roles": [ "SW_CLERK" ] } ] }, { "sla": null, "state": "CONNECTION_ACTIVATED", "applicationStatus": "CONNECTION_ACTIVATED", "isStateUpdatable": false, "docUploadRequired": false, "isStartState": false, "isTerminateState": true } ] } ] }
Notifications :
To enable or disable notifcation
notification.sms.enabled=true
egov.user.event.notification.enabled=true
Notification config:
notification.url = https://egov-micro-dev.egovernments.org/
kafka.topics.notification.sms=egov.core.notification.sms
notification.sms.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW
sw.mseva.app.link=https://play.google.com/store/apps/details?id=org.egovernment.mseva.citizen
sw.view.history.link=citizen/wns/search-preview?applicationNumber=$applicationNumber&history=true&tenantId=$tenantId&service=SEWERAGE
sw.connectiondetails.link=citizen/wns/connection-details?connectionNumber=$connectionNumber&tenantId=$tenantId&service=SEWERAGE
sw.application.pay.link=citizen/egov-common/pay?consumerCode=$consumerCode&tenantId=$tenantId&businessService=SW.ONE_TIME_FEE
The Current localization messages for notification :
[ { "code": "SW_INITIATE_INITIATED_SMS_MESSAGE", "message": "Dear <Owner Name>, You have successfully submitted your application for a New <Service> Connection. Your Application No. is <Application number>. Click here to download your application <Application download link>. For more information, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_INITIATE_INITIATED_APP_MESSAGE", "message": "Dear <Owner Name>, You have successfully submitted your application for a New <Service> Connection. Your Application No. is <Application number> . <Action Button>Download Application</Action Button>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_REJECT_REJECTED_SMS_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been rejected. For more details, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_REJECT_REJECTED_APP_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been rejected. Click here for more details <View History Link>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_EDIT_SMS_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been edited. For more details, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_EDIT_IN_APP_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been edited. Click here for more details <View History Link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_VERIFY_AND_FORWARD_PENDING_FOR_FIELD_INSPECTION_SMS_MESSAGE", "message": "Dear <Owner Name>, Status of your application <Application number> for a New <Service> Connection has changed to PENDING FOR FIELD INSPECTION from PENDING FOR DOCUMENT VERIFICATION. For more details, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_VERIFY_AND_FORWARD_PENDING_FOR_FIELD_INSPECTION_APP_MESSAGE", "message": "Dear <Owner Name>, Status of your application <Application number> for a New <Service> Connection has changed to PENDING FOR FIELD INSPECTION from PENDING FOR DOCUMENT VERIFICATION. To track your application, click on <View History Link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_SEND_BACK_FOR_FIELD_INSPECTION_PENDING_FOR_FIELD_INSPECTION_SMS_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been sent back. For more details, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_SEND_BACK_FOR_FIELD_INSPECTION_PENDING_FOR_FIELD_INSPECTION_APP_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been sent back. Click here for more details <View History Link>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_SEND_BACK_FOR_DOCUMENT_VERIFICATION_PENDING_FOR_DOCUMENT_VERIFICATION_SMS_MESSAG", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been sent back. For more details, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_SEND_BACK_FOR_DOCUMENT_VERIFICATION_PENDING_FOR_DOCUMENT_VERIFICATION_APP_MESSAGE", "message": "Dear <Owner Name>, Your Application <Application number> for a New <Service> Connection has been sent back. Click here for more details <View History Link>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SEWERAGE_CONNECTION_BILL_GENERATION_MESSAGE", "message": "Dear <Owner Name>,Your<Service> Bill for <Billing Period> has been generated. Please pay the amount due: <bill amount> by due date <Due Date>. Following is the link to your bill: <Link to Bill>", "module": "rainmaker-common", "locale": "en_IN" }, { "code": "SEWERAGE_CONNECTION_BILL_GENERATION_SMS_MESSAGE", "message": "Dear <Owner Name>, Your <Service> Bill has been generated. Please pay the amount due: <bill amount> by due date <Due Date>. Following is the link to your bill: <Link to Bill>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SEWERAGE_CONNECTION_BILL_GENERATION_APP_MESSAGE", "message": "Dear <Owner Name>, Your <Service> Bill has been generated. Please pay the amount due: <bill amount> by due date <Due Date>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_APPROVE_FOR_CONNECTION_PENDING_FOR_PAYMENT_SMS_MESSAGE", "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been approved. To make payment against your application, please click on <payment link> . Log in to <mseva URL> or download <mseva app link> for more details.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_APPROVE_FOR_CONNECTION_PENDING_FOR_PAYMENT_APP_MESSAGE", "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been approved. To make payment against your application, please click on PAY NOW .<Action Button>Download Application</Action Button>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_PAY_PENDING_FOR_CONNECTION_ACTIVATION_SMS_MESSAGE", "message": "Dear <Owner Name> , Your payment for New <Service> connection against the application <Application number> has been been succesfully recorded. You can download your receipt using this link <receipt download link>. For more details, please log in to <mseva URL> or download <mseva app link>.", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_PAY_PENDING_FOR_CONNECTION_ACTIVATION_APP_MESSAGE", "message": "Dear <Owner Name> , Your payment for New <Service> connection against the application <Application number> has been been succesfully recorded. You can download the receipt by clicking DOWNLOAD RECEIPT.<Action Button>Download Application</Action Button>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_ACTIVATE_CONNECTION_CONNECTION_ACTIVATED_SMS_MESSAGE", "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been activated. To check your connection details, please log in to <mseva URL> or download <mseva app link>", "module": "rainmaker-ws", "locale": "en_IN" }, { "code": "SW_ACTIVATE_CONNECTION_CONNECTION_ACTIVATED_APP_MESSAGE", "message": "Dear <Owner Name>, Your New <Service> connection against the application <Application number> has been activated. To check your connection details, click here <connection details page>.", "module": "rainmaker-ws", "locale": "en_IN" } ]