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:
Under the data/<state code> folder you can find the NOC which has all the MDMS JSON’s
master-config.json for NOC
Code Block |
---|
"NOC":{
"DocumentTypeMapping":{
"masterName": "DocumentTypeMapping",
"isStateLevel": true,
"uniqueKeys": []
},
"NocType":{
"masterName": "NocType",
"isStateLevel": true,
"uniqueKeys": [
"$.code"
]
}
} |
MDMS Details
...
MDMS Name
...
MDMS Path
...
Description
...
Example
...
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
...
Code Block |
---|
{
"applicationType": "PROVISIONAL",
"nocType": "FIRE_NOC",
"docTypes":[
{
"documentType": "NOC.FIRE",
"required": true
}
]
},
{
"applicationType": "NEW",
"nocType": "FIRE_NOC",
"docTypes":[
{
"documentType": "NOC.FIRE",
"required": true
}
]
}, |
...
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 Block |
---|
{
"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
Code Block |
---|
{
"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
Code Block |
---|
{
"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
NOC Application Number format Config
Code Block |
---|
{
"format":"PB-NOCSRV-[cy:yyyy-MM-dd]-[SEQ_EG_NOC_APN]",
"idname":"noc.application.number"
}, |
Persister configuration:
Indexer Configuration:
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
“
...
FIRE_NOC_OFFLINE
Code Block |
---|
{ |
...
|
...
|
...
|
...
"businessService": "FIRE_NOC_OFFLINE", |
...
|
...
"business": "noc-services", |
...
|
...
Workflow Configuration
Offline Workflow configs
FIRE_NOC_OFFLINE
Code Block |
---|
{ "businessServiceSla": 5184000000, "businessServicetenantId": "FIRE_NOC_OFFLINEpb", "businessstates": "noc-services",[ "businessServiceSla": 5184000000, { "states": [ { "sla": null, "slastate": null, "statetenantId": null"pb", "applicationStatus": "INITIATED", "docUploadRequired": false, "isStartState": true, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "currentState": "null", "action": "INITIATE", "tenantId": "pb", "nextState": "INITIATED", "roles": [ "CITIZEN", "BPA_ARCHITECT", "BPA_ENGINEER", "BPA_BUILDER", "BPA_STRUCTURALENGINEER", "BPA_TOWNPLANNER", "BPA_SUPERVISOR" ] } ] }, { "sla": null, "state": "INITIATED", "applicationStatus": "INPROGRESS", "docUploadRequired": false, "tenantId": "pb", "isStartState": false, "isTerminateState": false, "isStateUpdatable": false, "actions": [ [ { { "currentState": "INITIATED", "currentStateaction": "INITIATEDAUTO_APPROVE", "actiontenantId": "AUTO_APPROVEpb", "nextState": "AUTO_APPROVED", "roles": [ "BPA_VERIFIER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER", "BPA_APPROVER" ] }, { "currentState": "INITIATED", "action": "VOID", "tenantId": "pb", "nextState": "VOIDED", "roles": [ "BPA_VERIFIER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER", "BPA_APPROVER" ] } ] }, { "sla": null, "state": "VOIDED", "applicationStatus": "VOIDED", "docUploadRequired": false, "tenantId": "pb", "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "sla": null, "slastate": null"AUTO_APPROVED", "stateapplicationStatus": "AUTO_APPROVED", "applicationStatusdocUploadRequired": "AUTO_APPROVED"false, "docUploadRequiredtenantId": false"pb", "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null } ] } |
...
Code Block |
---|
{ "businessService": "AIRPORT_NOC_OFFLINE", "business": "noc-services", "tenantId": "pb", "businessServiceSla": 5184000000, "states": [ { "sla": null, "state": null, "applicationStatus": "INITIATED", "docUploadRequired": false, "tenantId": "pb", "isStartState": true, "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "currentState": "null", "currentStateaction": "nullINITIATE", "actiontenantId": "INITIATEpb", "nextState": "INITIATED", "roles": [ "CITIZEN", "BPA_ARCHITECT", "BPA_ENGINEER", "BPA_BUILDER", "BPA_STRUCTURALENGINEER", "BPA_TOWNPLANNER", "BPA_SUPERVISOR" ] } ] }, { "sla": null, "state": "INITIATED", "tenantId": "pb", "applicationStatus": "INPROGRESS", "docUploadRequired": false, "isStartState": false, "isTerminateState": false, "isStateUpdatable": false, "actions": [ { "currentState": "INITIATED", "action": "AUTO_APPROVE", "tenantId": "pb", "nextState": "AUTO_APPROVED", "roles": [ "BPA_VERIFIER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER", "BPA_APPROVER" ] }, { "currentState": "INITIATED", "currentState "action": "INITIATEDVOID", "actiontenantId": "VOIDpb", "nextState": "VOIDED", "roles": [ "BPA_VERIFIER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER", "BPA_APPROVER" ] } ] }, { "sla": null, "state": "VOIDED", "tenantId": "pb", "applicationStatus": "VOIDED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "sla": null, "state": "AUTO_APPROVED", "tenantId": "pb", "applicationStatus": "AUTO_APPROVED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null } ] } |
...
Code Block |
---|
{ "businessService": "FIRE_NOC_SRV", "business": "noc-services", "tenantId": "pb", "businessServiceSla": 5184000000, "states": [ "sla": null, "state": null, "applicationStatus": null"INITIATED", "applicationStatusdocUploadRequired": "INITIATED"false, "docUploadRequiredisStartState": falsetrue, "isStartStatetenantId": true"pb", "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "currentState": "null", "action": "INITIATE", "tenantId": "pb", "nextState": "INITIATED", "roles": [ "CITIZEN", "BPA_ARCHITECT", "BPA_ENGINEER", "BPA_BUILDER", "BPA_STRUCTURALENGINEER", "BPA_TOWNPLANNER", "BPA_SUPERVISOR" ] } ] }, { "sla": null, "state": "INITIATED", "applicationStatusapplicationStatus": "INPROGRESS", "docUploadRequired": false, "tenantId": "INPROGRESSpb", "docUploadRequiredisStartState": false, "isStartStateisTerminateState": false, "isTerminateStateisStateUpdatable": false, "isStateUpdatableactions": false,[ "actions": [ { { "currentState": "INITIATED", "currentState "tenantId": "INITIATEDpb", "action": "REJECT", "nextState": "REJECTED", "roles": [ "FIRE_NOC_APPROVER" ] }, { "currentState": "INITIATED", "tenantId": "pb", "action": "APPROVE", "nextState": "APPROVED", "roles": [ "FIRE_NOC_APPROVER" ] }, { "currentState": "INITIATED", "action": "VOID", "tenantId": "pb", "nextState": "VOIDED", "roles": [ "BPA_VERIFIER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER" ] } ] }, { "sla": null, "state": "REJECTED", "tenantId": "pb", "applicationStatus": "REJECTED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "sla": null, "state": "APPROVED", "tenantId": "pb", "applicationStatus": "APPROVED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "sla": null, "state": "VOIDED", "tenantId": "pb", "applicationStatus": "VOIDED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null } ] } |
AIRPORT_NOC_SRV
Code Block |
---|
{ "businessService": "AIRPORT_NOC_SRV", "businessServicebusiness": "AIRPORT_NOC_SRVnoc-services", "businesstenantId": "noc-servicespb", "businessServiceSla": 5184000000, "states": [ "sla": null, "state": null, "applicationStatus": "INITIATED", "docUploadRequired": false, "isStartState": true, "tenantId": "pb", "isTerminateState": false, "isStateUpdatable": true, "actions": [ { "currentState": "null", "action": "INITIATE", "tenantId": "pb", "nextState": "INITIATED", "roles": [ "CITIZEN", "BPA_ARCHITECT", "BPA_ENGINEER", "BPA_BUILDER", "BPA_STRUCTURALENGINEER", "BPA_TOWNPLANNER", "BPA_SUPERVISOR" ] } ] }, { "sla": null, "state": "INITIATED", "applicationStatus": "INPROGRESS", "docUploadRequired": false, "docUploadRequiredisStartState": false, "isStartStateisTerminateState": false, "isTerminateStatetenantId": false"pb", "isStateUpdatable": false, "actions": [ { "currentState": "INITIATED", "action": "REJECT", "tenantId": "pb", "nextState": "REJECTED", "roles": [ "AIRPORT_AUTHORITY_APPROVER" ] }, { "currentState": "INITIATED", "action": "APPROVE", "tenantId": "pb", "nextState": "APPROVED", "roles": [ "AIRPORT_AUTHORITY_APPROVER"" ] }, ] { }, { "currentState": "INITIATED", "currentStateaction": "INITIATEDVOID", "actiontenantId": "VOIDpb", "nextState": "VOIDED", "roles": [ "BPA_VERIFIER", "BPA_FIELD_INSPECTOR", "BPA_NOC_VERIFIER" ] } ] }, { "sla": null, "state": "REJECTED", "tenantId": "pb", "applicationStatus": "REJECTED", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "sla": null, "state": "APPROVED", "applicationStatus": "APPROVED", "docUploadRequired": false, "tenantId": "pb", "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null }, { "sla": null, "state": "VOIDED", "applicationStatus": "VOIDED", "tenantId": "pb", "docUploadRequired": false, "isStartState": false, "isTerminateState": true, "isStateUpdatable": false, "actions": null } ] } |
Database Schema
...
Notifications
...