Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

The NOC 'apply', one of the major feature in BPA Module. It allows Stakeholder to update NOC Applications .

Every application is a part of the workflow.

Functionality

This section covers the high-level details of the functionalities available NOC Service

  • BPA Services creates the NOC records

  • NOC User of specific NOC Type can approve/Reject the Specific NOC Application

  • Two Modes of NOC are applicable here

    • Online :- This mode of NOC will have specific NOC User role users will be available in the system, Who can take take of approval and rejection of the application

    • Offline :- This mode of NOC will not have specific NOC User role in the system. The source Module in initial case BPA i.e bpa-services will auto approve the application on NOC_VERIFIER Stage.

System 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-user, eGov-localization will be helpful.

Setup and usage:

The Application is present among the municipal services group of applications available in the eGov-services git repository with the folder name noc-services.  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 :

  • Please refer to Swagger API for YAML file details. Link - API Specs.

Application.properties File Information:

Here we are listing the configs apart from dependent service host, url’s, DB and Flyway configs.

Here we are listing the configs apart from dependent service host, url’s, DB and Flyway configs.

  • kafka topics persister configs for eGov persister to save and update land Data

    • persister.save.noc.topic=save-noc-application

    • persister.update.noc.topic=update-noc-application

    • persister.update.noc.workflow.topic=update-noc-workflow

  • Offline NOC approval should verify required documents is driven through the config

    • noc.offline.doc.required = false

  • NOC Application Number idGen Config Key Name

    • egov.idgen.noc.application.id=noc.application.number

  • SMS Kafka notification topic name

    • kafka.topics.notification.sms=egov.core.notification.sms

  • Pagination Configs

    • egov.noc.pagination.default.offset=0

    • egov.noc.pagination.default.limit=10

    • egov.noc.pagination.max.limit=1000

external API references:

  • egov-user - ( Manage user )

  • egov-user-event ( What’s New and Events )

  • egov-filestore ( To store the documents uploaded by the user )

  • egov-idgen ( To generate the application No, Permit No )

  • egov-indexer ( To index the bpa data )

  • egov-localization ( To use the localized messages )

  • egov-location ( To store the address locality )

  • egov-mdms ( Configurations/master data used in the application is served by MDMS )

  • egov-notification-sms ( Service to send SMS to the users involved in the application )

  • egov-persister ( Helps to persist the data )

  • egov-searcher ( Search query used to simply the search )

  • egov-workflow-v2 ( Workflow configuration for different BPA application is configured )

Configuration:

NOC Specific Mdms configuration:

MDMS Github Repo

Under the data/<state code> folder you can find the NOC which has all the MDMS JSON’s

master-config.json for NOC

 

 "NOC":{
    "DocumentTypeMapping":{
      "masterName": "DocumentTypeMapping",
      "isStateLevel": true,
      "uniqueKeys": []
    },
     "NocType":{
      "masterName": "NocType",
      "isStateLevel": true,
      "uniqueKeys": [
       "$.code"
      ]
    }
  }

MDMS Details

 

MDMS Name

MDMS Path

Description

Example

DocumentTypeMapping

DocumentTypeMapping

Lists out the documents to be available to upload for a specific NOC Type and applicationType

In the example you can see the docTypes for NOCType: FIRE_NOC for PROVISIONAL and RENEW Application Types

{
         "applicationType": "PROVISIONAL",
         "nocType": "FIRE_NOC",
         "docTypes":[
            {
               "documentType": "NOC.FIRE",
               "required": true
            }
         ]
      },
      {
         "applicationType": "NEW",
         "nocType": "FIRE_NOC",
         "docTypes":[
            {
               "documentType": "NOC.FIRE",
               "required": true
            }
         ]
      },

NOCType

NocType

Lists out the types of NOC Supported by the noc-services.

isActive : Indicates status

mode : Indicates the mode of the nocType online or offline

offlineWF : workflow code for offline mode noc for this specific nocType

onlineWF : workflow code the online mode noc for this specific nocType

code : NocType code unique reference

