Only this pageAll pages
Powered by GitBook
1 of 39

Workbench 1.0

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Understanding Workbench

Loading...

Loading...

Specifications

Loading...

Loading...

Platform

Loading...

Loading...

Loading...

Setup

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Community

Test cases

Workbench UI & API Test Cases

Release Notes

Workbench V1.0 Release Summary

Release Summary

DIGIT-Workbench release v1.0 is a new release with distinctive features and functions, details of which are provided below.

Functional changes

  • Added new MDMS v2 API which provides the Create, Update, and Search APIs to manage master data.

  • Added ability to perform Master Data CRUD operations from Workbench UI.

  • Added ability to perform Localisation Data CRUD operations from Workbench UI.

Non-functional changes

  • NA

New ‌Feature Additions

Feature
Details

Document Resources and Links

Technical Documents
Service Documents

Introducing DIGIT Workbench

DIGIT Workbench solution design allows system engineers to configure master data through an intuitive user-friendly interface. The solution facilitates “Self-serve code-free setup of DIGIT applications on the cloud”. It streamlines the configuration process making it easier and faster for deployment of applications on the DIGIT platform minus the hassle of coding.

With increasing implementations, the solution simplifies the setup process with intuitive screens for master data inputs. Workbench resolves the challenges of costly and time-consuming engineering capacity to implement and configure master data for products built on the DIGIT platform before going live. This helps reduce the reliance on resources equipped with high-end technical expertise on the DIGIT platform.

Problems

Workbench eliminates the need for coding to add and manage master data in the DIGIT applications.

MDMS v2

Manage master data through API's

MDMS v2

MDMS Tech Documentation

​High Level Design​

​Low Level Design​

Objectives

Enable senior implementation engineer with experience in DIGIT platforms to add and manage master and localisation data through an intuitive user interface.

Section Overview

Navigation Tips

  • Click on the embedded links within the content to browse topic details.

  • Use the Contents links available on the right side of the screen to move to a specific heading.

  • Find the list of Related Docs links at the bottom of each page to browse through additional product details.

Contact Us

Read more..

MDMS Configurations

Workbench Architecture

Configure Workbench

Release Notes

Manage Localisation Data

We have the following flows in Manage Localization Data

  1. Search Localizations

  2. Edit Localizations

Workbench UI

Figma screens for the UI are available . Refer to them to understand the Workbench UI.

