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. Currently, this service is shared across the Health and Works platforms. All Works projects start with a project construct. The Works platform uses only 3 primary APIs: project create, update and search.

For a deeper understanding, refer to the following:

Low-level design

Functional specifications

Key Functionalities

  • Creating, updating, and searching for a project

  • Adding staff, tasks, resources and facilities to a project

Code

Module code

Deployment in Works

Configuration Details

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 exactly the same as what is 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 following table 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 persister file project-management-system-persister.yml as defined here.

Indexer Configuration

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

Other Master Data Configuration

1. ProjectType

2. Department

3. Boundary Data

4. Nature of Work

Deployment Details

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 Details

API Spec

Base path: /project/

Refer to the API spec for a description of the APIs.

Documentation for this service is available here.

Postman Collection

Click here to access the Postman collection used to test APIs. Import the link into Postman and follow the instructions to run the collection. Use these to understand the request payloads.

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