{
       "code": "FIRE_NOC",
       "isActive": true,
       "offlineWF":"FIRE_NOC_OFFLINE",
       "onlineWF":"FIRE_NOC_SRV",
       "mode":"online",
       "NocUserRole":"FIRE_NOC_APPROVER"
    },
    {
      "code":"AIRPORT_AUTHORITY",
      "isActive": true,
      "offlineWF":"AIRPORT_NOC_OFFLINE",
      "onlineWF":"AIRPORT_NOC_SRV",
      "mode":"offline",
       "NocUserRole":"AIRPORT_AUTHORITY_APPROVER"
    }

Access MDMS Config

Action Test : URL Actions adding

action-test.json

{
      "id": 2000,
      "name": "NOC Create",
      "url": "/noc-services/v1/noc/_create",
      "displayName": "Create",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "NOC",
      "code": "null",
      "path": ""
    },
    {
      "id": 2001,
      "name": "NOC Search",
      "url": "/noc-services/v1/noc/_search",
      "displayName": "Search",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "NOC",
      "code": "null",
      "path": ""
    },
    {
      "id": 2002,
      "name": "NOC Update",
      "url": "/noc-services/v1/noc/_update",
      "displayName": "Update",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "NOC",
      "code": "null",
      "path": ""
    },{
      "id": 2005,
      "name": "Locality searcher endpoint for Noc Servcies",
      "url": "/egov-searcher/locality/noc-services/_get",
      "displayName": "Noc locality searcher",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "egov-searcher",
      "code": "null",
      "path": ""
    },

Access to the Roles for the above Actions

roleacton.json

{
      "rolecode": "BPA_ARCHITECT",
      "actionid": 2000,
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "CITIZEN",
      "actionid": 2000,
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "EMPLOYEE",
      "actionid": 2000,
      "actioncode": "",
      "tenantId": "pb"
    },{
      "rolecode": "CITIZEN",
      "actionid": 2001,
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "EMPLOYEE",
      "actionid": 2001,
      "actioncode": "",
      "tenantId": "pb"
    }, {
      "rolecode": "FIRE_NOC_APPROVER",
      "actionid": 2005,
      "actioncode": "",
      "tenantId": "pb"
    },
    {
      "rolecode": "AIRPORT_AUTHORITY_APPROVER",
      "actionid": 2005,
      "actioncode": "",
      "tenantId": "pb"
    },

Roles

FIRE_NOC_APPROVER role is created as NOC User for nocType FIRE_NOC

AIRPORT_AUTHORITY_APPROVER role is created as NOC User for nocType AIRPORT_AUTHORITY

ID Gen Config for BPA Numbers

idFormats.json

NOC Application Number format Config

 {
      "format":"PB-NOCSRV-[cy:yyyy-MM-dd]-[SEQ_EG_NOC_APN]",
      "idname":"noc.application.number"
    },

Persister configuration:

NOC Persister YAML

Indexer Configuration:

NOC Indexer YAML

Locality Search Configuration:

Setup the locality Search query in the localitySearcher.yml as new entry for noc-services (Right now this is implemented assuming BPA would be the source. This source has to be changed for next module implementation) Add RoleAction Test and Role Action for the URL /egov-searcher/locality/noc-services/_get

  - name: noc-services
    query:
      baseQuery: |
        Select row_to_json(result) from
        (
         select noc.applicationNo as referenceNumber,ad.locality from eg_bpa_buildingplan bpa
          INNER JOIN eg_land_Address ad ON ad.landInfoId = bpa.landid JOIN eg_noc noc ON noc.sourceRefId = bpa.applicationNo
        ) result  $where
      groupBy:
      orderBy:
    searchParams:
      condition: AND
      params:
      - name: result.referenceNumber
        isMandatory: true
        jsonPath: $.searchCriteria.referenceNumber
        operator: 

    output:
      jsonFormat: {"ResponseInfo": {}}
      outJsonPath: $.Localities
      responseInfoPath: $.ResponseInfo

 Workflow Configuration

Offline Workflow configs

