DIGIT Docs
Works v1.0
  • DIGIT Knowledge Base
  • Local Governance
Works v1.0
  • Introducing DIGIT Works Platform
  • Platform
    • Release Notes
      • MDMS & Configuration Updates
      • Test cases
      • Data Migration
      • Service Build Updates
    • Platform Capabilities
    • Architecture
      • High Level Design
      • Low Level Design
        • Registries
          • Individual
          • Bank Account
          • Organization
        • Services
          • Project
          • Detailed Estimates
          • Contracts
          • Attendance
          • Muster Roll
          • Expense
          • Detailed Measurement Book
    • Functional Specifications
      • Project
      • Estimates
      • Organisation
      • Attendance Management
      • Measurements
      • Muster Roll
      • Expenditure / Billing
      • Contracts
    • Platform Services
      • Project
      • Estimate
      • Contracts
      • Attendance
      • Muster Roll
      • Expense
      • Bank Account
      • Organisation
      • Measurement Book Registry
      • Measurement Book Service
    • Source Code
    • Roadmap
    • Installation
    • Configuration
      • Service Configuration
        • Project
        • Estimate
        • Contract
        • Attendance
        • Muster Roll
        • Expense
        • Bank accounts
        • Organisation
        • Individual
        • Measurement Book Registry
        • Measurement Book Service
  • Products
    • Works App
      • UX Design
      • Technical Design
      • Field App User Manual
      • Configuration Manual
      • Technical Manual
  • Programmes
    • MUKTASoft v1.0
    • MUKTASoft v1.1
    • MUKTASoft v2.0
      • Specifications
        • Roadmap
        • User Persona
        • Functional Requirements
          • Product Requirements Document v2.0
          • User Stories
            • Time Extension
              • CBO: Create Time Extension
              • Time Extension Workflow
              • EMP: Create Time Extension
              • Search and View Time Extension
              • CBO: My Requests
              • CBO: Edit Time Extension
            • JIT-FS Integration
              • Fund Allocation Register
              • Create Payment Instruction
              • PIS: Payment Instruction Status
              • PAG: Payment Advice Status
              • PD: Update payment details
              • FD: Update Failed Payments
              • Create Revised Payment Instruction
              • Revised PI: Update payment details
              • Revised PI: Updated Failed Payments
              • Search Payment Instruction
              • View Payment Instruction
            • Work Order
              • Create Work Order
              • Work Order Workflow
              • Work Order Inbox Page
              • Create/ Submit Work Order
              • Edit/Submit Work Order
              • Verify & Forward
              • Send Back
              • Send Back To Originator
              • Reject Work Order
              • Approve
              • Search Work Order
              • Work Order PDF
            • Dashboard v1.0
              • Commons
              • KPIs: Actions Items
              • KPIs: SLA Breached
              • KPIs: Leaderboard
              • KPIs: Activities by Status
              • KPIs: Payments
              • KPIs: Expenditure
            • Schedule of rates
              • Create SOR
              • Search SOR
              • View SOR
              • Modify SOR
              • Add/ Modify Rate
            • Detailed Estimate
              • Create Detailed Estimate
              • Change in workflow
              • Change in edit estimate
              • Search and View Detailed Estimate
            • Detailed MB
              • Create MB
              • MB Inbox
              • MB Workflow
              • Search MB
              • View MB
              • Edit MB
            • Revise Estimate
              • Create Revised Estimate
              • Revised Estimate Workflow
              • View Revised Estimate
              • Generate Deviation Statement
      • Deployment
        • Release Notes
          • Service Build Updates
          • MDMS & Configuration Updates
          • Gate 2 Release Checklist
          • Test Cases
        • Deployment Guide
          • Dashboard Reindexing
        • MuktaSoft Services
          • IFMS Adapter
          • Expense Calculator
          • Works PDF
          • Mukta-services
          • SOR Uploader
          • Bill Scheduler
        • Configuration
          • Master Data Templates
            • Project Type
            • Target Demography
            • Unit Of Measurement (Units)
            • Overheads
            • Skill Category & Skills
            • Community-Based Organisation Roles
            • Scheme
            • Expense Heads
            • Standard Deductions
            • Organisation Type
            • Organisation Sub Type
            • Organisation Functional Category
            • Organisation Class/Rank
            • HRMS Sections/Departments
            • HRMS Designation
            • HRMS Employment Type
            • User Role
            • Organization
            • Wage Seeker
            • Tenants
            • Ward Boundary
            • Locality Boundary
            • Payment Advice Format
            • Users Data
            • Schedule of rates
            • SOR Type
            • SOR Subtype
            • SOR Variant
            • SOR Heads
          • Notifications & SMS Templates
          • Localisation
          • Platform Service Configuration
          • UI Configuration
            • Common Configurations
              • Role Configuration
              • MDMS Configuration
              • APK Generation
            • Modules
              • Project
              • Estimate
              • Work Order
                • Time Extension
              • Muster Roll
              • Bill
              • Organization
              • Wage Seeker
              • Wage Seeker (CBO Application)
              • Attendance (CBO Application)
              • Muster Roll (CBO Application)
              • Mukta Dashboard
              • Measurement
              • SOR's and Rates
              • IFMS Adapter UI
              • Estimate
                • Create Estimate
                • Estimate Worflow
                • Modify Estimate
              • Attendance Management
                • Inbox
                • View Attendance
                • Modify Attendance
              • Contracts
                • Create Contract
                • Contract Workflow
                • Modify Contract
        • Customisation
          • Works UI
            • UI Tech Flow Diagrams
          • UI Screens Customisation
            • Document Upload Container
            • CSS Customisation
            • Inbox/Search Screen
      • Implementation
        • Go Live Definition
        • Sucess Metrics
        • Adoption Metrics
        • Adoption Template
        • Implementation Plan & Checklist
        • Issue Management - Standard Operating Procedures
        • UAT Planning
          • UAT Test Case Scenarios
          • UAT Schedule Plan
          • Issue Reporting Template
          • UAT Credentials
        • Training Resources
          • User Manual
            • Getting Started
            • CBO User Manual
              • CBO - Getting Started
              • My Works
              • Track Attendance
              • Muster Rolls
              • My Bills
              • My Requests
            • Employee User Manual
              • Project
              • Estimate
              • Revise Estimate
              • Work Order
              • Time Extension
              • Billing
              • Registries
                • Wage Seekers
                • Organizations
              • Payments
              • Measurement Book
              • Schedule of Rates
          • Training Videos
  • COMMUNITY
    • Discussion Board
    • Issues
