Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview:

After sewerage connection activation or legacy connection, user can disconnect the connection either temporary temporarily or permanentpermanently. This process based on defined workflow. Any action is based on defined roles on the action level.

For disconnecting the connection, user needs to send extra parameters in the RequestBody as below :

  1. disconnectionReason - to add the reason for disconnection

  2. isDisconnectionTemporary - Whether the disconnection is temporary or permanent (if disconnection is temporary then isDisconnectionTemporary will be true else false)

  3. disconnectRequest - This will always be true for disconnection application.

  4. disconnectionExecutionDate - This is the date when the application is disconnected.

...

Code Block
{
   "format": "SW_AP/[CITY.CODE]/[fy:yyyy-yy]/DC-[SEQ_SW_APP_[TENANT_ID]]",
   "idname": "sewerageservice.disconnection.id"
}
Info

This new feature is developed using the same existing base apis for new and modify connections.
The changes for disconnection follows similar approach as that of New Connection.
The config and persister changes required are mentioned below.

Persister configuration:
https://github.com/egovernments/configs/blob/qaUAT/egov-persister/sewerage-persist.yml

Workflow config for edit connection:

Create businessService (workflow configuration) using the  /businessservice/_create. Following is the product configuration for editing water connection.

Code Block
{curl --location --request POST "RequestInfo":{
      'https://dev.digit.org/egov-workflow-v2/egov-wf/businessservice/_create' \
--header 'Content-Type: application/json' \
--data-raw '{
	"RequestInfo": {
		"apiId": "Rainmaker",
      		"action": "",
      		"did": 1,
      		"key": "",
      		"msgId": "20170310130900|en_IN",
      		"requesterId": "",
      		"ts": 1513579888683,
      		"ver": ".01",
      		"authToken": "{{Auth_Token}}"
   	},
   	"BusinessServices": [
      {
         "		{
			"tenantId": "pb",
         			"businessService": "DisconnectSWConnection",
         			"business": "sw-services",
         			"businessServiceSla": 259200000,
         			"states": [
            {
               				{
					"sla": null,
               					"state": null,
               					"applicationStatus": null,
               					"docUploadRequired": false,
               					"isStartState": true,
               					"isTerminateState": false,
					"isStateUpdatable":               "isStateUpdatable":true,
               "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_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":"SEND_BACK",
                     "nextState":"PENDING_FOR_CITIZEN_ACTION",
                     "roles":[
                        "SW_DOC_VERIFIER"
                     ]
                  },
                  {
                     "action":"SEND_BACK_TO_CITIZEN",
                     "nextState":"PENDING_FOR_CITIZEN_ACTION",
                     "roles":[
                        "SW_DOC_VERIFIER"
                     ]
                  },
                  {
                     "action":"RESUBMIT_APPLICATION",
                     "nextState":"PENDING_FOR_FIELD_INSPECTION",
                     "roles":[
                        "SW_DOC_VERIFIER"
                     ]
                  }
               ]
            },
            {
               "sla":null,
               "state":"PENDING_FOR_FIELD_INSPECTION",
               "applicationStatus":"PENDING_FOR_FIELD_INSPECTION",
               "docUploadRequired":false,
               "isStartState":false,
               "isTerminateState":false,
               "isStateUpdatable":true,
               "actions":[
                  {
                     "action":"VERIFY_AND_FORWARD",
                     "nextState":"PENDING_APPROVAL_FOR_DISCONNECTION",
                     "roles":[
                        "SW_FIELD_INSPECTOR"
                     ]
                  },
                  {
                     "action":"SEND_BACK_FOR_DOCUMENT_VERIFICATION",
                     "nextState":"PENDING_FOR_DOCUMENT_VERIFICATION",
                     "roles":[
                        "SW_FIELD_INSPECTOR"
                     ]
                  },
                  {
                     "action":"SEND_BACK_TO_CITIZEN",
                     "nextState":"PENDING_FOR_CITIZEN_ACTION",
                     "roles":[
                        "SW_FIELD_INSPECTOR"
                     ]
                  },
                  {
                     "action":"RESUBMIT_APPLICATION",
                     "nextState":"PENDING_APPROVAL_FOR_DISCONNECTION",
                     "roles":[
                        "SW_FIELD_INSPECTOR"
                     ]
                  },
                  {
                     "action":"REJECT",
                     "nextState":"REJECTED",
                     "roles":[
                        "SW_FIELD_INSPECTOR"
                     ]
                  }
               ]
            },
            {
               "sla":null,
               "state":"PENDING_APPROVAL_FOR_DISCONNECTION",
               "applicationStatus":"PENDING_APPROVAL_FOR_DISCONNECTION",
               "docUploadRequired":false,
               "isStartState":false,
               "isTerminateState":false,
               "isStateUpdatable":true,
               "actions":[
                  {
                     "action":"SEND_BACK_FOR_FIELD_INSPECTION",
                     "nextState":"PENDING_FOR_FIELD_INSPECTION",
                     "roles":[
                        "SW_APPROVER"
                     ]
                  },
                  {
                     "action":"SEND_BACK_TO_CITIZEN",
                     "nextState":"PENDING_FOR_CITIZEN_ACTION",
                     "roles":[
                        "SW_APPROVER"
                     ]
                  },
                  {
                     "action":"APPROVE_FOR_DISCONNECTION",
                     "nextState":"PENDING_FOR_PAYMENT",
                     "roles":[
                        "SW_APPROVER"
                     ]
                  },
                  {
                     "action":"REJECT",
                     "nextState":"REJECTED",
                     "roles":[
                        "SW_APPROVER"
                     ]
                  }
               ]
            },
            {
               "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":"REJECTED",
               "applicationStatus":"REJECTED",
               "docUploadRequired":false,
               "isStartState":false,
               "isTerminateState":true,
               "isStateUpdatable":false,
               "actions":null
            },
            {
               "sla":null,
               "state":"PENDING_FOR_PAYMENT",
               "applicationStatus":"PENDING_FOR_PAYMENT",
               "docUploadRequired":false,
               "isStartState":false,
               "isTerminateState":false,
               "isStateUpdatable":false,
               "actions":[
                  {
                     "action":"PAY",
                     "nextState":"PENDING_FOR_DISCONNECTION_EXECUTION",
                     "roles":[
                        "CITIZEN",
                        "SW_CEMP"
                     ]
                  }
               ]
            },
            {
               "sla":null,
               "state":"PENDING_FOR_DISCONNECTION_EXECUTION",
               "applicationStatus":"PENDING_FOR_DISCONNECTION_EXECUTION",
               "docUploadRequired":false,
               "isStartState":false,
               "isTerminateState":false,
               "isStateUpdatable":true,
               "actions":[
                  {
                     "action":"EXECUTE_DISCONNECTION",
                     "nextState":"DISCONNECTION_EXECUTED",
                     "roles":[
                        "SW_CLERK"
                     ]
                  }
               ]
            },
            {
               "sla":null,
               "state":"DISCONNECTION_EXECUTED",
               "applicationStatus":"DISCONNECTION_EXECUTED",
               "docUploadRequired":false,
               "isStartState":false,
               "isTerminateState":true,
               "isStateUpdatable":false,
               "actions":null
            }
         ]
      }
   ]
}true,
					"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_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": "SEND_BACK",
							"nextState": "PENDING_FOR_COUNTER_EMPLOYEE_ACTION",
							"roles": [
								"SW_DOC_VERIFIER"
							]
						},
						{
							"action": "SEND_BACK_TO_CITIZEN",
							"nextState": "PENDING_FOR_CITIZEN_ACTION",
							"roles": [
								"SW_DOC_VERIFIER"
							]
						}
					]
				},
				{
					"sla": null,
					"state": "PENDING_FOR_FIELD_INSPECTION",
					"applicationStatus": "PENDING_FOR_FIELD_INSPECTION",
					"docUploadRequired": false,
					"isStartState": false,
					"isTerminateState": false,
					"isStateUpdatable": true,
					"actions": [
						{
							"action": "VERIFY_AND_FORWARD",
							"nextState": "PENDING_APPROVAL_FOR_DISCONNECTION",
							"roles": [
								"SW_FIELD_INSPECTOR"
							]
						},
						{
							"action": "SEND_BACK_FOR_DOCUMENT_VERIFICATION",
							"nextState": "PENDING_FOR_DOCUMENT_VERIFICATION",
							"roles": [
								"SW_FIELD_INSPECTOR"
							]
						},
						{
							"action": "SEND_BACK_TO_CITIZEN",
							"nextState": "PENDING_FOR_CITIZEN_ACTION",
							"roles": [
								"SW_FIELD_INSPECTOR"
							]
						},
						{
							"action": "REJECT",
							"nextState": "REJECTED",
							"roles": [
								"SW_FIELD_INSPECTOR"
							]
						}
					]
				},
				{
					"sla": null,
					"state": "PENDING_APPROVAL_FOR_DISCONNECTION",
					"applicationStatus": "PENDING_APPROVAL_FOR_DISCONNECTION",
					"docUploadRequired": false,
					"isStartState": false,
					"isTerminateState": false,
					"isStateUpdatable": false,
					"actions": [
						{
							"action": "SEND_BACK_FOR_FIELD_INSPECTION",
							"nextState": "PENDING_FOR_FIELD_INSPECTION",
							"roles": [
								"SW_APPROVER"
							]
						},
						{
							"action": "SEND_BACK_TO_CITIZEN",
							"nextState": "PENDING_FOR_CITIZEN_ACTION",
							"roles": [
								"SW_APPROVER"
							]
						},
						{
							"action": "APPROVE_FOR_DISCONNECTION",
							"nextState": "PENDING_FOR_PAYMENT",
							"roles": [
								"SW_APPROVER"
							]
						},
						{
							"action": "REJECT",
							"nextState": "REJECTED",
							"roles": [
								"SW_APPROVER"
							]
						}
					]
				},
				{
					"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_COUNTER_EMPLOYEE_ACTION",
					"applicationStatus": "PENDING_FOR_COUNTER_EMPLOYEE_ACTION",
					"docUploadRequired": false,
					"isStartState": true,
					"isTerminateState": false,
					"isStateUpdatable": true,
					"actions": [
						{
							"action": "RESUBMIT_APPLICATION",
							"nextState": "PENDING_FOR_DOCUMENT_VERIFICATION",
							"roles": [
								"CITIZEN",
								"SW_CEMP"
							]
						}
					]
				},
				{
					"sla": null,
					"state": "REJECTED",
					"applicationStatus": "REJECTED",
					"docUploadRequired": false,
					"isStartState": false,
					"isTerminateState": true,
					"isStateUpdatable": false,
					"actions": null
				},
				{
					"sla": null,
					"state": "PENDING_FOR_PAYMENT",
					"applicationStatus": "PENDING_FOR_PAYMENT",
					"docUploadRequired": false,
					"isStartState": false,
					"isTerminateState": false,
					"isStateUpdatable": false,
					"actions": [
						{
							"action": "PAY",
							"nextState": "PENDING_FOR_DISCONNECTION_EXECUTION",
							"roles": [
								"CITIZEN",
								"SW_CEMP"
							]
						}
					]
				},
				{
					"sla": null,
					"state": "PENDING_FOR_DISCONNECTION_EXECUTION",
					"applicationStatus": "PENDING_FOR_DISCONNECTION_EXECUTION",
					"docUploadRequired": false,
					"isStartState": false,
					"isTerminateState": false,
					"isStateUpdatable": true,
					"actions": [
						{
							"action": "EXECUTE_DISCONNECTION",
							"nextState": "DISCONNECTION_EXECUTED",
							"roles": [
								"SW_CLERK"
							]
						}
					]
				},
				{
					"sla": null,
					"state": "DISCONNECTION_EXECUTED",
					"applicationStatus": "DISCONNECTION_EXECUTED",
					"docUploadRequired": false,
					"isStartState": false,
					"isTerminateState": true,
					"isStateUpdatable": false,
					"actions": null
				}
			]
		}
	]
}'

Notification :

Disconnection notifications will be sent to the property owners and connection holders based on different application states.

...

We can add connection holders to the water connection which will be the owner of the connection. We can fill the connection holders' details or we can just make the property owner to the connection holder this goes to the disconnection application.

The connection holder will get notification based on a different state of the application. We are pushing the data of the connection holders in the user service too.

...

  1. To integrate, host of sw-service module should be overwritten in helm chart.

  2.  /sw-services/swc/_createshould be added as the create endpoint for creating sewerage application/connection in the system

  3.  /sw-services/swc/_search should be added as the search endpoint .This method handles all requests to search existing records depending on different search criteria

  4.  /sw-services/swc/_update should be added as the update endpoint. This method is used to update fields in existing records or to update status of application based on workflow.

Reference Docs

...

Title 

...

Link

...

API Swagger Documentation

...

Swagger Documentation

...

Sewerage Calculator Service

...

API List

...