FIRE_NOC_OFFLINE

{
            
            "businessService": "FIRE_NOC_OFFLINE",
            "business": "noc-services",
            "businessServiceSla": 5184000000,
            "states": [
                {
                   
                    "sla": null,
                    "state": null,
                    "applicationStatus": "INITIATED",
                    "docUploadRequired": false,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            
                            "currentState": "null",
                            "action": "INITIATE",
                            "nextState": "INITIATED",
                            "roles": [
                                "CITIZEN",
                                "BPA_ARCHITECT",
                                "BPA_ENGINEER",
                                "BPA_BUILDER",
                                "BPA_STRUCTURALENGINEER",
                                "BPA_TOWNPLANNER",
                                "BPA_SUPERVISOR"
                            ]
                        }
                    ]
                },
                {
                    
                    "sla": null,
                    "state": "INITIATED",
                    "applicationStatus": "INPROGRESS",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": false,
                    "actions": [
                        {
                           
                            "currentState": "INITIATED",
                            "action": "AUTO_APPROVE",
                            "nextState": "AUTO_APPROVED",
                            "roles": [
                                "BPA_VERIFIER",
                                "BPA_FIELD_INSPECTOR",
                                "BPA_NOC_VERIFIER",
                                "BPA_APPROVER"
                            ]
                        },
                        {
                            
                            "currentState": "INITIATED",
                            "action": "VOID",
                            "nextState": "VOIDED",
                            "roles": [
                                "BPA_VERIFIER",
                                "BPA_FIELD_INSPECTOR",
                                "BPA_NOC_VERIFIER",
                                "BPA_APPROVER"
                            ]
                        }
                    ]
                },
                {
                   
                    "sla": null,
                    "state": "VOIDED",
                    "applicationStatus": "VOIDED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                    
                    "sla": null,
                    "state": "AUTO_APPROVED",
                    "applicationStatus": "AUTO_APPROVED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                }
            ]
        }

AIRPORT_NOC_OFFLINE

{
            
            "businessService": "AIRPORT_NOC_OFFLINE",
            "business": "noc-services",
            "businessServiceSla": 5184000000,
            "states": [
                {
                   
                    "sla": null,
                    "state": null,
                    "applicationStatus": "INITIATED",
                    "docUploadRequired": false,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            
                            "currentState": "null",
                            "action": "INITIATE",
                            "nextState": "INITIATED",
                            "roles": [
                                "CITIZEN",
                                "BPA_ARCHITECT",
                                "BPA_ENGINEER",
                                "BPA_BUILDER",
                                "BPA_STRUCTURALENGINEER",
                                "BPA_TOWNPLANNER",
                                "BPA_SUPERVISOR"
                            ]
                        }
                    ]
                },
                {
                    
                    "sla": null,
                    "state": "INITIATED",
                    "applicationStatus": "INPROGRESS",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": false,
                    "actions": [
                        {
                           
                            "currentState": "INITIATED",
                            "action": "AUTO_APPROVE",
                            "nextState": "AUTO_APPROVED",
                            "roles": [
                                "BPA_VERIFIER",
                                "BPA_FIELD_INSPECTOR",
                                "BPA_NOC_VERIFIER",
                                "BPA_APPROVER"
                            ]
                        },
                        {
                            
                            "currentState": "INITIATED",
                            "action": "VOID",
                            "nextState": "VOIDED",
                            "roles": [
                                "BPA_VERIFIER",
                                "BPA_FIELD_INSPECTOR",
                                "BPA_NOC_VERIFIER",
                                "BPA_APPROVER"
                            ]
                        }
                    ]
                },
                {
                   
                    "sla": null,
                    "state": "VOIDED",
                    "applicationStatus": "VOIDED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                    
                    "sla": null,
                    "state": "AUTO_APPROVED",
                    "applicationStatus": "AUTO_APPROVED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                }
            ]
        }