Powered by GitBook

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

On this page
  • Overview
  • Pre-requisites
  • Functionality
  • Deployment
  • Configuration
  • MDMS Configuration
  • Idgen Configuration
  • Workflow Configuration
  • Persister Configuration
  • Indexer Configuration
  • Inbox Configuration
  • Integration

Was this helpful?

Edit on GitHub
Export as PDF
  1. Platform
  2. Configuration
  3. Service Configuration

Contract

Detailed description of configuring the contract service

PreviousEstimateNextAttendance

Last updated 1 year ago

Was this helpful?

Overview

The contract service provides the functionality of a works contract.

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

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

  • MDMS

Functionality

Deployment

The below variables should be configured for the contract service in the Helm environment file before deployment. The Helm environment file will be located under:

https://github.com/{{ORG}}/DIGIT-DevOps/deploy-as-code/helm/environments/{{EnvironmentFile}}.yaml

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

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

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 must be translated into JSON in the role-action mapping module in MDMS.

Contract masters

The following masters are to be added as per the table below:

CBO Roles

OCI Roles

ContractType

Overheads

Idgen Configuration

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.

For more information on configuring workflow, please refer to the Workflow Service documentation here.

"BusinessServices": [
    {
      "tenantId": "pg",
      "businessService": "CONTRACT",
      "business": "contract-service",
      "businessServiceSla": 604800000,
      "states": [
        {
          "sla": null,
          "state": null,
          "applicationStatus": null,
          "docUploadRequired": false,
          "isStartState": true,
          "isTerminateState": false,
          "isStateUpdatable": true,
          "actions": [
            {
              "action": "CREATE",
              "nextState": "PENDING_FOR_VERIFICATION",
              "roles": [
                "WORK_ORDER_CREATOR"
              ]
            }
          ]
        },
        {
          "sla": 172800000,
          "state": "PENDING_FOR_VERIFICATION",
          "applicationStatus": "SUBMITTED",
          "docUploadRequired": false,
          "isStartState": false,
          "isTerminateState": false,
          "isStateUpdatable": true,
          "actions": [
            {
              "action": "VERIFY_AND_FORWARD",
              "nextState": "PENDING_FOR_APPROVAL",
              "roles": [
                "WORK_ORDER_VERIFIER"
              ]
            },
            {
              "action": "SEND_BACK",
              "nextState": "PENDING_FOR_CORRECTION",
              "roles": [
                "WORK_ORDER_VERIFIER"
              ]
            },
            {
              "action": "REJECT",
              "nextState": "REJECTED",
              "roles": [
                "WORK_ORDER_VERIFIER"
              ]
            }
          ]
        },
        {
          "sla": 86400000,
          "state": "PENDING_FOR_APPROVAL",
          "applicationStatus": "VERIFIED",
          "docUploadRequired": false,
          "isStartState": false,
          "isTerminateState": false,
          "isStateUpdatable": true,
          "actions": [
            {
              "action": "APPROVE",
              "nextState": "APPROVED",
              "roles": [
                "WORK_ORDER_APPROVER"
              ]
            },
            {
              "action": "SEND_BACK",
              "nextState": "PENDING_FOR_VERIFICATION",
              "roles": [
                "WORK_ORDER_APPROVER"
              ]
            },
            {
              "action": "REJECT",
              "nextState": "REJECTED",
              "roles": [
                "WORK_ORDER_APPROVER"
              ]
            },
            {
              "action": "SEND_BACK_TO_ORIGINATOR",
              "nextState": "PENDING_FOR_CORRECTION",
              "roles": [
                "WORK_ORDER_APPROVER"
              ]
            }
          ]
        },
        {
          "sla": 604800000,
          "state": "APPROVED",
          "applicationStatus": "APPROVED",
          "docUploadRequired": false,
          "isStartState": false,
          "isTerminateState": false,
          "isStateUpdatable": true,
          "actions": [
            {
              "action": "ACCEPT",
              "nextState": "ACCEPTED",
              "roles": [
                "ORG_ADMIN"
              ]
            },
            {
              "action": "DECLINE",
              "nextState": "PENDING_FOR_REASSIGNMENT",
              "roles": [
                "ORG_ADMIN"
              ]
            },
            {
              "action": "REJECT",
              "nextState": "REJECTED",
              "roles": [
                "ORG_ADMIN"
              ]
            }
          ]
        },
        {
          "sla": 86400000,
          "state": "PENDING_FOR_CORRECTION",
          "applicationStatus": "SENT_BACK",
          "docUploadRequired": false,
          "isStartState": true,
          "isTerminateState": false,
          "isStateUpdatable": true,
          "actions": [
            {
              "action": "EDIT",
              "nextState": "PENDING_FOR_VERIFICATION",
              "roles": [
                "WORK_ORDER_CREATOR"
              ]
            },
            {
              "action": "REJECT",
              "nextState": "REJECTED",
              "roles": [
                "WORK_ORDER_CREATOR"
              ]
            }
          ]
        },
        {
          "sla": 86400000,
          "state": "PENDING_FOR_REASSIGNMENT",
          "applicationStatus": "DECLINED",
          "docUploadRequired": false,
          "isStartState": true,
          "isTerminateState": false,
          "isStateUpdatable": true,
          "actions": [
            {
              "action": "EDIT",
              "nextState": "PENDING_FOR_VERIFICATION",
              "roles": [
                "WORK_ORDER_CREATOR"
              ]
            },
            {
              "action": "REJECT",
              "nextState": "REJECTED",
              "roles": [
                "WORK_ORDER_CREATOR"
              ]
            }
          ]
        },
        {
          "sla": null,
          "state": "ACCEPTED",
          "applicationStatus": "ACCEPTED",
          "docUploadRequired": false,
          "isStartState": false,
          "isTerminateState": true,
          "isStateUpdatable": false,
          "actions": [
          ]
        },
        {
          "sla": null,
          "state": "REJECTED",
          "applicationStatus": "REJECTED",
          "docUploadRequired": false,
          "isStartState": false,
          "isTerminateState": true,
          "isStateUpdatable": false,
          "actions": [
          ]
        }
      ]
    }
  ]

