PQM Service

Overview

The Process Quality Management (PQM) service will help users to create, update, and search for process quality monitoring tests. The service will evaluate the uploaded test values against benchmarks and produce result (FAIL/PASS) status. Test results will be further processed for anomaly analysis. The service can perform two types of test: Manual Test (Lab), and Automatic Test (IoT-based).

Plant User Mapping

The service enables mapping plant codes to operators and ULB admins, ensuring that each is only authorised to manage plants linked to their account, enhancing control and accountability.

Service Dependencies:

List of services that PQM service depends on:

Master Data

The following masters need to be created as part of this module:

  • Plant

  • PlantType

  • PlantConfig

  • Process

  • ProcessType

  • ProcessSubType

  • Stage

  • Material

  • Parameter

  • Unit

  • BenchmarkRule

  • TestingStandard

  • QualityCriteria

  • Device

  • DeviceDetails

  • DeviceConfig

Deployment Details

  1. Deploy the latest version of PQM.

  2. Add pqm-persister.yml file in the config folder in git and add that path in persister (the file path is to be added in environment yaml file in param called persist-yml-path), and restart the egov-persister service.

  3. If index are to be created, add the indexer config path in the indexer service (the file path is to be added in environment yaml file in param called egov-indexer-yaml-repo-path), and restart egov-indexer service.

Devops setups for new environment

Path :- deploy-as-code/helm/charts/sanitation/pqm-service

https://github.com/egovernments/DIGIT-DevOps/tree/unified-env/deploy-as-code/helm/charts/sanitation/pqm-service

https://github.com/egovernments/DIGIT-DevOps/blob/unified-env/deploy-as-code/helm/environments/sanitation-uat.yaml#L138C5-L138C42

Path:- build/build-config.yml

https://github.com/egovernments/SANITATION/commit/6e4db6ca9d4a52df1df5d4cb67a2df84a0bed420

Path:- deploy-as-code/helm/charts/sanitation/pqm-anomaly-finder

https://github.com/egovernments/DIGIT-DevOps/tree/unified-env/deploy-as-code/helm/charts/sanitation/pqm-anomaly-finder

https://github.com/egovernments/DIGIT-DevOps/blob/unified-env/deploy-as-code/helm/environments/sanitation.yaml#L140C1-L141C1

Path :- build/build-config.yml

https://github.com/egovernments/SANITATION/commit/576b1bb9531a2080e039d17af9d3c6a6c63d76e7

Configuration Details

Make changes in config accordingly and restart the egov-persister-service and egov-indexer-service.

  1. egov-persister/pqm-persister.yaml - file link

  2. egov-indexer/pqm-service-indexer.yml - file link

  3. Add path of indexer in the devOps (pqm-service-indexer.yml) - file link

  4. Add path of persister in the devOps (pqm-persister.yaml) - file link

  5. Idgen config - file link

Role Action Mapping

Path:- data/pg/ACCESSCONTROL-ACTIONS-TEST/actions-test.json