FIRE_NOC_SRV

 {
            
            "businessService": "FIRE_NOC_SRV",
            "business": "noc-services",
            "businessServiceSla": 5184000000,
            "states": [
               
                    "sla": null,
                    "state": null,
                    "applicationStatus": "INITIATED",
                    "docUploadRequired": false,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            
                            "currentState": "null",
                            "action": "INITIATE",
                            "nextState": "INITIATED",
                            "roles": [
                                "CITIZEN",
                                "BPA_ARCHITECT",
                                "BPA_ENGINEER",
                                "BPA_BUILDER",
                                "BPA_STRUCTURALENGINEER",
                                "BPA_TOWNPLANNER",
                                "BPA_SUPERVISOR"
                            ]
                        }
                    ]
                },
                {
                    
                    "sla": null,
                    "state": "INITIATED",
                    "applicationStatus": "INPROGRESS",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": false,
                    "actions": [
                        {
                            
                            "currentState": "INITIATED",
                            "action": "REJECT",
                            "nextState": "REJECTED",
                            "roles": [
                                "FIRE_NOC_APPROVER"
                            ]
                        },
                        {
                            
                            "currentState": "INITIATED",
                            "action": "APPROVE",
                            "nextState": "APPROVED",
                            "roles": [
                                "FIRE_NOC_APPROVER"
                            ]
                        },
                        {
                      
                            "currentState": "INITIATED",
                            "action": "VOID",
                            "nextState": "VOIDED",
                            "roles": [
                                "BPA_VERIFIER",
                                "BPA_FIELD_INSPECTOR",
                                "BPA_NOC_VERIFIER"
                            ]
                        }
                    ]
                },
                {
                    
                    "sla": null,
                    "state": "REJECTED",
                    "applicationStatus": "REJECTED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                  
                    "sla": null,
                    "state": "APPROVED",
                    "applicationStatus": "APPROVED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                    
                    "sla": null,
                    "state": "VOIDED",
                    "applicationStatus": "VOIDED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                }
            ]
        }

AIRPORT_NOC_SRV

 {
            
            "businessService": "AIRPORT_NOC_SRV",
            "business": "noc-services",
            "businessServiceSla": 5184000000,
            "states": [
               
                    "sla": null,
                    "state": null,
                    "applicationStatus": "INITIATED",
                    "docUploadRequired": false,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            
                            "currentState": "null",
                            "action": "INITIATE",
                            "nextState": "INITIATED",
                            "roles": [
                                "CITIZEN",
                                "BPA_ARCHITECT",
                                "BPA_ENGINEER",
                                "BPA_BUILDER",
                                "BPA_STRUCTURALENGINEER",
                                "BPA_TOWNPLANNER",
                                "BPA_SUPERVISOR"
                            ]
                        }
                    ]
                },
                {
                    
                    "sla": null,
                    "state": "INITIATED",
                    "applicationStatus": "INPROGRESS",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": false,
                    "actions": [
                        {
                            
                            "currentState": "INITIATED",
                            "action": "REJECT",
                            "nextState": "REJECTED",
                            "roles": [
                                "AIRPORT_AUTHORITY_APPROVER"
                            ]
                        },
                        {
                            
                            "currentState": "INITIATED",
                            "action": "APPROVE",
                            "nextState": "APPROVED",
                            "roles": [
                                "AIRPORT_AUTHORITY_APPROVER"
                            ]
                        },
                        {
                      
                            "currentState": "INITIATED",
                            "action": "VOID",
                            "nextState": "VOIDED",
                            "roles": [
                                "BPA_VERIFIER",
                                "BPA_FIELD_INSPECTOR",
                                "BPA_NOC_VERIFIER"
                            ]
                        }
                    ]
                },
                {
                    
                    "sla": null,
                    "state": "REJECTED",
                    "applicationStatus": "REJECTED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                  
                    "sla": null,
                    "state": "APPROVED",
                    "applicationStatus": "APPROVED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                },
                {
                    
                    "sla": null,
                    "state": "VOIDED",
                    "applicationStatus": "VOIDED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                }
            ]
        }

Database Schema

Notifications

NA

PDF’s Used

NA

  • No labels