Persister Configuration

If not present, please make sure to add the persister YML file.

Make sure to restart MDMS and the persister service after adding the file at the above location.

Indexer Configuration

Inbox Configuration

{
  "module": "contract-service",
  "index": "contract-inbox",
  "allowedSearchCriteria": [
    {
      "name": "tenantId",
      "path": "Data.tenantId.keyword",
      "isMandatory": true,
      "operator": "EQUAL"
    },
    {
      "name": "workOrderNumber",
      "path": "Data.contractNumber.keyword",
      "isMandatory": false,
      "operator": "EQUAL"
    },
    {
      "name": "revisedWorkOrderNumber",
      "path": "Data.supplementNumber.keyword",
      "isMandatory": false,
      "operator": "EQUAL"
    },
    {
      "name": "status",
      "path": "Data.currentProcessInstance.state.uuid.keyword",
      "isMandatory": false
    },
    {
      "name": "projectId",
      "path": "Data.additionalDetails.projectId.keyword",
      "isMandatory": false,
      "operator": "EQUAL"
    },
    {
      "name": "projectType",
      "path": "Data.additionalDetails.projectType.keyword",
      "isMandatory": false,
      "operator": "EQUAL"
    },
    {
      "name": "ward",
      "path": "Data.additionalDetails.ward.keyword",
      "isMandatory": false,
      "operator": "EQUAL"
    },
    {
      "name": "locality",
      "path": "Data.additionalDetails.locality.keyword",
      "isMandatory": false,
      "operator": "EQUAL"
    },
    {
      "name": "wfStatus",
      "path": "Data.contractStatus.keyword",
      "isMandatory": false
    },
    {
      "name": "assignee",
      "path": "Data.currentProcessInstance.assignes.uuid.keyword",
      "isMandatory": false
    }
  ],
  "sortBy": {
    "path": "Data.auditDetails.createdTime",
    "defaultOrder": "DESC"
  },
  "sourceFilterPathList": [
    "Data.contractNumber",
    "Data.businessService",
    "Data.additionalDetails.projectName",
    "Data.additionalDetails.projectId",
    "Data.additionalDetails.orgName",
    "Data.currentProcessInstance",
    "Data.totalContractedAmount",
    "Data.auditDetails"
  ]
}