{
      "id": 325,
      "name": "Create PQM Application",
      "url": "/pqm-service/v1/_create",
      "displayName": "Apply PQM Appliacations",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
    {
      "id": 326,
      "name": "Search PQM Application",
      "url": "/pqm-service/v1/_update",
      "displayName": "Update PQM Appliacations",
      "orderNumber": 1,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
   {
      "id": 327,
      "name": "Update PQM Application",
      "url": "/pqm-service/v1/_search",
      "displayName": "Search PQM Appliacations",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
    {
      "id": 364,
      "name": "Create Plant User Mapping",
      "url": "/pqm-service/plant/user/v1/_create",
      "displayName": "Create plant-individual mapping",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
    {
      "id": 365,
      "name": "Update Plant User Mapping",
      "url": "/pqm-service/plant/user/v1/_update",
      "displayName": "Update plant-individual mapping",
      "orderNumber": 1,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
    {
      "id": 366,
      "name": "Search Plant User Mapping",
      "url": "/pqm-service/plant/user/v1/_search",
      "displayName": "Search plant-individual mapping",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
    {
      "id": 367,
      "name": "Schedule PQM Application",
      "url": "/pqm-service/v1/_scheduler",
      "displayName": "Schedule PQM Applications",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    },
    {
      "id": 358,
      "name": "DSS Dashboard Config PQM",
      "url": "/dashboard-analytics/dashboard/getDashboardConfig/pqm",
      "parentModule": "",
      "displayName": "DSS",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "DSS",
      "code": "null",
      "path": ""
    },
    {
      "id": 351,
      "name": "Search PQM Application",
      "url": "/inbox/v2/_search",
      "displayName": "Search PQM Applications",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "PQM",
      "code": "null",
      "path": ""
    }

Path :- data/pg/ACCESSCONTROL-ROLEACTIONS/roleactions.json

   {
      "rolecode": "PQM_ADMIN",
      "actionid": 325,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_TP_OPERATOR",
      "actionid": 325,
      "actioncode": "",
      "tenantId": "pg"
    },
      {
      "rolecode": "PQM_ADMIN",
      "actionid": 326,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_TP_OPERATOR",
      "actionid": 326,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
        "rolecode": "PQM_ADMIN",
        "actionid": 327,
        "actioncode": "",
        "tenantId": "pg"
      },
      {
        "rolecode": "PQM_TP_OPERATOR",
        "actionid": 327,
        "actioncode": "",
        "tenantId": "pg"
     },
    {
      "rolecode": "PQM_ADMIN",
      "actionid": 364,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "FSM_ADMIN",
      "actionid": 364,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "FSM_ADMIN",
      "actionid": 365,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_ADMIN",
      "actionid": 365,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_ADMIN",
      "actionid": 366,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_TP_OPERATOR",
      "actionid": 366,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "FSM_ADMIN",
      "actionid": 366,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_CRONJOB_SCHEDULER",
      "actionid": 367,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_TP_OPERATOR",
      "actionid": 358,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_ADMIN",
      "actionid": 358,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_ADMIN",
      "actionid": 351,
      "actioncode": "",
      "tenantId": "pg"
    },
    {
      "rolecode": "PQM_TP_OPERATOR",
      "actionid": 351,
      "actioncode": "",
      "tenantId": "pg"
    },

Inbox V2 Integration

  • Add the mdms changes in the given path and restart the mdms service .

Path:- data/pg/inbox-v2/InboxConfiguration.json

File:- Mdms file

  • Add the indexer file in the given path and restart the services .

Path :- egov-indexer/egov-pqm-service.yml

File :- file which need to add click here

PQM-Inbox-Reindexing

Postman Collection

Steps to legacy-index PQM

For re-indexing refer this link

PQM-Service Re-Indexing

PQM-Service Re-Indexing

Postman Collection

For re-indexing refer this link

Business Service/Workflow Configuration

Kafka Topic Details

PQM Test Topics

DescriptionTopic Name

Save Test on creation

save-test-application

Update Test

update-test-application

Update Test Workflow

update-workflow-test-application

Save test topic for Inbox

save-test-event-application

Update test topic for Inbox

update-test-event-application

Anomaly topic for when a test fails

create-pqm-anomaly-finder

Anomaly topic for when a test result has not been submitted

testResultNotSubmitted-anomaly-topic

Creation of plant-user mapping

save-plant-user-mapping

Updation of plant-user mapping

update-plant-user-mapping

Business Service/Workflow Configuration

Create businessService (workflow configuration) using the /businessservice/_create. Following is the product configuration for PQM:

```postman_json
{
    "RequestInfo": {
        "apiId": "Rainmaker",
        "action": "",
        "did": 1,
        "key": "",
        "msgId": "20170310130900|en_IN",
        "requesterId": "",
        "ts": 1513579888683,
        "ver": ".01",
        "authToken": "71fc8bf6-4c3f-4bb3-af74-bc2fabf6252e",
        "userInfo": {{adduserInfo}}
    },
    "BusinessServices": [
        {
            "tenantId": "pg",
            "businessService": "PQM",
            "business": "pqm",
            "businessServiceSla": 432000000,
            "states": [
                {
                    "sla": null,
                    "state": null,
                    "applicationStatus": null,
                    "docUploadRequired": true,
                    "isStartState": true,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "action": "SCHEDULE",
                            "nextState": "SCHEDULED",
                            "roles": [
                                "PQM_ADMIN",
                                "PQM_TP_OPERATOR"

                            ]
                        }
                    ]
                },
                {
                    "sla": null,
                    "state": "SCHEDULED",
                    "applicationStatus": "SCHEDULED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": true,
                    "actions": [
                        {
                            "action": "SUBMIT_SAMPLE",
                            "nextState": "PENDINGRESULTS",
                            "roles": [
                              "PQM_ADMIN",
                                "PQM_TP_OPERATOR"
                            ]
                        }
                    ]
                },
                {
                    "sla": null,
                    "state": "PENDINGRESULTS",
                    "applicationStatus": "PENDINGRESULTS",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": false,
                    "isStateUpdatable": false,
                    "actions": [
                        {
                            "action": "UPDATE_RESULT",
                            "nextState": "SUBMITTED",
                            "roles": [
                                "PQM_ADMIN",
                                "PQM_TP_OPERATOR"
                            ]
                        }
                    ]
                },
                {
                    "sla": null,
                    "state": "SUBMITTED",
                    "applicationStatus": "SUBMITTED",
                    "docUploadRequired": false,
                    "isStartState": false,
                    "isTerminateState": true,
                    "isStateUpdatable": false,
                    "actions": null
                }
            ]
        }
    ]
}
```

Postman-Collection

Postman-Collection

PQM - Api collection

Plant User Mapping - Api collection

API Specification

PQM Swagger Link

Data Model

Sequence Diagrams

Create New

Update - new

Search

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.

Change request #103: Taniya's Nov 8 changes