Default-data-handler
Overview
The Default Data Handler is an orchestration service designed to streamline tenant onboarding and data setup. It offers functionality to create and manage MDMS data (schemas and corresponding data), localization data, and workflow configurations set up for the new tenants.
Pre-requisites
Before you proceed with the documentation, make sure the following prerequisites are met -
Prior knowledge of Java/J2EE
Prior knowledge of Spring Boot
Prior knowledge of Kafka and related concepts like Producer, Consumer, Topic, etc
Prior knowledge of Elasticsearch
Key Functionalities
Loads all MDMS data (schemas and corresponding data) for schema codes listed in the resource/mdmsData folder.
Loads all localization data for locales and modules listed in the resource/localisation folder to the new tenant.
Loads the workflow configuration JSON from the application classpath, updates the tenantId with the new tenant ID, and invokes the workflow create API.
Creates users for the new tenant and sends an OTP for login.
Onboarding a New Module
Add Workflow Configurations: Update the PgrWorkflowConfig.json file (located at src/main/resources) by including the module's workflow configurations in the "BusinessServices" array. Reference: PgrWorkflowConfig.json
Add the module’s localization locales and modules under the resource/localisation folder. Reference: localisation
Add Users with the necessary roles. Reference: User.json
Add Employees with the necessary roles. Reference: HRMS.json
All these files have tenantid as a placeholder, which will be replaced by the tenantid set in the env file.
Deploy the Service: Build and deploy the default-data-handler service using the modified helm file
Service Dependencies
Service Dependencies
mdms-v2
boundary-service
localisation service
user service
employee service
workflow service
How it works
Initialization
Start by setting up the necessary components.
Ensure all dependencies are installed.
Process Execution
Waits 10 seconds after startup until dependent services are running:
mdms-v2
boundary-service
localisation service
Initializes StartupSchemaAndMasterDataInitializer after the 10-second wait.
Runs StartupUserAndEmployeeInitializer 4 times at 4-minute intervals.
Finalization
Within 20 minutes of service initialization, all master data, localization data, workflow data, users, and employees are created or updated.
Last updated
Was this helpful?