Finance Service Configuration

Overview

This document describes the steps to be followed to set up a new instance of Finance. When a new state or city is to be set up, there are some activities to be executed in a defined order. Setting up an instance of an application server and configuration changes etc are a few of the key activities.

Technical Prerequisites

  • Prior knowledge of Java/J2EE.

  • Prior knowledge of Spring and Hibernate

  • Prior knowledge of Maven

  • Prior knowledge of Git

Hardware/Software Prerequisites

  • Maven v3.2.x

  • PostgreSQL v9.6

  • Git 2.8.3

  • JDK 8 update 112 or higher

  • Create subdomains under the main domain for each of the cities that are to be set up

  • Create a schema per city in the database

Configurations and Setup

The Co-existence repositoryarrow-up-right is the base repository for the finance product and the client-specific data needs to be defined in the client repository defined within the base repository.

How to set up a client implementation repository

  1. Fork and create a client implementation repository from the base repository to keep client-specific data and configurations.

  2. Any configurations and data specific to the client should be added to the client repository.

Application Configuration

Sample environment named yaml files for your reference

Database configuration

Add or update the db url in the environment specificarrow-up-right file using the below property

Update the db username and password, which are configured in the environment named secrets yaml file.

For example, for the qa environment, update the qa-secrets.yaml

Set up a schema-based multi-tenant database

Finance co-existence service uses schema-based multi-tenancy, which means there will be one schema present for a city. The following are the configuration changes to set up this kind of database.

  • Enable multi-tenancy by enabling the following property

  • Each ULB is enabled by adding a schema name and domain name. Schema names should follow a naming standard, It should be the same as that of the city name.

  • Each ULB can be configured by adding an entry like tenant.<domain_name>=schema_name (city_name)

  • The default tenants are configured in the finance service yamlarrow-up-right file using the below configuration.

  • To override and have separate tenants for a specific environment then update the environment-specific file like below.

  • Here citya.egovernments.org, cityb.egovernments.org are the domains and citya, cityb are the schemas/tenants.

Example environment specific configurationarrow-up-right file for your reference.

  • Update the domainurl in the eg_city table.

  • Domain URL value should be the same as configured tenant domain_name Ex:

Database migration settings

The default database migration configurations are present in the application configurationarrow-up-right file.

Override the default values by updating the properties either in the finance service valuesarrow-up-right yaml file or the environment-specific yaml file. The following are different properties.

System Integration User Details Configuration

Configure the following property either in the finance service valuesarrow-up-right yaml file or the environment-specific yaml file.

  • Add one user in the system for system integration - SIFINANCE mapped with role SYS_INTEGRATOR_FINANCE by using the user service createnovalidate API.

  • Find the createnovalidate API details below

Elastic Dashboard Configuration

To enable or disable an event to push the bills and vouchers to the elastic search indexer the below need to be configured either in the finance service valuesarrow-up-right yaml file or the environment-specific yaml file.

File store Configuration

Configure the following property either in the finance service valuesarrow-up-right yaml file or the environment-specific yaml file.

Quartz Scheduler Configuration

Configure the following property either in the finance service valuesarrow-up-right yaml file or the environment-specific yaml file.

DIGIT integration configuration

The finance service reads data from multiple other DIGIT services. The following are the different services the finance system reads data from. Update the domain URL of the respective service based on the service where it is running.

MDMS Configuration

  • Define business services mapping in the Business Service Mappingarrow-up-right json to integrate different business services like Property Tax, Trade License and FireNOC etc with Finance and to post vouchers like demand and receipt vouchers. Enabling and disabling voucher posting for any service can be configured here.

  • Define the Tax head and instrument glcode mappings in the Account Head Mappingarrow-up-right json. This file contains each tax head-wise glcode mapping and each instrument-wise glcode mapping.

  • Different instrument statuses can be defined in the Instrument Status Mappingarrow-up-right json file.

  • Different types of contractor bill templates are defined in the AccountCode Templatearrow-up-right file. These templates will be used in the contractor bill creation screen to auto-populate the account codes.

  • Service-wise glcode mapping for the online instrument type for the particular city is defined in the Online Instrument Typearrow-up-right json.

  • Define the business service-wise bank account mappings in the BankAccount Service Mappingarrow-up-right json file. These details are to be configured city-wise as the bank details are specific to a city.

MDMS search URL is configured in the Application Configurationarrow-up-right file.

Changes required to setup workspace in the local machine

  1. Set up the Finance service workspace by following the instructions provided in READMEarrow-up-right.

  2. After set-up is done, make the changes to the host file in the local machine, by mapping the domain URLs with a local IP address and saving the changes. Restart your local machine to make the host mapping effective.

Reference Docs

Title

Link

Co-existence finance code available

Adding new service and CI/CD

Creative Commons Licensearrow-up-rightAll content on this page by eGov Foundationarrow-up-right is licensed under a Creative Commons Attribution 4.0 International Licensearrow-up-right.

Last updated

Was this helpful?