Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Overview

In a bid to avoid unnecessary repetition of codes which generates ids and to have central control over the logic so that burden of maintenance is reduced from the developers.
To create a config based application which can be used without writing even a single line of coding.

Pre-requisites

  1. Prior Knowledge of Java/J2EE.

  2. Prior Knowledge of Spring Boot, Flyway.

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

Key Functionalities

The application exposes a Rest API to take in requests and provide the ids in response in the requested format.
The request format varies from current date information , tenantId*, random number, sequence generated number.
Id can be generated by providing request with any of the above mentioned information.

...

  • AUTOCREATE_NEW_SEQ: Default to false. When set to true, this will auto create sequences when the format has been derived using provided idName. Since the idName format comes from DB or MDMS, it is a trusted value and this value should be set to true. This will make sure the no DB configuration needs to be done as long as MDMS has been configured. It is recommended that each service using idgen should generated id using idName instead of just using passing the format directly. This will make sure that no DB configuration needs to be done for creating sequences

  • AUTOCREATE_REQUEST_SEQ: Default to false. When set to true, this will auto create sequences when the format has been derived using the format parameter from the request. This is recommended to kept as false, as anyone with access to idgen can create any number of sequences in DB and overload the DB. Though during initial setup of an environment this variable can be kept as true to create all the sequences when the initial flows are run from the UI, to generated the sequences. And afterward the flags should be disabled

Deployment Details

  1. Add mdms configs required for ID Gen Service and restart mdms service.

  2. Deploy the latest version of ID Generation Service.

  3. Add Role-Action mapping for API’s.

Integration

Integration Scope

The ID Gen service is used to generate unique ID numbers for all miscellaneous / adhoc services which citizens avail from ULBs.

Integration Benefits

  • Can perform service-specific business logic without impacting the other module.

  • Provides the capability of generating the unique identifier of the entity calling ID Gen service.

Steps to Integration

  1. To integrate, host of idgen-services module should be overwritten in helm chart.

  2. /egov-idgen/id/_generateshould be added as the endpoint for generating ID number in the system

API Contract

https://raw.githubusercontent.com/egovernments/egov-services/master/docs/idgen/contracts/v1-0-0.yml