MDMS-Rewritten
Master Data Management Service is a core service that is made available on the DIGIT platform. It encapsulates the functionality surrounding Master Data Management. The service creates, updates and fetches Master Data pertaining to different modules. This eliminates the overhead of embedding the logic of storage and retrieval of Master Data into other modules. The functionality is exposed via REST API
Prerequisites
Prior Knowledge of Java/J2EE, Spring Boot, advanced knowledge on how to operate JSON data would be an added advantage to understand the service.
Functionality
The MDM service reads the data from a set of JSON files from a pre-specified location. It can either be an online location (readable JSON files from online) or offline (JSON files stored in local memory). The JSON files should conform to a prescribed format. The data is stored in a map and tenantID of the file serves as a key.
Once the data is stored in the map the same can be retrieved by making an API request to the MDM service. Filters can be applied in the request to retrieve data based on the existing fields of JSON.
Setup and Usage
The spring boot application needs lombok extension added in your IDE to load it. Once the application is up and running API requests can be posted to the URL.
Configuration and Structure
The config JSON files to be written should follow the listed rules
The config files should have JSON extension
The file should mention the tenantId, module name, and the master name first before defining the data
{
"tenantId": "pb",
"moduleName": "BillingService",
"{$MasterName}":[ ]
}
The Master Name in the above sample will be substituted by the actual name of the master data. The array succeeding it will contain the actual data.
Example Config JSON for “Billing Service”
{
"tenantId": "pb",
"moduleName": "BillingService",
"BusinessService":
[
{
"businessService": "PropertyTax",
"code": "PT",
"collectionModesNotAllowed": [ "DD" ],
"partPaymentAllowed": true,
"isAdvanceAllowed": true,
"isVoucherCreationEnabled": true
}
]
}
API Reference Documentation
APIs are available to create, update and fetch Master Data pertaining to different modules. Here are some quick details for reference