...
Persister configuration:
https://github.com/egovernments/configs/blob/qa/egov-persister/sewerage-persist.yml
Postman link:
https://www.getpostman.com/collections/27458a8c6249d786317ce4c39fd6c0ed0a7dfacd
Workflow business service config:
Code Block |
---|
{ "RequestInfo": { "apiId": "Rainmaker", "action": "", "did": 1, "key": "", "msgId": "20170310130900|en_IN", "requesterId": "", "ts": 1513579888683, "ver": ".01", "authToken": "{{Auth_Token}}" }, "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 } ] } ] } |
...
Code Block | ||
---|---|---|
| ||
ServiceMaps: serviceName: Sewerage Service - rainmaker version: 1.0.0 mappings: - topic: save-sw-connection configKey: INDEX indexes: - name: sewerage-services type: general id: $.id,$.property.tenantId timeStampField: $.additionalDetailsauditDetails.appCreatedDatecreatedTime jsonPath: $.SewerageConnection customJsonMapping: indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"ownersmobileNos":[],"applicationNo":"","applicationStatus":"","status":"","connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadTyperoadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state - inJsonPath: $.processInstance.action outJsonPath: $.Data.workflow.action - inJsonPath: $.processInstance.assignes.*.uuid outJsonPath: $.Data.workflow.assignes - inJsonPath: $.property.owners.*.mobileNumberapplicationNo outJsonPath: $.Data.applicationNo - inJsonPath: $.applicationStatus outJsonPath: $.Data.ownersmobileNosapplicationStatus - inJsonPath: $.applicationNostatus outJsonPath: $.Data.applicationNostatus - inJsonPath: $.applicationStatusconnectionNo outJsonPath: $.Data.applicationStatusconnectionNo - inJsonPath: $.statusoldConnectionNo outJsonPath: $.Data.statusoldConnectionNo - inJsonPath: $.connectionNoplumberInfo outJsonPath: $.Data.connectionNoplumberInfo - inJsonPath: $.oldConnectionNoroadCuttingInfo outJsonPath: $.Data.oldConnectionNoroadCuttingInfo - inJsonPath: $.plumberInfoconnectionHolders outJsonPath: $.Data.plumberInfoconnectionHolders - inJsonPath: $.roadType outJsonPath: $.Data.roadType - inJsonPath: $.roadCuttingArea outJsonPath: $.Data.roadCuttingArea - inJsonPath: $.connectionExecutionDate outJsonPath: $.Data.connectionExecutionDate - inJsonPath: $.connectionCategory outJsonPath: $.Data.connectionCategory - inJsonPath: $.connectionType outJsonPath: $.Data.connectionType - inJsonPath: $.additionalDetails outJsonPath: $.Data.additionalDetails - inJsonPath: $.id outJsonPath: $.Data.id - inJsonPath: $.property.propertyId outJsonPath: $.Data.propertyId - inJsonPath: $.property.tenantId outJsonPath: $.Data.tenantId - inJsonPath: $.proposedWaterClosets outJsonPath: $.Data.proposedWaterClosets - inJsonPath: $.proposedToilets outJsonPath: $.Data.proposedToilets - inJsonPath: $.noOfWaterClosets outJsonPath: $.Data.noOfWaterClosets - inJsonPath: $.noOfToilets outJsonPath: $.Data.noOfToilets - externalUriMappinginJsonPath: $.applicationType - pathoutJsonPath: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search$.Data.applicationType - queryParaminJsonPath: businessIds=$.applicationNo,history=true$.dateEffectiveFrom outJsonPath: $.Data.dateEffectiveFrom externalUriMapping: - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.property.tenantId apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history - topic: update-sw-connection configKey: INDEX indexes: - name: sewerage-services type: general id: $.id,$.property.tenantId timeStampField: $.additionalDetailsauditDetails.appCreatedDatelastModifiedTime jsonPath: $.SewerageConnection customJsonMapping: indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"ownersmobileNos":[],"applicationNo":"","applicationStatus":"","status":"","connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state - inJsonPath: $.processInstance.action outJsonPath: $.Data.workflow.action - inJsonPath: $.processInstance.assignes.*.uuid outJsonPath: $.Data.workflow.assignes - inJsonPath: $.property.owners.*.mobileNumberapplicationNo outJsonPath: $.Data.ownersmobileNosapplicationNo - inJsonPath: $.applicationNoapplicationStatus outJsonPath: $.Data.applicationNoapplicationStatus - inJsonPath: $.applicationStatusstatus outJsonPath: $.Data.applicationStatusstatus - inJsonPath: $.statusconnectionNo outJsonPath: $.Data.statusconnectionNo - inJsonPath: $.oldConnectionNo outJsonPath: $.Data.oldConnectionNo - inJsonPath: $.connectionNoplumberInfo outJsonPath: $.Data.connectionNoplumberInfo - inJsonPath: $.oldConnectionNoroadCuttingInfo outJsonPath: $.Data.oldConnectionNoroadCuttingInfo - inJsonPath: $.plumberInfoconnectionHolders outJsonPath: $.Data.plumberInfoconnectionHolders - inJsonPath: $.roadType outJsonPath: $.Data.roadType - inJsonPath: $.roadCuttingArea outJsonPath: $.Data.roadCuttingArea - inJsonPath: $.connectionExecutionDate outJsonPath: $.Data.connectionExecutionDate - inJsonPath: $.connectionCategory outJsonPath: $.Data.connectionCategory - inJsonPath: $.connectionType outJsonPath: $.Data.connectionType - inJsonPath: $.additionalDetails outJsonPath: $.Data.additionalDetails - inJsonPath: $.id outJsonPath: $.Data.id - inJsonPath: $.property.propertyId outJsonPath: $.Data.propertyId - inJsonPath: $.property.tenantId outJsonPath: $.Data.tenantId - inJsonPath: $.proposedWaterClosets outJsonPath: $.Data.proposedWaterClosets - inJsonPath: $.proposedToilets outJsonPath: $.Data.proposedToilets - inJsonPath: $.noOfWaterClosets outJsonPath: $.Data.noOfWaterClosets - inJsonPath: $.noOfToilets outJsonPath: $.Data.noOfToilets - inJsonPath: $.applicationType outJsonPath: $.Data.applicationType - inJsonPath: $.dateEffectiveFrom outJsonPath: $.Data.dateEffectiveFrom externalUriMapping: - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.property.tenantId apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history - topic: update-sw-workflow configKey: INDEX indexes: - name: sewerage-services type: general id: $.id,$.property.tenantId timeStampField: $.additionalDetailsauditDetails.appCreatedDatelastModifiedTime jsonPath: $.SewerageConnection customJsonMapping: indexMapping: {"Data":{"workflow": {"state": {}, "action": "", "assignes": []},"ownersmobileNos":[],"applicationNo":"","applicationStatus":"","status":"","connectionNo":"","oldConnectionNo":"","plumberInfo":[],"roadTyperoadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}} fieldMapping: - inJsonPath: $.applicationStatus.state outJsonPath: $.Data.workflow.state - inJsonPath: $.processInstance.action outJsonPath: $.Data.workflow.action - inJsonPath: $.processInstance.assignes.*.uuid outJsonPath: $.Data.workflow.assignes - inJsonPath: $.property.owners.*.mobileNumberapplicationNo outJsonPath: $.Data.applicationNo - inJsonPath: $.applicationStatus outJsonPath: $.Data.ownersmobileNosapplicationStatus - inJsonPath: $.applicationNostatus outJsonPath: $.Data.applicationNostatus - inJsonPath: $.applicationStatusconnectionNo outJsonPath: $.Data.applicationStatusconnectionNo - inJsonPath: $.statusoldConnectionNo outJsonPath: $.Data.statusoldConnectionNo - inJsonPath: $.connectionNoplumberInfo outJsonPath: $.Data.connectionNoplumberInfo - inJsonPath: $.oldConnectionNoroadCuttingInfo outJsonPath: $.Data.oldConnectionNoroadCuttingInfo - inJsonPath: $.plumberInfoconnectionHolders outJsonPath: $.Data.plumberInfoconnectionHolders - inJsonPath: $.roadType outJsonPath: $.Data.roadType - inJsonPath: $.roadCuttingArea outJsonPath: $.Data.roadCuttingArea - inJsonPath: $.connectionExecutionDate outJsonPath: $.Data.connectionExecutionDate - inJsonPath: $.connectionCategory outJsonPath: $.Data.connectionCategory - inJsonPath: $.connectionType outJsonPath: $.Data.connectionType - inJsonPath: $.additionalDetails outJsonPath: $.Data.additionalDetails - inJsonPath: $.id outJsonPath: $.Data.id - inJsonPath: $.propertyId outJsonPath: $.property.propertyIdData.propertyId - inJsonPath: $.tenantId outJsonPath: $.Data.tenantId - inJsonPath: $.proposedWaterClosets outJsonPath: $.Data.propertyIdproposedWaterClosets - inJsonPath: $.property.tenantIdproposedToilets outJsonPath: $.Data.tenantIdproposedToilets - inJsonPath: $.proposedWaterClosetsnoOfWaterClosets outJsonPath: $.Data.proposedWaterClosetsnoOfWaterClosets - inJsonPath: $.proposedToiletsnoOfToilets outJsonPath: $.Data.proposedToiletsnoOfToilets - inJsonPath: $.noOfWaterClosetsapplicationType outJsonPath: $.Data.noOfWaterClosetsapplicationType - inJsonPath: $.noOfToiletsdateEffectiveFrom outJsonPath: $.Data.noOfToiletsdateEffectiveFrom externalUriMapping: - path: http://egov-workflow-v2.egov:8080/egov-workflow-v2/egov-wf/process/_search queryParam: businessIds=$.applicationNo,history=true,tenantId=$.property.tenantId apiRequest: {"RequestInfo":{"apiId":"org.egov.pt","ver":"1.0","ts":1502890899493,"action":"asd","did":"4354648646","key":"xyz","msgId":"654654","requesterId":"61","authToken":"d9994555-7656-4a67-ab3a-a952a0d4dfc8","userInfo":{"id":1,"uuid":"1fec8102-0e02-4d0a-b283-cd80d5dab067","type":"EMPLOYEE","tenantId":"pb.amritsar","roles":[{"name":"Employee","code":"EMPLOYEE","tenantId":"pb.amritsar"}]}}} uriResponseMapping: - inJsonPath: $.ProcessInstances outJsonPath: $.Data.history |
Notifications :
To enable or disable notifcation
notification.sms.enabled=true
egov.user.event.notification.enabled=true
...
After connection activation or legacy connection, we can edit the connection. This process based on defined workflow. Any action is based on defined roles on the action level. For edit connection, we need to upload some supporting documents and mandatory info.
...
Workflow config for edit connection:
...
for edit connection:
Code Block |
---|
{ "RequestInfo": { "apiId": "Rainmaker", "action": "", "did": 1, "key": "", "msgId": "20170310130900|en_IN", "requesterId": "", "ts": 1513579888683, "ver": ".01", "authToken": "{{Auth_Token}}" }, "BusinessServices": [ { "tenantId": "pb", "businessService": "ModifySWConnection", "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": [ "SW_CEMP" ] } ] }, { "sla": null, "state": "INITIATED", "applicationStatus": "INITIATED", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "action": "SUBMIT_APPLICATION", "nextState": "PENDING_FOR_APPROVAL", "roles": [ "SW_CEMP" ] } ] }, { "sla": 86400000, "state": "PENDING_FOR_APPROVAL", "applicationStatus": "PENDING_FOR_APPROVAL", "docUploadRequired": false, "isStartState": false, "isStateUpdatable": true, "isTerminateState": false, "actions": [ { "action": "APPROVE_CONNECTION", "nextState": "APPROVED", "roles": [ "SW_APPROVER" ] }, { "action": "REJECT", "nextState": "REJECTED", "roles": [ "SW_APPROVER" ] }, { "action": "SEND_BACK", "nextState": "INITIATED", "roles": [ "SW_APPROVER" ] } ] }, { "sla": null, "state": "REJECTED", "applicationStatus": "REJECTED", "isStateUpdatable": false, "docUploadRequired": false, "isStartState": false, "isTerminateState": true }, { "sla": null, "state": "APPROVED", "applicationStatus": "APPROVED", "isStateUpdatable": false, "docUploadRequired": false, "isStartState": false, "isTerminateState": true } ] } ] } |
...