Project

Steps to configure the project service

Overview

The project service provides APIs to create, update and manage a generic project. A project can have one or more of the following constructs: staff, tasks, beneficiaries and facilities. This service is shared across multiple eGov missions.

The source code for this service is available here. Refer to the below docs for a deeper understanding of this service.

Low-level design

Functional specifications

Configuration

MDMS Configuration

roles.json

 {
      "code": "PROJECT_CREATOR",
      "name": "PROJECT CREATOR",
      "description": "Project Creator"
    },
    {
      "code": "PROJECT_VIEWER",
      "name": "PROJECT VIEWER",
      "description": "Project Viewer"
    },

Define (if not present already) and assign the EMPLOYEE_COMMON role to all project actors.

actions.json

Below are the actions or APIs exposed by the Project service used by the Works platform. Note that the "id" in the attributes needs to be unique and may be different in the implementation environment. It need not be the same as shown below.

{
      "id": 51,
      "name": "Create Project",
      "url": "/pms/project/v1/_create",
      "parentModule": "project-management-system",
      "displayName": "Create Project",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "project-management-system",
      "code": "null",
      "path": ""
    },
    {
      "id": 52,
      "name": "Search Project",
      "url": "/pms/project/v1/_search",
      "parentModule": "project-management-system",
      "displayName": "Search Project",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "project-management-system",
      "code": "null",
      "path": ""
    },
    {
      "id": 53,
      "name": "Update Project",
      "url": "/pms/project/v1/_update",
      "parentModule": "project-management-system",
      "displayName": "Update Project",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "project-management-system",
      "code": "null",
      "path": ""
    },

roleactions.json

The table below shows the mapping between the APIs and the roles:

Role Code
Description
API

PROJECT_CREATOR

Project Creator

/project/v1/_create

/project/v1/_update

/project/v1/_search

PROJECT_VIEWER

Project Viewer

/project/v1/_search

EMPLOYEE_COMMON

Employee Common

/inbox/v2/_search

The following role-action mappings derived from the above table are configured for the Project Service in the roleactions.json in MDMS. A sample is provided below. Make sure the action ID is correct and corresponds to actions.json.

{
      "id": 51,
      "name": "Create Project",
      "url": "/project/v1/_create",
      "parentModule": "project-management-system",
      "displayName": "Create Project",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "project-management-system",
      "code": "null",
      "path": ""
    },
    {
      "id": 52,
      "name": "Search Project",
      "url": "/project/v1/_search",
      "parentModule": "project-management-system",
      "displayName": "Search Project",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "project-management-system",
      "code": "null",
      "path": ""
    },
    {
      "id": 53,
      "name": "Update Project",
      "url": "/project/v1/_update",
      "parentModule": "project-management-system",
      "displayName": "Update Project",
      "orderNumber": 0,
      "enabled": false,
      "serviceCode": "project-management-system",
      "code": "null",
      "path": ""
    },

IdGen Format

Add Id Format as configured in the ‘IdFormat.json’ file of the ‘common-masters’ module here. This format is used to generate the unique ID of the project.

{
    "format": "PJ/[fy:yyyy-yy]/[cy:MM]/[SEQ_PROJECT_NUM]",
    "idname": "project.number"
}

Persister Configuration

Add the persister file project-management-system-persister.yml as defined here.

Indexer Configuration

Add indexer file projectmanagementsystem-indexer.yml as defined here.

Master Data Configuration

1. ProjectType

2. Department

3. Boundary Data

4. Nature of Work

Deployment

The image name of the service is available in the release charts in the DevOps repository. The service can be deployed using Helm commands.

Environment variables to be configured in the Helm chart for the service are:

NOTE: Restart egov-mdms-service, egov-accesscontrol, egov-persister, audit-service, egov-indexer and zuul after the above changes are performed.

Integration

Refer to the API spec for a description of the APIs. Find the Postman scripts here to understand the request payloads.

Last updated

All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.