here
  • Add and Bulk upload

  • Role required to manage localizations

    "LOC_ADMIN"

    Sample JSON:

    {
       "name": "Localisation admin",
       "code": "LOC_ADMIN",
       "tenantId": "pb"
    }

    Service Build Updates

    Category
    Services
    Docker Artefact ID
    Remarks

    Workbench-UI v1.0

    workbench-ui

    workbench-ui:v1.0.0-2d178330ff-94

    Core UI

    core-ui

    core-ui:v1.0.0-2d178330ff-35

    Release Chart

    Configurations

    Services

    Architecture

    MDMS-v2 v1.0

    mdms-v2

    mdms-v2-db:mdms-v2-ref-fix-4109a6d265-21

    Core Services v2.9

    Signed Audit

    audit-service:v1.0.0-24873ba-3

    Encryption

    egov-enc-service:v1.1.4-1f3649156d-5

    Filestore

    egov-filestore:v1.2.4-9934605-2

    Zuul - API Gateway

    zuul:v1.3.1-76bf31f-2

    Mail Notification

    egov-notification-mail:v1.2.0-9fde481c92-1

    SMS Notification

    egov-notification-sms:v1.2.0-9fde481c92-2

    Localization

    egov-localization:v1.1.3-44558a0602-2

    Persist

    egov-persister:v1.1.6-1f3649156d-3

    ID Gen

    egov-idgen:v1.2.3-44558a0602-2

    User

    egov-user:v1.2.8-9fde481c92-2

    MDMS

    egov-mdms-service:v1.3.3-1f3649156d-4

    URL Shortening

    egov-url-shortening:v1.1.2-010cd85ad6-3

    Indexer

    egov-indexer:v1.1.8-1f3649156d-9

    Workflow

    egov-workflow-v2:v1.3.1-1f3649156d-5

    Access Control

    egov-accesscontrol:v1.1.3-852f5ea3a0-3

    Location

    egov-location:v1.1.5-fbea79700d-1

    OTP

    egov-otp:v1.2.3-9fde481c92-1

    User OTP

    user-otp:v1.2.1-1f3649156d-2

    MDMS v1.0

    https://github.com/egovernments/egov-mdms-data/commit/f4a0799fd9b25ad6249c8c7ef358d85ab9038c02

    MDMS changes is linked

    Config v1.0

    https://github.com/egovernments/configs/commit/ece5fe3ad9aa221e579ba51e34858e279eb9fe29

    Config changes is linked

    New Schema Configuration

    Approach

    Design Approach

    The Workbench design introduces dynamically generated user interface screens for system users to perform key implementation tasks that typically require software code to be written by engineers.

    Generic Concept of Workbench v1

    The Master Data Management Service contains the standardised schemas defining the structure of data models to be used by the applications. The schemas ensure that master data management conforms to a unified data model offering consistent formats for data input.

    Based on the defined schemas, dynamic forms are generated in the user interface. The forms contain embedded validation rules for data input ensuring data complies with the required formats. Once the data is validated and the entry is complete, the forms are pushed to the corresponding API endpoints. The master data is saved in the backend database.

    Pre-requisites & Constraints

    1. Individual master data management services are available and contain JSON schemas that define the structure of the data model.

    2. The UI library for v1 is built based on the current master data structure for Health Campaign Management. Hence, the components available in this version will only address the master data types included in HCM masters.

    Scope

    The illustration below offers a glimpse into the features presently in the scope of the Workbench solution design. Follow the colour legend at the bottom of the visual for details of the design elements.

    In Scope
    Out Of Scope

    Master Data Management Process Flow

    Detailed Solution

    Context

    This page offers details on role mapping, including role permissions and the process flow related to master data management.

    Role Mapping

    Role
    Scope

    Process Flow

    Key Features

    Configurations

    MDMS & Configuration Updates

    MDMS Changes

    Features
    Services Names
    Changes
    Descriptions

    View Master Data

    Flow for viewing master data

    Overview

    From the search master data screen users can click on any of the rows in the results table, this will redirect the UI to the View master data screen.

    Low Level Design

    Rendering View Master Data Screen Logic
    • Before loading the View screen, we fetch the schema and the data using the schema code and unique Identifier respectively. Curls for search schema and search data can be referred from the Add Master Data page.

    • Schema response is used to render the form, similar to add form, and the data response is used to prefill the values in the form. The only difference here is that all the fields are disabled, unlike the add screen.

    • The same role action mapping rules apply here as defined in the Add Master Data page.

    • In the View screen, we have an action button with two options

      1. Edit Master Data

      2. Disable Master Data

    • The above actions are covered in the Update Master Data page.

    Services

    Workbench UI

    DevOps
    Master Data Management Services
    1. Tenant management through UI Edit Tenant Data

    2. UI for masters managed by MDMS service Dynamically rendered Add, Search, View and Update master data pages

    3. UI components for fields to “Add” master data

    4. Link to Other master-data Services(Employees, localization, boundary, projects etc)

    5. Master specific fields for search and view all pages

    1. Tenant Master tenant creation Child tenant creation

    2. Generate localization key and add to localization service while “Adding” data

    3. Link to add localization data while adding new master data

    4. Custom UI for a master

    5. Upload files

    6. Add master data in bulk

    MDMS Service details

    , , , , , , , , , , , , , , ,

    Roleaction mapping for Add Master Data

    MDMS

    ,

    Enabled the Workbench UI module

    MDMS

    Roleactions for update profile

    MDMS

    ,

    added home button access

    Localisation

    Updated Localisation admin

    Localisation

    Update role action for upserting localizaions

    Config Changes

    Features
    Services Names
    Changes
    Descriptions

    MDMS

    ,

    Adding mapping to mdms persister

    DevOps Changes

    Features
    Services Names
    Changes
    Descriptions

    MDMS

    Adding persister file path

    MDMS

    workbench-ui

    Localisation Changes

    Features
    Services Names
    Changes
    Descriptions

    Localisation

    MDMS

    MDMS_ADMIN

    1. Can add, search, view and update all master data

    2. Created at the time of installation along with the creation of tenant

    Manage Tenant

    • Can only update tenant info

    Manage Master Data through the MDMS service

    • Select master

    • Common flow to add, search, view, update and disable master data

      1. Add

      2. Search

    Manage master data through other services

    • The list will be populated based on services that have action mapped to workbench_superadmin

    • For master data that has custom APIs, redirect to the respective links/pages. Eg :

      • Users

    FAQ :: Add localisation if screens are not localised.

    Bulk Upload

    If you are visiting the screen and it is not localized, the screen will appear as in the screenshot below.

    • You can localize it with these simple steps:

    • We have an option to upload Excel sheets (XLSX, XLS) and upsert bulk messages.

    • From the "Add Localization" screen, there is an option to Bulk upload. See the image below.

    Edit Localization Messages

    Editing localizations

    • From the Search screen itself user can update localization messages

    • Only message text can be edited, we are not allowed to change locale, module and code of the message.

    High Level Design

    MDMS v2 Specifications -

    Manage Master Data

    Overview

    The Manage Master Data screen allows users to manage master data. Navigate to the Manage Master Data from the home screen card.

    Manage Master Data - User Role

    View

  • Update

  • Disable

  • Add master data form rendered based on the schema of each master(property type, validations etc)

  • Search page

    • Search fields

    • Search results

  • Validations are also based on the info coming as part of the schema itself

  • Localization

  • Boundary (when the APIs are made available)

  • Project & related masters

  • 3148
    3149
    3150
    3151
    3152
    3153
    3154
    3161
    3162
    3164
    3166
    3167
    3172
    3173
    3185
    3199
    3160
    3201
    3177
    3179
    3181
    3193
    3202
    2701
    2707
    1827
    1867
    https://github.com/egovernments/releasekit/commit/5a43a48cb34935f1ae2fde50f002ef571f21dc2e
  • MDMS_ADMIN

    • For the provided role, it is necessary to include all role action mappings associated with master data in MDMS.

       {
         "name": "MDMS_ADMIN",
         "code": "MDMS_ADMIN",
         "tenantId": "pg"
      }
    • Upon clicking the bulk upload option, the user can select an Excel file from the file system.

    • Copy all the locale code and give the corresponding message to display, module, and locale.

    • Paste this data into an Excel spreadsheet and save it as an XLSX file.

    • See the screenshot provided for reference for excel file.

    Conditions for valid excel file

    Excel file can contain multiple sheets, every sheet must have these four columns:

    1. code

    2. message

    3. locale

    4. module

    • Upload this XLSX file to the project UI.

    • After uploading, log out and log back in to see the UI localized.

    Now see the UI, it will be as given below:

  • There is a fixed action column in the results table.

  • Upon clicking the edit icon a modal is opened from where user can add the updated message

  • User can click on the submit button, a respective toast is shown and the search results are refetched and rendered with the updated message.

  • API used here is same as add localization.

    • Select the edit icon in the action column, update the text as needed, and then click submit to save your changes.

    Bulk Edit Localizations

    For updating multiple localization messages at once, you can use the Bulk Upload feature available in the Add Localization screen.

    To perform bulk edits:

    1. Navigate to the Add Localization screen

    2. Click the "Bulk Upload" button

    3. Select the module you want to edit

    4. Download the template - This contains all existing localizations

    5. Edit the messages in the Excel file as needed

    6. Upload the modified file back to the system

    Since the API uses an _upsert operation, existing records will be updated automatically when you upload the file with modified messages.

    For detailed instructions on bulk upload, refer to:

    Workbench Concept Note

    Background

    Implementing products built on the DIGIT platform requires engineering capacity to set up the system and configure master data before going live. The increasing demand for implementations of DIGIT applications triggered the need for low-cost and high-velocity solutions to manage these implementations.

    Implementation Process Overview

    Implementation refers to the process of deploying applications built on the DIGIT platform in a new business context or geographical location. The deployment steps include system setup, master data configuration and customisation. The implementation process ensures the application workflows are tailored fit to meet the requirements of the local or regional policies for smooth functioning.

    Examples of DIGIT implementations -

    Problems

    The current implementation process for DIGIT applications faces two primary challenges.

    1. Skilled personnel - The implementation requires experienced engineers who are familiar with the DIGIT platform. This proves both expensive while limiting the number of implementations that can be handled at a time.

    2. Cost and time constraints - Since the number of experienced engineers is limited, it poses limitations on the number of implementations that can be handled simultaneously. The result is longer timeframes for going live and increased costs.

    Objective

    Enable a non-tech/low-tech user to set up one or more DIGIT applications on a fully managed cloud infra with the ability to customise the application, features and registries to their context, all through an intuitive UI without writing a single line of code.

    Solution

    The Workbench solution is designed to meet the rising demand for low-cost, rapid implementations of DIGIT products. It simplifies the setup process by enabling senior engineers familiar with DIGIT to manage and configure master data through a user-friendly interface easily. The Workbench addresses the requirements of high demand for implementations in regions with limited DIGIT expertise and tight go-live timelines. The goal is to streamline the process and allow quicker, code-free deployments.

    The Workbench user interface enables users to set up a new account with DIGIT services. It provides system users with a dynamically generated UI to perform key implementation tasks that typically require software code to be written by engineers.

    End-state flow:

    Key Components / Abilities

    1. Generate forms (UI) based on schema and push data entered in the forms to corresponding API endpoints

    2. Open to access for all services

    3. UI to add/remove fields from the registries

    4. UI to update forms

    Pre-requisites

    1. Standardized JSONSchema for services

    2. UI-Schema Library

    3. UI-templates for forms

    4. Codified rules for updating registry structure

    Maturity Model

    The table below outlines the distinctive phase of development of the Workbench solution.

    Version
    Phase 1
    Phase 2
    Phase 3

    DevOps Configuration

    Overview

    This page provides details about the Workbench UI configuration required to enable it in any environment.

    DevOps Configuration

    In the DevOps repository of your organization, locate the following "deploy-as-code/helm/environments/unified-dev.yaml". Inside the environment YAML file used to deploy the Core platform, please add the following block of code:

    A dev environment sample file is linked . Note that you will have to modify this for your deployment.

    Global Configuration

    This section contains a config that applies globally to all UI modules. These need to be configured before configuring the service-specific UI.

    Steps to create a globalconfig.js file:

    1. Create a config file (globalconfigs.js) with the below-mentioned configurations (refer code below).

    2. Configure all the images/logos required in the S3 and add links as footerBWLogoURL, footerLogoURL.

    3. Mention the state tenant ID as stateTenantId.

    4. If any user roles have to be made invalid add as invalidEmployeeRoles.

    Localisation Configuration

    All strings localised per module are provided in this . To translate the UI into other languages, please follow this sheet and provide appropriate translations in your language.

    Reference Links

    Figma screens for the UI are . Refer to them to understand the Workbench UI.

    Workbench API Testcases

    Then push this global config file into your S3 bucket as globalconfigs.js.

  • Mention the globalConfigs file URL in your Environment config .

  • here
    sheet linked here
    here
    
    workbench-ui:
      custom-js-injection: |
        sub_filter.conf: "
          sub_filter  '<head>' '<head>
          <script src={{INSERT_YOUR_AWS_BUCKET_NAME}}/globalConfigs.js type=text/javascript></script>';"
    var globalConfigs = (function () {
      var stateTenantId = 'pg' // statetenantId
       var gmaps_api_key = '<<INSERT_GMAP_GENERATED_TOKEN>>';
       var contextPath = 'workbench-ui'; 
       var configModuleName = 'commonMuktaUiConfig'; 
       var centralInstanceEnabled = false;
       var footerBWLogoURL = '{{INSERT_YOUR_AWS_BUCKET_NAME}}/digit-footer-bw.png';
       var footerLogoURL = '{{INSERT_YOUR_AWS_BUCKET_NAME}}/digit-footer.png';
       var digitHomeURL = 'https://www.digit.org/';
       var xstateWebchatServices = 'wss://dev.digit.org/xstate-webchat/';
       var assetS3Bucket = '{{INSERT_YOUR_AWS_BUCKET_NAME}}';
       var invalidEmployeeRoles = ["CBO_ADMIN","STADMIN","ORG_ADMIN","ORG_STAFF","SYSTEM"] 
    
     
       var getConfig = function (key) {
         if (key === 'STATE_LEVEL_TENANT_ID') {
           return stateTenantId;
         }
         else if (key === 'GMAPS_API_KEY') {
           return gmaps_api_key;
         }
         else if (key === 'ENABLE_SINGLEINSTANCE') {
           return centralInstanceEnabled;
         } else if (key === 'DIGIT_FOOTER_BW') {
           return footerBWLogoURL;
         } else if (key === 'DIGIT_FOOTER') {
           return footerLogoURL;
         } else if (key === 'DIGIT_HOME_URL') {
           return digitHomeURL;
         } else if (key === 'xstate-webchat-services') {
           return xstateWebchatServices;
         } else if (key === 'S3BUCKET') {
           return assetS3Bucket;
         } else if (key === 'CONTEXT_PATH'){
    	return contextPath;
         } else if (key === 'UICONFIG_MODULENAME'){
    	return configModuleName;
         } else if (key === 'INVALIDROLES'){
    	return invalidEmployeeRoles;
         }
       };
     
     
       return {
         getConfig
       };
     }());

    Spin up a DIGIT service from a web portal

    UI to initiate “primary-tenant”

  • Deploy selected services

  • UI to trigger the installer

  • Master-tenant creation and management

  • Delineation of tenants

  • v3

    Trained non-egov BA

    Modify application* - add/remove fields to forms

    UI to manage master data and system data

    UI to customize forms (limited)

    UI based installation and setup

    v1

    Senior engineer - eGov Solution Engineering Team

    Add and manage master and system data for HCM

    Feasibility & Effort - TBD

    v2

    Drawing
    Bednet campaign on the Health Campaign Management platform in Mozambique
    Malaria vaccine on the Health Campaign Management platform in Liberia
    FSM on Sanitation platform in Indonesia

    HCM Solutioning Team

    v1 + create new tenants for HCM ; customize UI for each master data with UI schema

    Add Master Data

    Flow for adding master data from UI

    Overview

    Add Master Data Flow

    • An action button is available on the search master data screen to add master data.

    • Clicking on the action button redirects users to the add master data screen.

    • The Add Master Data screen renders a form through which the user can enter master data.

    • Once the form is submitted, the validations are run as specified in the schema. If the validations are passed, the Create API is called and the respective toast message is shown as relevant to the response received from the Create API.

    Role Action Mapping To Access Create API

    • As of now, role actions have to be defined for every schema. Let us take an example of a schema code "Trade.Details"

    • The Create API URL for the above schema will look like this "/mdms-v2/v2/_create/Trade.Details"

    • Hence for this URL, the role action mapping has to be added to the MDMS_ADMIN role.

    • Similarly, for other masters, add role action mapping to the same role "MDMS_ADMIN".

    Create Master Data API

    Refer to the curl below:

    Sample request body:

    FAQ :: On Localisation Screens

    How to Add a New Language

    To add a new localisation entry, follow these steps:

    1. Go to the Localisation Add Screen:

      • Navigate to the screen designated for adding localisation entries.

    2. Input Language and Module Name:

      • In the appropriate fields, enter the desired language and module name.

    3. Enter Keycode and Message:

      • Provide the keycode and message value in their respective fields. For example:

        • Keycode: TEST

    See the Image Below:

    1. Save the Data:

    • Once you have entered the keycode and message, click on the "Save" button to save the data.

    1. Verify the Entry:

    • Navigate to the Localization Search screen to verify the entry you just added. You should see the keycode TEST with the message TEST.

    • See the Image given below:

    By following these steps, you can successfully add and verify new localization entries in the system.

    How to Add a New Module

    Adding a New Module

    To add a new module, follow these steps:

    1. Navigate to Manage Master Data

    Search Localisation Data

    Overview

    This page provides the steps to search localisation data.

    Steps

    Navigate to the Manage Localisation screen from the home screen card. This opens the search localisation screen.

    The following parameters are available for searching localizations

    1. locale -> this field is mandatory. This dropdown is populated based on this mdms

    2. module -> list of modules present in this mdms

    3. keycode -> code of a specific message. It is a string-type parameter

    Search Results

    We have the following columns for localisation search results:

    1. Module name

    2. Key code

    3. Default value -> message stored in default locale

    4. Text -> message stored

    A note on the default value in the results

    While adding localisations, by default all the messages will be updated in the locale mentioned by the user as well as in the "default" locale. The message updated in this locale is considered the default message. While updating the message default locale message remains unchanged.

    Search API For Localisations

    Localisation search API is an open API. Refer to the curl given below:

    • Search for the desired language and module using the provided search functionality. The language and module are derived from MDMSv2.

    • For example, if you are searching for the language ‘English’ and the module ‘rainmaker-common’, Once you perform the search, all relevant results will be displayed below.

    Refer to the screenshot below:

    Adding a new Localisation Message

    To add a new language, provide a locale name and a keycode, then click ‘Add’ to include it in the system.

    Search Master Data

    How to search master data

    Overview

    Search Master Data Flow

    Action -> Edit action to update message in that particular localisation

    https://github.com/egovernments/egov-mdms-data/blob/UNIFIED-UAT/data/pg/common-masters/StateInfo.json
    https://github.com/egovernments/egov-mdms-data/blob/UNIFIED-DEV/data/pg/common-masters/StateInfo.json
  • Users can click on the specific master name from the dropdown on the Manage Master Data screen to select the master data.

  • Users are redirected to the Search Master Data screen (of the selected master) screen as soon as a master is selected.

  • By default, the data present in that master is shown in the Results table.

  • Users can search master data using the following input parameters -

    1. Field

    2. Value

    3. is Active

  • Note -> Search with field and value is considered as one parameter. Make sure to enter both in order to search master data.

    • 'isActive' is a Boolean parameter which results in either active or inactive master data. All master data contain this field by default.

    • For the time being, master data search is allowed with string fields and the isActive flag.

    • Search results are filtered by string type and isActive before getting rendered in the table.

    Search Schemas API

    The master and module dropdowns on the manage master screen are populated on the basis of the responses from the schema search. Refer to the below curl for details:

    Use the below parameters to search for the schemas -

    1. tenantId

    2. limit

    3. offset

    4. codes -> list of schema codes

    Search Master Data For Specific Schema API

    Users are redirected to the search master data screen once a specific master is selected from the manage master data screen.

    Refer to the below API curl to search for the master data -

    The parameters here are used to search for the master data. Refer to the request body object below.

    The "data" object holds the field-value pairs used to search for master data within a specific master. The "uniqueIdentifier" is a backend-generated ID for each master data.

    curl 'http://localhost:3000/mdms-v2/v2/_create/Trade.Validations' \
      -H 'Accept: application/json, text/plain, */*' \
      -H 'Accept-Language: en-US,en;q=0.9' \
      -H 'Connection: keep-alive' \
      -H 'Content-Type: application/json;charset=UTF-8' \
      -H 'Origin: http://localhost:3000' \
      -H 'Referer: http://localhost:3000/workbench-ui/employee/workbench/mdms-add-v2?moduleName=Trade&masterName=Validations' \
      -H 'Sec-Fetch-Dest: empty' \
      -H 'Sec-Fetch-Mode: cors' \
      -H 'Sec-Fetch-Site: same-origin' \
      -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' \
      -H 'sec-ch-ua: "Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"' \
      -H 'sec-ch-ua-mobile: ?0' \
      -H 'sec-ch-ua-platform: "Windows"' \
      --data-raw '{"Mdms":{"tenantId":"pb","schemaCode":"Trade.Validations","uniqueIdentifier":null,"data":{"name":"sfd","dropdownField":"90-100"},"isActive":true},"RequestInfo":{"apiId":"Rainmaker","authToken":"5bbfa93c-adc2-42b2-992e-a708a83cb2cf","userInfo":{"id":80234,"uuid":"aeb85b37-c996-4218-bdca-1b00cc268f2f","userName":"WBQA","name":"LOC","mobileNumber":"9999991942","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"MDMS ADMIN","code":"MDMS_ADMIN","tenantId":"pb"},{"name":"Super User","code":"SUPERUSER","tenantId":"pb"},{"name":"Localisation admin","code":"LOC_ADMIN","tenantId":"pb"},{"name":"Employee","code":"EMPLOYEE","tenantId":"pb"}],"active":true,"tenantId":"pb","permanentCity":null},"msgId":"1694161641687|en_IN","plainAccessRequest":{}}}' \
      --compressed
    {
        "Mdms": {
            "tenantId": "pb",
            "schemaCode": "Trade.Validations",
            "uniqueIdentifier": null,
            "data": {
                "name": "sfd",
                "dropdownField": "90-100"
            },
            "isActive": true
        },
        "RequestInfo": {
            "apiId": "Rainmaker",
            "authToken": "5bbfa93c-adc2-42b2-992e-a708a83cb2cf",
            "userInfo": {
                "id": 80234,
                "uuid": "aeb85b37-c996-4218-bdca-1b00cc268f2f",
                "userName": "WBQA",
                "name": "LOC",
                "mobileNumber": "9999991942",
                "emailId": null,
                "locale": null,
                "type": "EMPLOYEE",
                "roles": [
                    {
                        "name": "MDMS ADMIN",
                        "code": "MDMS_ADMIN",
                        "tenantId": "pb"
                    },
                    {
                        "name": "Super User",
                        "code": "SUPERUSER",
                        "tenantId": "pb"
                    },
                    {
                        "name": "Localisation admin",
                        "code": "LOC_ADMIN",
                        "tenantId": "pb"
                    },
                    {
                        "name": "Employee",
                        "code": "EMPLOYEE",
                        "tenantId": "pb"
                    }
                ],
                "active": true,
                "tenantId": "pb",
                "permanentCity": null
            },
            "msgId": "1694161641687|en_IN",
            "plainAccessRequest": {}
        }
    }
    curl --location 'https://qa.digit.org/localization/messages/v1/_search?locale=en_IN&tenantId=pb' \
    --header 'Content-Type: application/json' \
    --data '{
         "RequestInfo": {
           "apiId" : "emp",
           "ver" : "1.0",
           "ts" : "10-03-2017 00:00:00",
           "action" : "create",
           "did" : "1",
           "key" : "abcdkey",
           "msgId" : "20170310130900",
           "requesterId" : "rajesh",
           "authToken" : "{{authToken}}",
           "userInfo" : {
             "id" : 1
           }
       }
    }'
    curl --location 'http://localhost:8094/mdms-v2/schema/v1/_search' \
    --header 'Content-Type: application/json' \
    --data '{
        "RequestInfo": {
            "apiId": "asset-services",
            "ver": null,
            "ts": null,
            "action": null,
            "did": null,
            "key": null,
            "msgId": "search with from and to values",
            "authToken": "dfcca143-b5a6-4726-b5cd-c2c949cb0f2b",
            "correlationId": null,
            "userInfo": {
                "id": "1",
                "userName": null,
                "name": null,
                "type": null,
                "mobileNumber": null,
                "emailId": null,
                "roles": null
            }
        },
        "SchemaDefCriteria": {
            "tenantId": "pb",
            "codes": [
                "Trade.Fields"
            ],
            "limit":50
        }
    }'
    curl --location 'http://localhost:8094/mdms-v2/v2/_create/common-masters.Sample' \
    --header 'Content-Type: application/json' \
    --data '{
      "RequestInfo": {
        "apiId": "asset-services",
        "ver": null,
        "ts": null,
        "action": null,
        "did": null,
        "key": null,
        "msgId": "search with from and to values",
        "authToken": "dfcca143-b5a6-4726-b5cd-c2c949cb0f2b",
        "correlationId": null,
        "userInfo": {
          "id": "1",
          "userName": null,
          "name": null,
          "type": null,
          "mobileNumber": null,
          "emailId": null,
          "roles": null
        }
      },
      "Mdms": {
        "tenantId": "pg",
        "schemaCode": "common-masters.Sample",
        "uniqueIdentifier": "aa4d8d08-658b-45c1-af4d-d57428fa5e52",
        "data": {
                    "id": "sdfljksd",
                    "code": "testtcode",
                    "name": "nameeee",
                    "description": "descccc"
                },
        "isActive": true
      }
    }'
    
     {
        "tenantId": "pg",
        "schemaCode": "common-masters.Sample",
        "uniqueIdentifier": "aa4d8d08-658b-45c1-af4d-d57428fa5e52",
        "data": {
                    "id": "sdfljksd",
                    "code": "testtcode",
                    "name": "nameeee",
                    "description": "descccc"
                },
        "isActive": true
      }
    
    Message
    :
    TEST
    :
    • Go to the "Manage Master Data" section of the application.

  • Provide Module and Master Name:

    • Enter the module name and master name. For example, you might use:

      • Module Name: Common Masters

      • Master Name: State Info

  • View the Master Data:

    • View the master data as shown in the image provided below.

    1. Add Localization Modules:

      • Choose "Add Localization Modules" from the options.

      • Enter the label and value for the localization. For example:

    2. Update the Master Data:

      • Click on "Update" to save the changes.

    By following these steps, you can successfully add a new module and update its localization details.

    Create New Master

    Steps to follow to create a new Master -

    1. Create a schema using Postman (API) - Schema( JSON draft-07 ) can be constructed by inputting the required JSON Object here Below is the sample cURL to create a schema.

    1. Add actions-test and roleactions for search, create, and update. Below is the sample code for the actions-test for the schema mentioned above::

    {
          "id": 2486,
          "name": "MDMS",
          "url": "url",
          "displayName": "Roleactions",
          "orderNumber": 1,
          "parentModule": "",
          "enabled": true,
          "serviceCode": "MDMS",
          "code": "null",
          "navigationURL": "/workbench-ui/employee/workbench/mdms-search-v2?moduleName=ACCESSCONTROL-ROLEACTIONS&masterName=roleactions",
          "path": "9MDMS.ACCESSCONTROL-ROLEACTIONSroleactions",
          "leftIcon": "dynamic:ContractIcon"
        },
        {
          "id": 2487,
          "name": "MDMS",
          "url":"/mdms-v2/v2/_create/ACCESSCONTROL-ROLEACTIONS.roleactions",
          "displayName": "Create ACCESSCONTROL-ROLEACTIONS roleactions",
          "orderNumber": 1,
          "parentModule": "",
          "enabled": true,
          "serviceCode": "MDMS",
          "code": "null",
          "path": ""
        },{
          "id": 2488,
          "name": "MDMS",
          "url":"/mdms-v2/v2/_update/ACCESSCONTROL-ROLEACTIONS.roleactions",
          "displayName": "Update ACCESSCONTROL-ROLEACTIONS roleactions",
          "orderNumber": 1,
          "parentModule": "",
          "enabled": true,
          "serviceCode": "MDMS",
          "code": "null",
          "path": ""
        } 

    Here is the sample code for the roleactions::

    1. Push the localization messages using the rainmaker-schema module to the schema's name(on the Add Master Data page and sidebar), tooltips, and all the fields on the UI. Example::

    Adopt New MDMS - Steps

    Overview

    This guide details the steps to promote a master to MDMS v2. It includes defining a schema with a unique identifier, creating the schema via an API endpoint, and verifying the created schema. Once verified, data can be added and searched using corresponding API endpoints.

    Steps

    1. Define a schema for the master that you want to promote to MDMS v2.

    2. Ensure that the schema has a unique field (a unique field can also be composite) which enforces the data being added against that schema to be unique.

    3. If the data does not have the scope for having unique identifiers. For example - complex masters like - - consider adding a redundant field which can serve as the unique identifier.

    4. Hit the following API endpoint to create schema in the system -

    Contact Us - eGov FoundationeGov Foundation
    DIGIT-DevOps/deploy-as-code/helm/product-release-charts/DIGIT/dependency_chart-digit-workbench-v1.0.yaml at workbench · egovernments/DIGIT-DevOpsGitHub

    Update Master Data

    Flow for updating master data from UI

    The users have two options on the View Master Data screen -

    1. Disable/Enable Master Data

    2. Edit Master Data

    curl --location --request POST 'https://qa.digit.org/mdms-v2/schema/v1/_create' \
    --header 'Content-Type: application/json' \
    --data-raw '{
        "RequestInfo": {
            "apiId": "asset-services",
            "ver": null,
            "ts": null,
            "action": null,
            "did": null,
            "key": null,
            "msgId": "search with from and to values",
            "authToken": "b2250d2c-3c25-40c9-960d-c4dda7443d44",
            "correlationId": null,
            "userInfo": {
                "id": "1",
                "userName": null,
                "name": null,
                "type": null,
                "mobileNumber": null,
                "emailId": null,
                "roles": null
            }
        },
        "SchemaDefinition": {
            "id": "b55f449c-61bb-4c56-b8cd-99cbdb00ee7f",
            "tenantId": "pb",  // update the state tenant id as per environment
            "code": "ACCESSCONTROL-ROLEACTIONS.roleactions",
            "description": "roleactions",
            "definition": {
                "type": "object",
                "title": "Generated schema for Root",
                "$schema": "http://json-schema.org/draft-07/schema#",
                "isActive": true,
                "properties": {
                    "rolecode": {
                        "type": "string"
                    },
                    "actionid": {
                        "type": "string"
                    },
                    "actioncode": {
                        "type": "string"
                    },
                    "tenantId": {
                        "type": "string"
                    }
                },
                "required": [
                    "rolecode",
                    "actionid"
                ],
                "x-unique": [
                    "rolecode",
                    "actionid"
                ],
                "x-ref-schema": [
                    {
                        "fieldPath": "rolecode",
                        "schemaCode": "ACCESSCONTROL-ROLES.roles"
                    },
                    {
                        "fieldPath": "actionid",
                        "schemaCode": "ACCESSCONTROL-ACTIONS-TEST.actions-test"
                    }
                ]
            },
            "isActive": true,
            "auditDetails": {
                "createdBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                "lastModifiedBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                "createdTime": 1693284323630,
                "lastModifiedTime": 1693284323630
            }
        }
    }'
    {
          "rolecode": "MDMS_ADMIN",
          "actionid": 2486,
          "actioncode": "",
          "tenantId": "pb"
        },
        {
          "rolecode": "MDMS_ADMIN",
          "actionid": 2487,
          "actioncode": "",
          "tenantId": "pb"
        },
        {
          "rolecode": "MDMS_ADMIN",
          "actionid": 2488,
          "actioncode": "",
          "tenantId": "pb"
        }
    /mdms-v2/schema/v1/_create
  • Now that the schema has been created, verify the created schema by searching for it using the following API endpoint - /mdms-v2/schema/v1/_search

  • Once the schema is in place, data can be created against the created schema using the following API endpoint - /mdms-v2/v2/_create/{schemaCode}

  • Once the data is created, data can be verified by searching it by using the following API endpoint - /mdms-v2/v2/_search

  • https://github.com/egovernments/health-campaign-mdms/blob/QA/data/default/health/project-task-configuration.json
    {
       "code": "SCHEMA_ACCESSCONTROL_ROLEACTIONS_ROLEACTIONS",
       "message": "Role Action",
       "module": "rainmaker-schema",
       "locale": "en_IN"
    },
    {
       "code": "ACCESSCONTROL_ROLEACTIONS_ROLEACTIONS_TENANTID",
       "message": "Tenant Id",
       "module": "rainmaker-schema",
       "locale": "en_IN"
    },
    {
       "code": "TIP_ACCESSCONTROL_ROLEACTIONS_ROLEACTIONS_TENANTID",
       "message": "Tenant Id",
       "module": "rainmaker-schema",
       "locale": "en_IN"
    }
    Disable/Enable Master Data
    • This option is dynamic, if the master data is currently disabled(computed through the "isActive" flag present in every master data) Enable option is shown and vice-versa.

    • Update Master data API is called with the updated value of "isActive" flag and a respective toast message is shown to the user

    • As soon as the API responds, this option is updated according to the new value of "isActive" flag.

    • Pls refer to the end of this page for updated API details

    Edit Master Data

    • When the user clicks on this option, the screen redirects to the Edit master data screen.

    • This screen is similar to the add master data screen, but all the fields are pre-populated with previous data.

    • Users can make changes to the master data.

    • Once the user clicks on the Submit button, validations are run in UI (specified in schema). If the validations are passed update master data API is called and a toast message is shown. After 5 seconds the user is automatically redirected to the view screen, where the updated data is reflected.

    • If the validations fail, the respective error message is shown below the target field for which validations failed.

    • The same role action mapping rules apply here as mentioned in the Add Master data page.

    Update Master Data API

    Refer to the curl below to update the master data API. It is very similar to the Create Master Data. (Notice the URL is unique to the schema for which the master data belongs, similar to add).

    Sample request body for update:

    curl 'http://localhost:3000/mdms-v2/v2/_update/Trade.Validations' \
      -H 'Accept: application/json, text/plain, */*' \
      -H 'Accept-Language: en-US,en;q=0.9' \
      -H 'Connection: keep-alive' \
      -H 'Content-Type: application/json;charset=UTF-8' \
      -H 'Origin: http://localhost:3000' \
      -H 'Referer: http://localhost:3000/workbench-ui/employee/workbench/mdms-edit?moduleName=Trade&masterName=Validations&uniqueIdentifier=sfd' \
      -H 'Sec-Fetch-Dest: empty' \
      -H 'Sec-Fetch-Mode: cors' \
      -H 'Sec-Fetch-Site: same-origin' \
      -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' \
      -H 'sec-ch-ua: "Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"' \
      -H 'sec-ch-ua-mobile: ?0' \
      -H 'sec-ch-ua-platform: "Windows"' \
      --data-raw '{"Mdms":{"id":"661b4560-a0ec-4930-a8c2-c84d643b361f","tenantId":"pb","schemaCode":"Trade.Validations","uniqueIdentifier":"sfd","data":{"name":"sfd","dropdownField":"70-90"},"isActive":true,"auditDetails":{"createdBy":"aeb85b37-c996-4218-bdca-1b00cc268f2f","lastModifiedBy":"aeb85b37-c996-4218-bdca-1b00cc268f2f","createdTime":1694161642579,"lastModifiedTime":1694161642579}},"RequestInfo":{"apiId":"Rainmaker","authToken":"5bbfa93c-adc2-42b2-992e-a708a83cb2cf","userInfo":{"id":80234,"uuid":"aeb85b37-c996-4218-bdca-1b00cc268f2f","userName":"WBQA","name":"LOC","mobileNumber":"9999991942","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"MDMS ADMIN","code":"MDMS_ADMIN","tenantId":"pb"},{"name":"Super User","code":"SUPERUSER","tenantId":"pb"},{"name":"Localisation admin","code":"LOC_ADMIN","tenantId":"pb"},{"name":"Employee","code":"EMPLOYEE","tenantId":"pb"}],"active":true,"tenantId":"pb","permanentCity":null},"msgId":"1694163335209|en_IN","plainAccessRequest":{}}}' \
      --compressed
    {
        "Mdms": {
            "id": "661b4560-a0ec-4930-a8c2-c84d643b361f",
            "tenantId": "pb",
            "schemaCode": "Trade.Validations",
            "uniqueIdentifier": "sfd",
            "data": {
                "name": "sfd",
                "dropdownField": "70-90"
            },
            "isActive": true,
            "auditDetails": {
                "createdBy": "aeb85b37-c996-4218-bdca-1b00cc268f2f",
                "lastModifiedBy": "aeb85b37-c996-4218-bdca-1b00cc268f2f",
                "createdTime": 1694161642579,
                "lastModifiedTime": 1694161642579
            }
        },
        "RequestInfo": {
            "apiId": "Rainmaker",
            "authToken": "5bbfa93c-adc2-42b2-992e-a708a83cb2cf",
            "userInfo": {
                "id": 80234,
                "uuid": "aeb85b37-c996-4218-bdca-1b00cc268f2f",
                "userName": "WBQA",
                "name": "LOC",
                "mobileNumber": "9999991942",
                "emailId": null,
                "locale": null,
                "type": "EMPLOYEE",
                "roles": [
                    {
                        "name": "MDMS ADMIN",
                        "code": "MDMS_ADMIN",
                        "tenantId": "pb"
                    },
                    {
                        "name": "Super User",
                        "code": "SUPERUSER",
                        "tenantId": "pb"
                    },
                    {
                        "name": "Localisation admin",
                        "code": "LOC_ADMIN",
                        "tenantId": "pb"
                    },
                    {
                        "name": "Employee",
                        "code": "EMPLOYEE",
                        "tenantId": "pb"
                    }
                ],
                "active": true,
                "tenantId": "pb",
                "permanentCity": null
            },
            "msgId": "1694163335209|en_IN",
            "plainAccessRequest": {}
        }
    }
    

    Schema Collection

    Sample schemas

    Bulk Upload Localizations
    Workbench UI Testcases
    Logo
    Logo
       "SchemaDefinition": {
            "id": "252ec49e-0822-43b3-ba18-b222a7471aba",
            "tenantId": "pg",
            "code": "ACCESSCONTROL-ROLEACTIONS.roleactions",
            "description": "roleactions",
            "definition": {
                "type": "object",
                "title": "Generated schema for Root",
                "$schema": "http://json-schema.org/draft-07/schema#",
                "isActive": true,
                "required": [
                    "rolecode",
                    "actionid"
                ],
                "x-unique": [
                    "rolecode",
                    "actionid"
                ],
                "properties": {
                    "actionid": {
                        "type": "string"
                    },
                    "rolecode": {
                        "type": "string"
                    },
                    "tenantId": {
                        "type": "string"
                    },
                    "actioncode": {
                        "type": "string"
                    }
                },
                "x-ref-schema": [
                    {
                        "fieldPath": "rolecode",
                        "schemaCode": "ACCESSCONTROL-ROLES.rolesroles"
                    },
                    {
                        "fieldPath": "actionid",
                        "schemaCode": "ACCESSCONTROL-ACTIONS-TEST.actions-test"
                    }
                ]
            },
            "isActive": true,
            "auditDetails": {
                "createdBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "lastModifiedBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "createdTime": 1695189499319,
                "lastModifiedTime": 1695189499319
            }
        }
    "SchemaDefinition": {
            "id": "16979b3a-ad17-4bee-ab87-bd92b42e7e4d",
            "tenantId": "pg",
            "code": "ACCESSCONTROL-ACTIONS-TEST.actions-test",
            "description": "actions test",
            "definition": {
                "type": "object",
                "title": "Generated schema for Root",
                "$schema": "http://json-schema.org/draft-07/schema#",
                "isActive": true,
                "required": [
                    "id",
                    "name"
                ],
                "x-unique": [
                    "id"
                ],
                "properties": {
                    "id": {
                        "type": "integer"
                    },
                    "url": {
                        "type": "string"
                    },
                    "code": {
                        "type": [
                            "string",
                            "null"
                        ]
                    },
                    "name": {
                        "type": "string"
                    },
                    "path": {
                        "type": "string"
                    },
                    "enabled": {
                        "type": "boolean"
                    },
                    "displayName": {
                        "type": "string"
                    },
                    "orderNumber": {
                        "type": "integer"
                    },
                    "serviceCode": {
                        "type": "string"
                    },
                    "parentModule": {
                        "type": "string"
                    }
                },
                "x-ui-schema": {
                    "ui:order": [
                        "id",
                        "name",
                        "*"
                    ]
                },
                "auditDetails": {
                    "createdBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                    "createdTime": 1692703758627,
                    "lastModifiedBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                    "lastModifiedTime": 1692703758627
                }
            },
            "isActive": true,
            "auditDetails": {
                "createdBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "lastModifiedBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "createdTime": 1695034443954,
                "lastModifiedTime": 1695034443954
            }
        }
    ```
       "SchemaDefinition": {
            "id": "1abaf5be-04a6-4003-9b83-2562339373fd",
            "tenantId": "pg",
            "code": "tenant.tenants",
            "description": "HCM tenant",
            "definition": {
                "type": "object",
                "title": "Generated schema for Root",
                "$schema": "http://json-schema.org/draft-07/schema#",
                "isActive": true,
                "required": [
                    "code",
                    "name"
                ],
                "x-unique": [
                    "code"
                ],
                "properties": {
                    "city": {
                        "type": "object",
                        "properties": {
                            "code": {
                                "type": "string"
                            },
                            "name": {
                                "type": "string"
                            },
                            "captcha": {
                                "type": "string",
                                "nullable": true
                            },
                            "ddrName": {
                                "type": "string"
                            },
                            "latitude": {
                                "type": "number"
                            },
                            "ulbGrade": {
                                "type": "string"
                            },
                            "localName": {
                                "type": "string"
                            },
                            "longitude": {
                                "type": "number"
                            },
                            "regionName": {
                                "type": "string"
                            },
                            "districtCode": {
                                "type": "string"
                            },
                            "districtName": {
                                "type": "string"
                            },
                            "shapeFileLocation": {
                                "type": "string",
                                "nullable": true
                            },
                            "districtTenantCode": {
                                "type": "string"
                            }
                        }
                    },
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "type": {
                        "type": "string"
                    },
                    "logoId": {
                        "type": "string"
                    },
                    "address": {
                        "type": "string"
                    },
                    "emailId": {
                        "type": "string",
                        "format": "email"
                    },
                    "imageId": {
                        "type": "string"
                    },
                    "domainUrl": {
                        "type": "string"
                    },
                    "twitterUrl": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    },
                    "facebookUrl": {
                        "type": "string"
                    },
                    "OfficeTimings": {
                        "type": "object",
                        "properties": {
                            "Mon - Fri": {
                                "type": "string"
                            }
                        }
                    },
                    "contactNumber": {
                        "type": "string"
                    }
                },
                "x-ui-schema": {
                    "ui:order": [
                        "code",
                        "name",
                        "*"
                    ]
                },
                "auditDetails": {
                    "createdBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                    "createdTime": 1692703758627,
                    "lastModifiedBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                    "lastModifiedTime": 1692703758627
                }
            },
            "isActive": true,
            "auditDetails": {
                "createdBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "lastModifiedBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "createdTime": 1694609047481,
                "lastModifiedTime": 1694609047481
            }
        }
    ```
      "SchemaDefinition": {
            "id": "9f45749c-e0a2-4cc7-850d-4f3847877bbb",
            "tenantId": "pg",
            "code": "ACCESSCONTROL-ROLES.rolesroles",
            "description": "roles",
            "definition": {
                "type": "object",
                "title": "Generated schema for Root",
                "$schema": "http://json-schema.org/draft-07/schema#",
                "isActive": true,
                "required": [
                    "code",
                    "name"
                ],
                "x-unique": [
                    "code"
                ],
                "properties": {
                    "code": {
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "description": {
                        "type": "string"
                    }
                },
                "x-ui-schema": {
                    "ui:order": [
                        "code",
                        "name",
                        "*"
                    ]
                },
                "auditDetails": {
                    "createdBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                    "createdTime": 1692703758627,
                    "lastModifiedBy": "902fcdad-8742-4e13-b9f0-12605a6180bb",
                    "lastModifiedTime": 1692703758627
                }
            },
            "isActive": true,
            "auditDetails": {
                "createdBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "lastModifiedBy": "21c3a3b1-1000-48bf-a820-a7aca37da8d9",
                "createdTime": 1695186550125,
                "lastModifiedTime": 1695186550125
            }
        }
    ```

    Add Localisation Data

    Add localization flow

    Adding Localizations

    • From the search screen user can navigate to add localization screen by clicking the action button

    • In this screen user can specify the locale(language) and module in which messages have to be upserted

    • Once the language and module is selected a table is rendered in which user can add the keycode and the respective message. In one go, we can upsert upto 50 messages in this table.

    • These messages will be upserted into the default locale as well.

    • After adding the messages user can click on the "Save" action button. Upon success, a relevant toast message is shown and the table is cleared.

    • In case of failure, an error toast message is shown listing the list of errors due to which the messages could not be upserted.

    API for adding localizations

    Same API is utilized for edit and bulk upload as well.

    Refer the below curl:

    Tenant Module Localization

    • State level users can upsert localizations to all modules

    • City level users can only upsert to module specific to the tenantId (eg -> pg.citya)

    • Some examples of city module localizations

    Bulk Upload Localizations

    Overview

    The bulk upload feature allows users to upload multiple localization entries across different languages simultaneously using an Excel file template.

    Initiating Bulk Upload

    From the localization add screen, users can initiate bulk upload by clicking the "Bulk Upload" action button.

    Selecting Module

    A modal popup appears where users need to:

    • Select the module for which they want to upload localizations

    • The module dropdown displays all available modules

    Once a module is selected, two options become available:

    1. Download Template - to download a pre-populated Excel template

    2. Bulk Upload - to upload the modified Excel file

    Downloading Template

    Template Generation

    After selecting a module, click the "Download Template" button. The system will:

    • Fetch all existing localizations for the selected module across all configured languages

    • Generate an Excel file (template.xlsx) with pre-populated data

    • Automatically download the file to your system

    Template Structure

    The downloaded Excel template contains the following columns:

    Column Name
    Description
    Status

    Note: The actual language column names depend on the languages configured.

    Template Features:

    • Sheet is protected to prevent accidental structural changes

    • "Message" column (default locale) is locked and cannot be modified

    • All other language columns are editable

    • Column widths are automatically sized based on content

    Example Template:

    Message
    ENGLISH
    FRENCH
    code

    Editing the Template

    1. Open the downloaded template.xlsx file in Excel or compatible spreadsheet software

    2. Add new rows for new localization entries

    3. Edit translations in the editable language columns

    4. Save the file

    Important Guidelines:

    • Do NOT modify the "Message" column (it is locked)

    • Ensure each code is unique

    • Fill translations for at least one language

    • Empty cells for a language will be skipped (no entry created for that locale)

    Uploading Modified Template

    1. Click the "Bulk Upload" button in the module selection modal

    2. A file upload modal appears

    3. Select or drag-and-drop your modified Excel file

    4. Click submit

    Accepted file formats: .xls, .xlsx

    File Processing and Submission

    Once the file is uploaded:

    1. Excel file is parsed and converted to JSON format

    2. Language columns are mapped to locale codes - Example: "English" column → en_IN locale, "Hindi" column → hi_IN locale

    3. Data is transformed - Each row is split into multiple entries (one per language)

    4. Example: Excel Row: | Message | English | Hindi | code |

    | Save | Save | सहेजें | CORE_SAVE |

    Transformed to:

    5. Data is validated for: - Duplicate code-message-locale-module combinations - Valid file format - Required fields presence

    6. Entries are grouped by locale and submitted to the API

    7. Multiple API calls are made in parallel (one per locale group) for faster processing

    Success and Error Handling

    On Success

    • A success toast message appears: "Localizations upserted successfully"

    • The bulk upload modal closes automatically

    • All uploaded localizations are now available in the system

    On Failure

    • An error toast message displays the specific error(s)

    • Example: "Localization upsert failed: Invalid locale code, Duplicate entry"

    • The modal closes, allowing you to fix the issues and retry the upload

    API for Bulk Upload

    The bulk upload uses the same API as manual add and edit operations.

    Endpoint: POST /localization/messages/v1/_upsert

    Note: Multiple API calls are made (one per locale) with entries grouped by locale for efficient processing.

    Validation Rules

    The bulk upload validates the following:

    Validation
    Description

    Key Benefits

    1. Multi-Language Support - Upload translations for multiple languages in a single file

    2. Pre-populated Templates - Start with existing data, making updates easier

    3. Protected Editing - Default locale column is locked to prevent accidental changes

    4. Flexible Entry Creation - Only creates entries for languages with translations provided

    User Stories

    MDMS Master Data Homepage

    Features

    Contains all existing localization codes for the selected module

    Do NOT change the column headers

    Efficient Processing - Parallel API calls for faster bulk operations

  • Duplicate Prevention - Automatic validation prevents data conflicts

  • Message

    Default locale message

    Locked (cannot be edited)

    English

    English language translations

    Editable

    [other languages]

    Additional configured languages

    Editable

    code

    Localization key code

    Warehouse Manager

    Warehouse Manager

    Responsable d'entrepôt

    ACCESSCONTROL_ROLES_ROLES_ACCESSCONTROL_ROLES_ROLES_WAREHOUSE_MANAGER

    AssetReportViewer

    AssetReportViewer

    Visionneuse de rapport sur les actifs

    ACCESSCONTROL_ROLES_ROLES_ASSETREPORTVIEWER

    File Format

    Only .xls and .xlsx files are accepted

    Duplicate Combinations

    No duplicate code-message-locale-module entries allowed

    Required Fields

    code and at least one message must be present

    Empty Values

    Rows with empty critical fields are skipped

    Editable

    curl --location 'http://localhost:3000/localization/messages/v1/_upsert' \
    --header 'Accept: application/json, text/plain, */*' \
    --header 'Accept-Language: en-US,en;q=0.9' \
    --header 'Connection: keep-alive' \
    --header 'Content-Type: application/json;charset=UTF-8' \
    --header 'Origin: http://localhost:3000' \
    --header 'Referer: http://localhost:3000/workbench-ui/employee/workbench/localisation-add' \
    --header 'Sec-Fetch-Dest: empty' \
    --header 'Sec-Fetch-Mode: cors' \
    --header 'Sec-Fetch-Site: same-origin' \
    --header 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/116.0.0.0 Safari/537.36' \
    --header 'sec-ch-ua: "Chromium";v="116", "Not)A;Brand";v="24", "Google Chrome";v="116"' \
    --header 'sec-ch-ua-mobile: ?0' \
    --header 'sec-ch-ua-platform: "Windows"' \
    --data '{"tenantId":"pb","messages":[{"code":"sdf","message":"dsf","locale":"default","module":"rainmaker-test","id":0}],"RequestInfo":{"apiId":"Rainmaker","authToken":"5bbfa93c-adc2-42b2-992e-a708a83cb2cf","userInfo":{"id":80234,"uuid":"aeb85b37-c996-4218-bdca-1b00cc268f2f","userName":"WBQA","name":"LOC","mobileNumber":"9999991942","emailId":null,"locale":null,"type":"EMPLOYEE","roles":[{"name":"MDMS ADMIN","code":"MDMS_ADMIN","tenantId":"pb"},{"name":"Super User","code":"SUPERUSER","tenantId":"pb"},{"name":"Localisation admin","code":"LOC_ADMIN","tenantId":"pb"},{"name":"Employee","code":"EMPLOYEE","tenantId":"pb"}],"active":true,"tenantId":"pb","permanentCity":null},"msgId":"1694166894795|en_IN","plainAccessRequest":{}}}'
    
    
           {
                "code": "PG_CITYA_ADMIN_B2",
                "message": "Ward Two",
                "module": "rainmaker-pg.citya",
                "locale": "en_IN"
            },
            
            {
                "code": "PG_CITYA_ADMIN_B3",
                "message": "Ward Three",
                "module": "rainmaker-pg.citya",
                "locale": "en_IN"
            }
    [ 
    { code: "CORE_SAVE", message: "Save", locale: "default", module: "rainmaker-common" }, { code: "CORE_SAVE", message: "Save", locale: "en_IN", module: "rainmaker-common" }, 
    { code: "CORE_SAVE", message: "सहेजें", locale: "hi_IN", module: "rainmaker-common" } 
    ] 

    Select Master

  • Add new master data

    • Redirect to the “add master data” page

  • Search section

  • View all section

  • Navigation options

    • Add New

    • Search

    • Clear Search

    • Select an object

    • Click on edit against an object

    • Pagination navigation

  • Variations

    • First-time load

  • Add Master Data

    Features

    1. Dynamically rendered form

      • Order of fields

        • In the order of the schema

      • Labels

        • Will be the keys in the schema

      • Input field type

        • Will be dynamically generated based on the schema type

    2. Add Localization

      • Default behavior - For every master data created create a localization entry too

        • Keycode - system generated

    3. Save

      • Save one of

      • Save and add another

    4. Dependency

      • Some masters have a dependency on others to be added as a prerequisite

    Data Input Fields

    Render UI for adding fields

    non-editable key-value

    • For values that are non-editable / view-only

    Text input, mandatory

    • For all text input fields

    • If mandatory then the key label will be highlighted and a prompt shown for violation upon submission

    Text input, validation

    • If there are any validations then the key label will be highlighted and a prompt shown for violation upon submission

    Dropdown for referenced master data

    • If referencing another master data set then the drop-down should show the list of objects from the referenced set

      • The text that will be displayed will be the <title of object> from the master data that is referenced; The same as the first column in the view/search results section

    Boolean selection

    • For all boolean data types in the schema

    Input, Date type

    • Where the input type is the date

    • Any validations should restrict the range of the calendar.

      • Example: If a date outside a given range of dates is selected raise a prompt for the same; Alternately restrict the selection of such a date too

    Object

    • Card for all “object” data types

    • The length of the card will depend on the fields inside the object

    • All fields/properties of the object will be rendered in the UI

    • The fields inside the box will use the same components as above

    Array of strings

    • All arrays will have the same UI component

    • The user should be able to minimize the array, and in a minimized state be able to see the title of the array

    • All array boxes will have a +Add “title of the array” button to add new entities to the array itself

      • No order for removing entities added to the array

    • Until the whole form is saved, any object in the array can be edited/removed

    Array of objects

    • All arrays will have the same UI component

    • The user should be able to minimize the array, and in a minimized state be able to see the title of the array

    • All array boxes will have a +Add “title of the array” button to add new entities to the array itself

      • No order for removing entities added to the array

    • Until the whole form is saved, any object in the array can be edited/removed

    • Each object box ll have the properties of the “Object” UI component as detailed in the object section

      • The fields inside each array will be the same and will be rendered based on the properties/keys in the object schema

    Add Localisation

    Add localisation for master data while creating master data

    Features

    1. Add localisation

      • Code - system generated

      • Select Language - select from the list of “locale”s in the tenant

      • Text - Mandatory field

    2. Adding localisation for multiple languages

      • Repeat the same process by selecting each language

    Search Master Data

    Features

    1. Search

      • Search fields

        • Search fields will be custom-defined for each master - Some master data objects have objects/array of objects inside them, search parameter cannot be a value in this hierarchy; Example: productVariantId inside resources for a projectType master data

        • Type of search fields

          • Text

          • Selection - If the property in the master data object has a reference then the search input will also be a selection-based dropdown

        • Labels for the search fields will be picked from the value of the key of the property that is selected

    2. Clear search - Will clear the entered values in the search input boxes and also the results to default

    3. View Search results

      • Search results

        • Default - By default will load all the objects in the corresponding master

      • Order of listing - Search results will be listed in ascending order(A-Z) of the first column when the page loads

    4. Variations - No results found

    View All

    Features

    1. Columns

      • List of columns to be shown - Will be custom-defined for each master

      • Order of columns - Will be custom-defined for each master

    2. Rows

      • Number of items in the row - As per the DIGIT UI design system

      • Edit option - Every row object will have an edit icon, that will redirect to the “Update” page for the corresponding object

    View One

    Features

    1. View the object’s details - Page layout will be the same as the “add new” page - except all fields will be non-editable

    2. Navigation options - Update

    Edit & Update Master Data

    Features

    1. Object details

      • The page will be rendered as the add new page - except there won’t be an option for “Save and Add Another”

      • Disable

    2. Navigation options

      • Save

    SwaggerEditoreditor.swagger.io
    Locale - en_IN
  • Value - keycode

  • If the user clicks on add localization, here is the flow

  • List of columns to be displayed- Will be customized for each master

  • Sorting - Sorting will be available for every column

  • Logo

    MDMS V2 Migration Guide

    (Running MDMS V2 as egov-mdms-service)

    Overview

    This documentation outlines the process for replacing the egov-mdms-service with MDMS V2, which is database-driven and offers enhanced API capabilities for CRUD operations (Create, Read, Update, and Disable). By renaming the context path of MDMS V2 to egov-mdms-service, we ensure that core and other services can seamlessly interact with the new MDMS service without requiring changes.

    Key Changes

    1. MDMS V2:

      • Database-based: Stores master data in a database rather than static files in a GitHub repository.

      • CRUD APIs: Allows users to dynamically interact with the master data through APIs for adding, updating, and disabling records.

      • Backward Compatibility

    Migration Steps

    1. Rename MDMS V2 Context Path

    Rename the context path of MDMS V2 to egov-mdms-servicein your environment. This ensures that all existing core and dependent services will seamlessly point to the new MDMS V2 without the need for any modifications.

    • For example, if MDMS V2 is running on /mdms-v2, change it to /egov-mdms-service in the environment configurations.

    2. Remove Existing egov-mdms-service

    Delete the existing egov-mdms-service setup:

    • Pods: Remove the running pods related to the old egov-mdms-service.

    • Service: Delete the service definition.

    • Ingress: Remove or update the ingress to redirect to the new MDMS V2.

    3. Deploy MDMS V2 with Configuration

    Deploy or redeploy MDMS V2 with the updated context path (/egov-mdms-service) and database configurations enabled.

    Ensure the following configurations are set:

    • Database connection (for master data storage)

    • API configurations (for CRUD operations)

    • Backwards compatibility enabled (for V1 search APIs)

    4. Restart Zuul Gateway

    Once MDMS V2 is deployed and running, restart the Zuul Gateway (or any API gateway) to ensure that it picks up the new routing mappings to the renamed MDMS service (egov-mdms-service).

    5. Restart Dependent Services

    Restart all core and dependent services with configuration changes enabled so that they point to the newly deployed MDMS V2. This ensures that the services can now interact with the updated APIs provided by MDMS V2.

    Note: Some services, such as ENC service and User service, have direct dependencies on egov-mdms-service and specific data sets. Ensure that necessary data is added to the tenant(s) where this activity is being performed.

    Use the below scripts to add default data for the roles and security policy so that user service will get started and we can proceed with adding more data.

    Data Migration Process

    Data migration is a separate and essential activity that must be handled master by master. The migration process includes:

    1. Schema Creation:

      • For each master, ensure that the necessary schema is created in the database.

      • Verify that the structure aligns with the expected format in MDMS V2.

    2. Data Migration:

    I have attached the default MDMS data and schema that were created in UAT. This can be used to load the default MDMS for the HCM Product & Console. It can be imported into any environment, and you can change the tenant from 'mz' by using the 'find and replace' function. After that, delete any unnecessary masters and add new ones according to your use case.

    Additional Notes

    • Backward Compatibility: Since MDMS V2 supports the V1 search APIs, all core and dependent services will continue to function normally without modification.

    • Database Configuration: Ensure that database replication and backups are in place, especially during the migration, to prevent data loss.

    • Service Downtime: Depending on your infrastructure, plan for potential service downtime while removing the old egov-mdms-service and deploying MDMS V2.

    Database Dump & Schema Information

    A database dump containing all the necessary schemas and data will be provided. This includes:

    • Core-related master data.

    • Health and Console-related masters.

    You can filter the Core-related data from the dump and update your database accordingly for future environments.

    Conclusion

    By following this migration guide, you can seamlessly transition from egov-mdms-service to the more dynamic and API-driven MDMS V2. The new system enhances user interaction while maintaining compatibility with existing services, ensuring a smooth integration into the ecosystem.

    : MDMS V2 retains compatibility with MDMS V1 search APIs, allowing services using
    egov-mdms-service
    to function without changes.
  • egov-mdms-service:

    • File-based: Managed master data as static JSON files stored in a GitHub repository.

    • Limited Interaction: Primarily served data without allowing user modification through APIs.

  • Migrate data master by master into the corresponding database tables.

  • Ensure that the migrated data is valid and adheres to the schema.

  • Refer to this document to learn more about data migration.

  • The migration to MDMS V2 is successfully completed in the Unified UAT environment.

  • All MDMS data for -

    • HCM (including HCM Prod and HCM Console)

    • Sanitation

    • Core Master Data

    is migrated.

  • 3MB
    uat mdms backup
    Open
    uat mdms data backup
    -- Create the table if it doesn't already exist
    CREATE TABLE IF NOT EXISTS public.eg_mdms_data
    (
        id VARCHAR(64) NOT NULL,
        tenantid VARCHAR(255) NOT NULL,
        uniqueidentifier VARCHAR(255) NOT NULL,
        schemacode VARCHAR(255) NOT NULL,
        data JSONB NOT NULL,
        isactive BOOLEAN NOT NULL,
        createdby VARCHAR(64),
        lastmodifiedby VARCHAR(64),
        createdtime BIGINT,
        lastmodifiedtime BIGINT,
        CONSTRAINT pk_eg_mdms_data PRIMARY KEY (tenantid, schemacode, uniqueidentifier),
        CONSTRAINT uk_eg_mdms_data UNIQUE (id)
    );
    -- Insert data into the table
    INSERT INTO public.eg_mdms_data (
        id, tenantid, uniqueidentifier, schemacode, data, isactive, createdby, lastmodifiedby, createdtime, lastmodifiedtime
    ) VALUES 
    (
        '503fc752-4702-4236-jaga-3f9fdc2e664e', 
        'mz', 
        'SUPERUSER', 
        'ACCESSCONTROL-ROLES.roles', 
        '{"code": "SUPERUSER", "name": "Super User", "description": "Super User. Can change all master data and has access to all the system screens."}', 
        true, 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        1700735390109, 
        1700735390109
    ),
    (
        '503fc752-4702-4236-jaga-3f9fdc2e1234', 
        'mz', 
        'EMPLOYEE', 
        'ACCESSCONTROL-ROLES.roles', 
        '{"code": "EMPLOYEE", "name": "EMPLOYEE", "description": "EMPLOYEE Can change all master data and has access to all the system screens."}', 
        true, 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        1700735390109, 
        1700735390109
    )
    RETURNING tenantid, uniqueidentifier, schemacode;
    
    // Some code
    
    -- Insert data into the table
    INSERT INTO public.eg_mdms_data (
        id, tenantid, uniqueidentifier, schemacode, data, isactive, createdby, lastmodifiedby, createdtime, lastmodifiedtime
    ) VALUES 
    (
        'b01cb9ee-1cf6-4b12-990d-a412750088cd', 
        'mz', 
        'ALL_ACCESS', 
        'DataSecurity.DecryptionABAC', 
        '{"key": "ALL_ACCESS", "roleAttributeAccessList": [{"roleCode": "CITIZEN", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}, {"roleCode": "ANONYMOUS", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}, {"roleCode": "EMPLOYEE", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}]}'::jsonb, 
        true, 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        1700804076399, 
        1700804076399
    ),
    (
        '6e60a28e-bf58-445b-ac94-b293f5aa2a1a', 
        'mz', 
        'DescriptionReport', 
        'DataSecurity.DecryptionABAC', 
        '{"key": "DescriptionReport", "roleAttributeAccessList": [{"roleCode": "EMPLOYEE", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}]}]}'::jsonb, 
        true, 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', 
        1700804101912, 
        1700804101912
    ),
    ('d227ee3f-342a-4d09-8d15-58414075d023', 'mz', 'UserListSelf', 'DataSecurity.DecryptionABAC', 
    '{"key": "UserListSelf", "roleAttributeAccessList": [{"roleCode": "CITIZEN", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}, {"roleCode": "EMPLOYEE", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}]}', 
    TRUE, '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', '1700804205711', '1700804205711'),
    
    ('33478b40-b324-44a1-a221-795355541c23', 'mz', 'UserListOtherBulk', 'DataSecurity.DecryptionABAC', 
    '{"key": "UserListOtherBulk", "roleAttributeAccessList": [{"roleCode": "EMPLOYEE", "attributeAccessList": [{"attribute": {"jsonPath": "*/emailId"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}, {"roleCode": "SUPERUSER", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "GRO", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "DGRO", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "CSR", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "PGR-ADMIN", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "TL_CEMP", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "TL_APPROVER", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "TL_DOC_VERIFIER", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "TL_FIELD_INSPECTOR", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "CEMP", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}, {"roleCode": "FEMP", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "STADMIN", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}]}]}', 
    TRUE, '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9', '1700804234349', '1700804234349'),
    (
        '68b40c9c-cb52-4b61-a362-502763358622',
        'mz',
        'UserListOtherIndividual',
        'DataSecurity.DecryptionABAC',
        '{"key": "UserListOtherIndividual", "roleAttributeAccessList": [{"roleCode": "EMPLOYEE", "attributeAccessList": [{"attribute": {"jsonPath": "*/emailId"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "NONE"}, {"attribute": {"jsonPath": "*/permanentAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/correspondenceAddress/address"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/addresses/*/address"}, "accessType": "PLAIN"}]}, {"roleCode": "SUPERUSER", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/username"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "GRO", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "DGRO", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "CSR", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "PGR-ADMIN", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}]}, {"roleCode": "TL_CEMP", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "TL_APPROVER", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "TL_DOC_VERIFIER", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "TL_FIELD_INSPECTOR", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "CEMP", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "FEMP", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/emailId"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/altContactNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/pan"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/aadhaarNumber"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/guardian"}, "accessType": "PLAIN"}]}, {"roleCode": "STADMIN", "attributeAccessList": [{"attribute": {"jsonPath": "*/name"}, "accessType": "PLAIN"}, {"attribute": {"jsonPath": "*/mobileNumber", "maskingTechnique": "mobile"}, "accessType": "MASK"}}]}]}',
        TRUE,
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9',
        '0da6b089-265e-44ef-bf7f-9e0d3ef47bf9',
        '1700804248221',
        '1700804248221'
    )
    
    
    
    RETURNING tenantid, uniqueidentifier, schemacode;
    
    "id","tenantid","uniqueidentifier","schemacode","data","isactive","createdby","lastmodifiedby","createdtime","lastmodifiedtime"
    
    "e4cf98ee-e908-48c3-bf8c-14fb09ef81de"	"mz"	"User"	"DataSecurity.EncryptionPolicy"	"{""key"": ""User"", ""attributeList"": [{""type"": ""Normal"", ""jsonPath"": ""name""}, {""type"": ""Normal"", ""jsonPath"": ""mobileNumber""}, {""type"": ""Normal"", ""jsonPath"": ""emailId""}, {""type"": ""Normal"", ""jsonPath"": ""username""}, {""type"": ""Normal"", ""jsonPath"": ""altContactNumber""}, {""type"": ""Normal"", ""jsonPath"": ""pan""}, {""type"": ""Normal"", ""jsonPath"": ""aadhaarNumber""}, {""type"": ""Normal"", ""jsonPath"": ""guardian""}, {""type"": ""Normal"", ""jsonPath"": ""permanentAddress/address""}, {""type"": ""Normal"", ""jsonPath"": ""correspondenceAddress/address""}, {""type"": ""Normal"", ""jsonPath"": ""addresses/*/address""}]}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804635439	1700804635439
    "98a0c1c1-25f3-4577-a668-9b8cc0753425"	"mz"	"UserSearchCriteria"	"DataSecurity.EncryptionPolicy"	"{""key"": ""UserSearchCriteria"", ""attributeList"": [{""type"": ""Normal"", ""jsonPath"": ""userName""}, {""type"": ""Normal"", ""jsonPath"": ""name""}, {""type"": ""Normal"", ""jsonPath"": ""mobileNumber""}, {""type"": ""Normal"", ""jsonPath"": ""aadhaarNumber""}, {""type"": ""Normal"", ""jsonPath"": ""pan""}, {""type"": ""Normal"", ""jsonPath"": ""emailId""}]}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804645695	1700804645695
    "03d3ab8a-6d44-4ba3-a507-3e2fa7c69bd6"	"mz"	"BndDetail"	"DataSecurity.EncryptionPolicy"	"{""key"": ""BndDetail"", ""attributeList"": [{""type"": ""Normal"", ""jsonPath"": ""mobileno""}, {""type"": ""Normal"", ""jsonPath"": ""emailid""}, {""type"": ""Normal"", ""jsonPath"": ""aadharno""}, {""type"": ""Normal"", ""jsonPath"": ""icdcode""}]}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804699901	1700804699901
    "a54e8214-300f-4cf2-9efa-aa207dd7b82c"	"mz"	"Property"	"DataSecurity.EncryptionPolicy"	"{""key"": ""Property"", ""attributeList"": [{""type"": ""Normal"", ""jsonPath"": ""address/street""}]}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804713610	1700804713610
    "6654445d-ba93-411b-9c84-927924264e8a"	"mz"	"001"	"DataSecurity.MaskingPatterns"	"{""pattern"": "".(?=.{4})"", ""patternId"": ""001""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804772944	1700804772944
    "f33e86b3-e43f-4d21-b1d6-16d78cd1b22a"	"mz"	"002"	"DataSecurity.MaskingPatterns"	"{""pattern"": ""\\B[a-zA-Z0-9]"", ""patternId"": ""002""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804791784	1700804791784
    "85c2f358-cc26-4adc-bb5a-735808296453"	"mz"	"003"	"DataSecurity.MaskingPatterns"	"{""pattern"": "".(?=.{2})"", ""patternId"": ""003""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804802503	1700804802503
    "aec292f3-4194-413e-b13c-2de67cb64fa7"	"mz"	"004"	"DataSecurity.MaskingPatterns"	"{""pattern"": ""(?<=.)[^@\\n](?=[^@\\n]*?@)|(?:(?<=@.)|(?!^)\\G(?=[^@\\n]*$)).(?!$)"", ""patternId"": ""004""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804811911	1700804811911
    "64bf6b50-c2ab-482f-a998-85c3eab25721"	"mz"	"005"	"DataSecurity.MaskingPatterns"	"{""pattern"": ""[A-Za-zÀ-ȕ0-9(),-_., ]"", ""patternId"": ""005""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804821219	1700804821219
    "8a593b39-e894-4169-8555-d1bbe19d230c"	"mz"	"006"	"DataSecurity.MaskingPatterns"	"{""pattern"": ""\\w(?=(?:[ \\w]*\\w){2}$)"", ""patternId"": ""006""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804837750	1700804837750
    "8d646350-8453-4de9-ac9b-1c57c96791f9"	"mz"	"007"	"DataSecurity.MaskingPatterns"	"{""pattern"": ""(?<=.).(?=.{3})"", ""patternId"": ""007""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804848382	1700804848382
    "b4cacb75-573f-4cec-9785-b35f7e8227a0"	"mz"	"008"	"DataSecurity.MaskingPatterns"	"{""pattern"": ""(?<=.).(?=.{2})"", ""patternId"": ""008""}"	true	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	"0da6b089-265e-44ef-bf7f-9e0d3ef47bf9"	1700804861081	1700804861081
    "13852799-4e94-432f-8373-4e0fcfcd0d74"	"mz"	"User"	"DataSecurity.SecurityPolicy"	"{""model"": ""User"", ""attributes"": [{""name"": ""name"", ""jsonPath"": ""name"", ""patternId"": ""002"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""mobileNumber"", ""jsonPath"": ""mobileNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""emailId"", ""jsonPath"": ""emailId"", ""patternId"": ""004"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""username"", ""jsonPath"": ""username"", ""patternId"": ""002"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""altContactNumber"", ""jsonPath"": ""altContactNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""alternatemobilenumber"", ""jsonPath"": ""alternatemobilenumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""pan"", ""jsonPath"": ""pan"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""aadhaarNumber"", ""jsonPath"": ""aadhaarNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""guardian"", ""jsonPath"": ""guardian"", ""patternId"": ""002"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""permanentAddress"", ""jsonPath"": ""permanentAddress/address"", ""patternId"": ""003"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""correspondenceAddress"", ""jsonPath"": ""correspondenceAddress/address"", ""patternId"": ""003"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""fatherOrHusbandName"", ""jsonPath"": ""fatherOrHusbandName"", ""patternId"": ""002"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""searchUsername"", ""jsonPath"": ""userName"", ""patternId"": ""002"", ""defaultVisibility"": ""PLAIN""}], ""uniqueIdentifier"": {""name"": ""uuid"", ""jsonPath"": ""/uuid""}, ""roleBasedDecryptionPolicy"": [{""roles"": [""PGR_LME"", ""GRO""], ""attributeAccessList"": [{""attribute"": ""name"", ""firstLevelVisibility"": ""MASKED"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""mobileNumber"", ""firstLevelVisibility"": ""MASKED"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""username"", ""firstLevelVisibility"": ""MASKED"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""permanentAddress"", ""firstLevelVisibility"": ""MASKED"", ""secondLevelVisibility"": ""PLAIN""}]}, {""roles"": [""INTERNAL_MICROSERVICE_ROLE""], ""attributeAccessList"": [{""attribute"": ""mobileNumber"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""fatherOrHusbandName"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""correspondenceAddress"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""name"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""emailId"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""permanentAddress"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""username"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""altContactNumber"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""alternatemobilenumber"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""pan"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""aadhaarNumber"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}, {""attribute"": ""guardian"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}]}]}"	true	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	1701348865116	1701348865116
    "a94be37f-236e-4183-a9fb-f88c968d3d92"	"mz"	"UserSelf"	"DataSecurity.SecurityPolicy"	"{""model"": ""UserSelf"", ""attributes"": [{""name"": ""name"", ""jsonPath"": ""name"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""mobileNumber"", ""jsonPath"": ""mobileNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""emailId"", ""jsonPath"": ""emailId"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""username"", ""jsonPath"": ""username"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""altContactNumber"", ""jsonPath"": ""altContactNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""alternatemobilenumber"", ""jsonPath"": ""alternatemobilenumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""pan"", ""jsonPath"": ""pan"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""aadhaarNumber"", ""jsonPath"": ""aadhaarNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""guardian"", ""jsonPath"": ""guardian"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""permanentAddress"", ""jsonPath"": ""permanentAddress/address"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""correspondenceAddress"", ""jsonPath"": ""correspondenceAddress/address"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""fatherOrHusbandName"", ""jsonPath"": ""fatherOrHusbandName"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}], ""uniqueIdentifier"": {""name"": ""uuid"", ""jsonPath"": ""/uuid""}, ""roleBasedDecryptionPolicy"": []}"	true	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	1701348904508	1701348904508
    "a41fc892-ae6e-44b7-9137-9aac576d8212"	"mz"	"IndividualEncrypt"	"DataSecurity.SecurityPolicy"	"{""model"": ""IndividualEncrypt"", ""attributes"": [{""name"": ""mobileNumber"", ""jsonPath"": ""mobileNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""aadhaarNumber"", ""jsonPath"": ""identifiers/*/identifierId"", ""patternId"": ""001"", ""defaultVisibility"": ""MASKED""}], ""uniqueIdentifier"": {""name"": ""id"", ""jsonPath"": ""/id""}, ""roleBasedDecryptionPolicy"": [{""roles"": [""MUKTA_ADMIN""], ""attributeAccessList"": [{""attribute"": ""aadhaarNumber"", ""firstLevelVisibility"": ""PLAIN"", ""secondLevelVisibility"": ""PLAIN""}]}]}"	true	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	1701348925408	1701348925408
    "39404214-a403-4e85-be6e-578443b8b652"	"mz"	"IndividualSearchEncrypt"	"DataSecurity.SecurityPolicy"	"{""model"": ""IndividualSearchEncrypt"", ""attributes"": [{""name"": ""mobileNumber"", ""jsonPath"": ""mobileNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""aadhaarNumber"", ""jsonPath"": ""identifier/identifierId"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}], ""uniqueIdentifier"": {""name"": ""id"", ""jsonPath"": ""/id""}, ""roleBasedDecryptionPolicy"": []}"	true	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	1701348937235	1701348937235
    "28aa0518-8428-409b-81fa-3a3c4c8b3978"	"mz"	"IndividualSearchIdentifierEncrypt"	"DataSecurity.SecurityPolicy"	"{""model"": ""IndividualSearchIdentifierEncrypt"", ""attributes"": [{""name"": ""aadhaarNumber"", ""jsonPath"": ""identifier/identifierId"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}], ""uniqueIdentifier"": {""name"": ""id"", ""jsonPath"": ""/id""}, ""roleBasedDecryptionPolicy"": []}"	true	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	1701348949320	1701348949320
    "a9949e4b-1dc4-488e-821a-066b1f2b7097"	"mz"	"IndividualSearchMobileNumberEncrypt"	"DataSecurity.SecurityPolicy"	"{""model"": ""IndividualSearchMobileNumberEncrypt"", ""attributes"": [{""name"": ""mobileNumber"", ""jsonPath"": ""mobileNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}], ""uniqueIdentifier"": {""name"": ""id"", ""jsonPath"": ""/id""}, ""roleBasedDecryptionPolicy"": []}"	true	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	"7e97d4b7-8ec9-4b4e-b6cf-e76f7e4e050a"	1701348958311	1701348958311
    "cb29a9ad-e41e-41b0-a731-fa68247e23b8"	"mz"	"IndividualDecrypt"	"DataSecurity.SecurityPolicy"	"{""model"": ""IndividualDecrypt"", ""attributes"": [{""name"": ""mobileNumber"", ""jsonPath"": ""mobileNumber"", ""patternId"": ""001"", ""defaultVisibility"": ""PLAIN""}, {""name"": ""aadhaarNumber"", ""jsonPath"": ""identifiers/*/identifierId"", ""patternId"": ""001"", ""defaultVisibility"": ""MASKED""}], ""uniqueIdentifier"": {""name"": ""id"", ""jsonPath"": ""/id""}, ""roleBasedDecryptionPolicy"": []}"	true	"f4044a41-40ea-41c8-b43a-2374d55e8f8e"	"aeb85b37-c996-4218-bdca-1b00cc268f2f"	1703135169818	1703841425128

    MDMS V2 (Master Data Management Service)

    Overview

    MDMS v2 exposes APIs for defining schemas, searching schemas and then adding master data against these defined schemas. The data is now stored in PostgreSQL tables rather than in GitHub. MDMS v2 currently also exposes v1 search API which will fetch data from the database in the same format as MDMS v1 search API to maintain backward compatibility.

    Pre-Requisites

    1. Prior knowledge of Java/J2EE

    2. Prior knowledge of Spring Boot

    3. Prior knowledge of REST APIs and related concepts like path parameters, headers, JSON etc.

    4. Prior knowledge of Git

    Functionalities

    1. Create schema: MDMS v2 introduces functionality to define your schema with all validations and properties supported by JSON schema draft 07.

    2. Search schema: MDMS v2 has API to search schema based on the tenantid, schema code, and unique identifier.

    3. Create data: MDMS v2 allows the creation of data against the defined schema.

    4. Search data: MDMS v2 exposes two search APIs - v1 and v2 search where the v1 search API is entirely backward compatible.

    Configuration Details

    API

    1. /mdms-v2/schema/v1/_create - Takes RequestInfo and SchemaDefinition in the request body. SchemaDefinition contains all attributes required to define the schema.

    2. /mdms-v2/schema/v1/_search - Takes RequestInfo and SchemaDefSearchCriteria in the request body and returns schemas based on the provided search criteria.

    3. /mdms-v2/v2/_create/{schemaCode} - This API endpoint is used to create the schemCode masters. It requires a "RequestInfo" in the request and utilizes the "MDMS" object within the request body to extract the necessary information for master creation. It takes the schemaCode as a path parameter to specify the schema mapped to the defined master data.

    Postman Collection

    MDMS v2 APIs

    Advanced knowledge of operating JSON data would be an added advantage to understanding the service

  • Update data: MDMS v2 allows the updation of master data fields.

  • Fallback functionality: Both search APIs have fallback implemented where if data is not found for a particular tenant, the services fall back to the parent tenant(s) and return the response. If data is not found even for the parent tenant, an empty response is sent to the user.

  • /mdms-v2/v2/_search - Takes RequestInfo and MdmsCriteria in the request body to return master data based on the provided search criteria. It also has a fallback functionality where if data is not found for the tenant which is sent, the services fall back to the parent tenant(s) to look for the data and return it.

  • /mdms-v2/v2/_update/{schemaCode} - Takes RequestInfo and Mdms in the request body where the MDMS object has all the information for the master being updated and it takes schemaCode as path param to identify the schema against which data is being updated.

  • /mdms-v2/v1/_search - This is a backwards-compatible API which takes RequestInfo and MdmsCriteria in the request body to return master data based on the provided search criteria and returns the response in MDMS v1 format. It also has a fallback functionality where if data is not found for the tenant which is sent, the services fall back to the parent tenant(s) to look for the data and return it.

  • https://api.postman.com/collections/12892142-771842a6-fe9d-4ba7-93ba-2fffdb525055?access_key=PMAT-01H5PA8YTK7H1357VGDQ4YMW7Wapi.postman.com