Versions Compared

Key

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

...

  1. Creating sewerage connection

  2. Updating sewerage connection

  3. Apply for Property creation.

  4. Searching sewerage connection based on few criterias mentioned in swagger documentation later

  5. Creating property if it doesnt exist

  6. Creating and updating workflow. 

...

The variables in the Application.properties to be updated are as follows

...

Code Block
sw-services-calculation
PropertyTax

master-config.json for sewerage service

Code Block
"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": []
    }
  }

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

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

Postman link:

https://www.getpostman.com/collections/27458a8c6249d786317ce4c39fd6c0ed0a7dfacd

Workflow business service config:

Code Block
{
  "BusinessServicesRequestInfo": [
    {
 
    "tenantIdapiId": "pbRainmaker",

     "businessServiceaction": "NewSW1",

     "businessdid": "sw-services"1,

     "businessServiceSlakey": 259200000"",
      "statesmsgId": ["20170310130900|en_IN",
    "requesterId": "",
  {     "ts": 1513579888683,
     "slaver": null".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
        }
      ]
    }
  ]
}

Indexer config for sewerage-service:

...

Workflow for property creation through Water and Sewerage Module

Code Block
{
    "BusinessServices": [
      {
        "tenantId": "pb",
        "businessService": "NewWS1",
        "business": "ws-services",
        "businessServiceSla": 259200000,
        "states": [
          {
            "sla": null,
            "state": null,
            "applicationStatus": "INWORKFLOW",
            "docUploadRequired": false,
            "isStartState": true,
            "isTerminateState": false,
            "isStateUpdatable": false,
            "actions": [
              {
                "action": "OPEN",
                "nextState": "INITIATED",
                "roles": [
                  "CITIZEN",
                  "WS_CEMP"
                ]
              }
            ]
          },
          {
            "sla": null,
            "state": "INITIATED",
            "applicationStatus": "INWORKFLOW",
            "docUploadRequired": false,
            "isStartState": true,
            "isTerminateState": false,
            "isStateUpdatable": true,
            "actions": [
              {
                "action": "SUBMIT",
                "nextState": "APPROVED",
                "roles": [
                  "CITIZEN",
                  "WS_CEMP"
                ]
              }
            ]
          },
          {
            "sla": null,
            "state": "APPROVED",
            "applicationStatus": "ACTIVE",
            "docUploadRequired": false,
            "isStartState": false,
            "isTerminateState": true,
            "isStateUpdatable": false,
            "actions": null
          }
        ]
      }
    ]
  }

Indexer config for sewerage-service:

  • The indexer provides the facility for indexing the data to elastic search.

...