Restart the Inbox service after updating the above configuration

Integration

This service provides APIs to create, update and search for contracts. Refer to the for detailed scope and functionality. Low-level technical design is

Refer to the .

Add contract-service related environment variables’ value like the way it's done in ’ environment YAML file. Search for "contract-service" in the file.

Add the ‘’ 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, please add the way it's done .

Make sure to add the DB(Postgres and flyway) username & password in the respective environment secret yaml file. Follow the steps .

Make sure to add the DIGIT core services-related secrets configured in the respective environment secret file. Follow the steps .

Configure actions, roles and role-action mappings from the table below. Follow the steps .

Example - available .

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

Please make sure that the file is present in the configs repository in the below location.

Please make sure that the file is present in the configs repository in the below location.

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

The API specifications for this service are located . Postman scripts are available for reference to understand the request payloads.

here
Low-level design
Functional specifications
functional specifications here
available here.
sample here
‘dev
egov-mdms-service
here
here
here
here
here
is available here
contract-service-persister.yml
https://github.com/<YOUR ORGANISATION>/works-configs/tree/DEV/egov-persister
contractservices-indexer.yml
https://github.com/{{your organisation}}/works-configs/tree/DEV/egov-indexer
inbox configuration file
here
here
https://github.com/egovernments/egov-mdms-data/blob/0dd049ffddbc7c6078b940b5eb9eb4951eb8996a/data/pg/works/ContractCBORoles.json
https://github.com/egovernments/egov-mdms-data/blob/0dd049ffddbc7c6078b940b5eb9eb4951eb8996a/data/pg/works/ContractOfficerIncharge.json
https://github.com/egovernments/egov-mdms-data/blob/0dd049ffddbc7c6078b940b5eb9eb4951eb8996a/data/pg/works/ContractType.json
https://github.com/egovernments/egov-mdms-data/blob/0dd049ffddbc7c6078b940b5eb9eb4951eb8996a/data/pg/works/Overheads.json