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:
Key Functionalities
Creating, updating, and searching for a project
Adding staff, tasks, resources and facilities to a project
Code
Configuration Details
MDMS Configuration
roles.json
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.
roleactions.json
The following table shows the mapping between the APIs and the roles:
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.
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.
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
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:
Add the ‘db-host’,’db-name’,’db-url’,’domain’ and all the digit core platform services configurations (Idgen, workflow, user etc.) in respective environments yaml file.
Add project-management-system related environment variables values. A sample from a ‘dev’ environment yaml file is provided below:
Add the ‘egov-mdms-service’ related configuration to the respective environment yaml file. Make sure you change the git-sync branch name to one that is appropriate for the environment.
Check the project management system persister file is added in the egov-persister.persister-yml-path variable. If not, please add the way it's done here.
Check the project management system indexer file is added in the egov-indexer.egov-indexer-yaml-repo-path variable. If not, please add the way it's done here.
Check the project management system persister file is added in the audit-service.persist-yml-path variable. If not, please add the way it's done here.
Make sure to add the DB(Postgres and flyway) username & password in the respective environment secrets yaml file the way it's done here.
Make sure to add the DIGIT core service-related secrets that are configured in the respective environment secret file the way it's done here.
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.