Code Block
breakoutModewide
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": []},"ownersmobileNosassignes": []},"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
            fieldMapping:outJsonPath: $.Data.workflow.assignes
          - inJsonPath: $.applicationStatus.stateapplicationNo
            outJsonPath: $.Data.workflow.stateapplicationNo
          - inJsonPath: $.processInstance.actionapplicationStatus
            outJsonPath: $.Data.workflow.actionapplicationStatus
          - inJsonPath: $.processInstance.assignes.*.uuidstatus
            outJsonPath: $.Data.workflow.assignesstatus
          - inJsonPath: $.property.owners.*.mobileNumberconnectionNo
            outJsonPath: $.Data.ownersmobileNosconnectionNo
          - inJsonPath: $.applicationNooldConnectionNo
            outJsonPath: $.Data.applicationNooldConnectionNo
          - inJsonPath: $.applicationStatusplumberInfo
            outJsonPath: $.Data.applicationStatusplumberInfo
          - inJsonPath: $.statusroadCuttingInfo
            outJsonPath: $.Data.statusroadCuttingInfo  
          - inJsonPath: $.connectionNoconnectionHolders
            outJsonPath: $.Data.connectionNoconnectionHolders
          - inJsonPath: $.oldConnectionNoroadType
            outJsonPath: $.Data.oldConnectionNoroadType
          - inJsonPath: $.plumberInforoadCuttingArea
            outJsonPath: $.Data.plumberInforoadCuttingArea
          - inJsonPath: $.roadTypeconnectionExecutionDate
            outJsonPath: $.Data.roadTypeconnectionExecutionDate
          - inJsonPath: $.roadCuttingAreaconnectionCategory
            outJsonPath: $.Data.roadCuttingAreaconnectionCategory
          - inJsonPath: $.connectionExecutionDateconnectionType
            outJsonPath: $.Data.connectionExecutionDateconnectionType
          - inJsonPath: $.connectionCategoryadditionalDetails
            outJsonPath: $.Data.connectionCategoryadditionalDetails
          - inJsonPath: $.connectionTypeid
            outJsonPath: $.Data.connectionTypeid
          - inJsonPath: $.additionalDetailspropertyId
            outJsonPath: $.Data.additionalDetailspropertyId
          - inJsonPath: $.idtenantId
            outJsonPath: $.Data.idtenantId
          - inJsonPath: $.property.propertyIdproposedWaterClosets
            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

  - 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": []},"ownersmobileNosapplicationNo":[]"","applicationNoapplicationStatus":"","applicationStatusstatus":"","statusconnectionNo":"","connectionNooldConnectionNo":"","oldConnectionNoplumberInfo":[],"roadCuttingInfo":[],"plumberInfoconnectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","noOfToilets":"","applicationType":"","dateEffectiveFrom":"","history":{}}}
          fieldMapping:
          - inJsonPath: $.applicationStatus.state.state
            outJsonPath: $.Data.workflow.state
          - inJsonPath: $.processInstance.action
            outJsonPath: $.Data.workflow.action
          - inJsonPath: $.processInstance.assignes.*.uuid
            outJsonPath: $.Data.workflow.assignes
          - inJsonPath: $.applicationNo
            outJsonPath: $.Data.workflow.stateapplicationNo
          - inJsonPath: $.processInstance.actionapplicationStatus
            outJsonPath: $.Data.workflow.actionapplicationStatus
          - inJsonPath: $.processInstance.assignes.*.uuidstatus
            outJsonPath: $.Data.workflow.assignesstatus
          - inJsonPath: $.property.owners.*.mobileNumberconnectionNo
            outJsonPath: $.Data.ownersmobileNosconnectionNo
          - inJsonPath: $.applicationNooldConnectionNo
            outJsonPath: $.Data.applicationNooldConnectionNo
          - inJsonPath: $.applicationStatusplumberInfo
            outJsonPath: $.Data.applicationStatusplumberInfo
          - inJsonPath: $.statusroadCuttingInfo
            outJsonPath: $.Data.statusroadCuttingInfo  
          - inJsonPath: $.connectionNoconnectionHolders
            outJsonPath: $.Data.connectionNoconnectionHolders
          - inJsonPath: $.oldConnectionNoroadType
            outJsonPath: $.Data.oldConnectionNoroadType
          - inJsonPath: $.plumberInforoadCuttingArea
            outJsonPath: $.Data.plumberInforoadCuttingArea
          - inJsonPath: $.roadTypeconnectionExecutionDate
            outJsonPath: $.Data.roadTypeconnectionExecutionDate
          - inJsonPath: $.roadCuttingAreaconnectionCategory
            outJsonPath: $.Data.roadCuttingAreaconnectionCategory
          - inJsonPath: $.connectionExecutionDateconnectionType
            outJsonPath: $.Data.connectionExecutionDateconnectionType
          - inJsonPath: $.connectionCategoryadditionalDetails
            outJsonPath: $.Data.connectionCategoryadditionalDetails
          - inJsonPath: $.connectionTypeid
            outJsonPath: $.Data.connectionTypeid
          - inJsonPath: $.additionalDetailspropertyId
            outJsonPath: $.Data.additionalDetailspropertyId
          - inJsonPath: $.idtenantId
            outJsonPath: $.Data.idtenantId
          - inJsonPath: $.property.propertyIdproposedWaterClosets
            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


  - 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":[],"roadCuttingInfo":[],"connectionHolders":[],"roadType":"","roadCuttingArea":"","connectionExecutionDate":"","connectionCategory":"","connectionType":"","additionalDetails":{},"id":"","propertyId":"","tenantId":"","proposedWaterClosets":"","proposedToilets":"","noOfWaterClosets":"","proposedToiletsnoOfToilets":"","noOfWaterClosetsapplicationType":"","noOfToiletsdateEffectiveFrom":"","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: $.tenantId
            outJsonPath: $.property.tenantIdData.tenantId
          - inJsonPath: $.proposedWaterClosets
            outJsonPath: $.Data.proposedWaterClosets
          - inJsonPath: $.proposedToilets
            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

...

Code Block
languagejson
[
        {
            "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"
        }
    ]

...

Table UML Diagram:

...

Modify connection:

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:

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": [
     {       {
   "sla": 86400000,           "stateaction": "PENDINGAPPROVE_FOR_APPROVALCONNECTION",
              "applicationStatusnextState": "PENDING_FOR_APPROVALAPPROVED",
              "docUploadRequiredroles": false,
[
         "isStartState": false,      "SW_APPROVER"
    "isStateUpdatable": true,           "isTerminateState": false,]
           "actions": [ },
            {
              "action": "APPROVE_CONNECTIONREJECT",
              "nextState": "APPROVEDREJECTED",
              "roles": [
                "SW_APPROVER"
              ]
            },
            {
              "action": "REJECTSEND_BACK",
              "nextState": "REJECTEDINITIATED",
              "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
        }
      ]
    }
  ]
}

...

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.

Multiple Road Type Support
We can add road cutting details of multiple roads to the sewerage connection. For each road which goes under cutting process we have to fill their road type details and road cutting area.
Based on this information, application one time fee estimate is calculated.

Sewerage Calculator Service

...