Contract

Detailed description of configuring the contract service

Overview

The contract service captures work orders or purchase orders. It validates the work order against the estimate(s). Line items from one estimate can be put in a contract. Line items from multiple estimates can be aggregated into one work order as well. The contract service validates the line items from each estimate as part of Create and Update.

Pre-requisites

A running DIGIT platform is needed to deploy the contract service. Specifically, the following dependencies are needed:

  • Estimate

  • Organisation

  • User

  • Workflow

  • IDGen

  • HRMS

  • Notification

  • Persister

  • Indexer

Key Functionalities

This service provides APIs to create, update and search for contracts.

  • Models a real-world work order/contract

  • All line items of a single estimate can be put in a contract.

  • Line items from multiple estimates can also be grouped into a contract.

  • The service validates the estimate line items and ensures no duplication happens in including estimate line items in a contract.

  • Terms and conditions, milestones and payment calendar are WIP

Refer to the functional specifications here for detailed scope and functionality. Low-level technical design is available here.

Code - Contractsarrow-up-right

Deployment

The variables below should be configured for the contract service in the Helm environment file before deployment. Click herearrow-up-right to find the Helm environment file.

Refer to the sample herearrow-up-right.

  • Add configurations for db-host, db-name, db-url, domain, and core platform services (Idgen, workflow, user, etc.) in the YAML file.

  • Search for "contract-service" in the environment YAML file. Add the contract-service environment variables similar to how it’s done in other entries.

  • Add the ‘egov-mdms-servicearrow-up-right’ related configuration to the respective environment YAML file. Make sure you change the gitsync.branch name.

  • Check the contract-service persister file is added to the egov-persister.perister-yml-path variable. If not, update the values as given herearrow-up-right.

  • Make sure to add the DB (Postgres and flyway) username & password in the respective environment secret YAML file. Refer to the details given herearrow-up-right.

  • Make sure to add the DIGIT core services-related secrets configured in the respective environment secret file. Refer to the details given herearrow-up-right.

circle-info

Restart egov-mdms-service, egov-persister, egov-indexer, inbox, egov-workflow-v2, egov-accesscontrol and zuul after the above changes are performed.

Configuration

MDMS Configuration

Configure actions, roles and role-action mappings from the table below. Refer to the details available here.

Role
APIs

WORK_ORDER_CREATOR

/contract/v1/_create

/contract/v1/_update

/contract/v1/_search

/wms/contract/_search

WORK_ORDER_VERIFIER

/contract/v1/_update

/contract/v1/_search

/wms/contract/_search

WORK_ORDER_APPROVER

/contract/v1/_update

/contract/v1/_search

WORK_ORDER_VIEWER

/contract/v1/_search

/wms/contract/_search

EMPLOYEE_COMMON

/inbox/v2/_search

These have to be translated into JSON in the role-action mapping module in MDMS.

Example - available herearrow-up-right.

Other masters to be added:

Add the following masters as per the links below:

Idgen Configuration

Make sure the id format is configured in the ‘IdFormat.json’ file of the ‘common-masters’ module. The sample is available herearrow-up-right.

IDGen Format

{

"format": "WO/[fy:yyyy-yy]/[SEQ_CONTRACT_NUM]",

"idname": "contract.number"

} {

"format": "RW/[fy:yyyy-yy]/[SEQ_CONT_SUPPLEMENT_NUM]",

"idname": "contract.supplement.number"

}

Workflow Configuration

Contract Workflow

The following workflow JSON needs to be put in the request body of the /egov-workflow-v2/egov-wf/businessservice/_create API.

circle-info

For more information on configuring workflow, refer to the Workflow Servicearrow-up-right documentation.

Sample CURL is also included below.

circle-exclamation

Revised Contract Workflow

Sample CURL is also included below.

circle-exclamation

Persister Configuration

Make sure that the file contract-service-persister.ymlarrow-up-right is present in the configs repository in the below location.

https://github.com/<YOUR ORGANISATION>/works-configs/tree/DEV/egov-persisterarrow-up-right

In case it is not available, add the persister YML file.

circle-exclamation

Indexer Configuration

Make sure that the contract service indexer filearrow-up-right is present in the configs repository herearrow-up-right.

Inbox Configuration

In the MDMS repository, locate the inbox configuration filearrow-up-right. Make sure the following JSON is added to the inbox configuration:

circle-exclamation

Integration

The API specifications for this service are located here.

Click herearrow-up-right to access the Postman scripts to understand the request payloads.

Was this helpful?