DIGIT Docs
v0.3
  • DIGIT Knowledge Base
  • Local Governance
v0.3
  • Introducing HCM Console
  • Release Notes
    • v0.3: Release Notes
      • v0.3 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
      • HCM Console Test Cases V0.3
      • Gate 2 Release Checklist
        • Release Showcase
    • v0.2: Release Notes
      • v0.2 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
    • v0.1: Release Notes
      • v0.1 Technical Release Summary
      • Service Build Updates
      • Master Data Management Service (MDMS) & Configuration Updates
      • Gate 2 Release Checklist
  • PRODUCT SPECIFICATION
    • User Manual
    • Product Requirement Document (PRD)
    • Functional Specifications
  • TECHNOLOGY
    • Architecture
      • High Level Design
        • Project Factory
      • Low Level Design
        • Project Factory (Campaign Manager)
          • Create Campaign
          • Update Campaign
          • Manage Resources
        • Admin Console
          • Campaign Creation Flow
          • Campaign Updation Flow
          • Checklist Management
      • Services
        • Project Factory
          • Manage Campaign APIs
            • Microplan Integration
            • Update an Ongoing Campaign
          • Manage Data APIs
            • Target Upload
          • Manage Boundary APIs
            • Boundary Generation
            • Boundary Management
            • Boundary Management Through GeoJson
        • HCM Console Web
          • User Interface Design
          • Manage Campaign
            • Setup Campaign (New Campaign)
              • Campaign Details
              • Boundary Details
              • Delivery Details
              • Resource Upload Details
              • Summary Screen
              • Setup Campaign from Microplan
              • Setup and Implementation of Campaign
              • IRS Console Support
            • My Campaign
              • My Campaign Actions
              • Campaign Timeline
              • Update Campaign (Boundary/ Resources)
              • Update Campaign Dates
          • Boundary Data Management
          • Manage Checklist
            • Default Templates
  • SETUP
    • Installation
    • Configuration
      • UI Configurations
      • Steps to Enable a New Campaign Type in Console
      • Advanced Configurations
    • Quality Assurance Testing
      • Automation - Run HCM Console Script
        • User
        • Target
        • Facility
      • Performance Testing
  • GENERAL
    • Product Roadmap
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
  • Technical Design Document: Manage Resources API Flows
  • Overview
  • Project Factory Resources Data Create with Retry Logic
  • Template Generate API Flow (forceUpdate = true)
  • Template Generate API During Update Campaign Flow (forceUpdate = true)
  • Project Factory Resources Data Search and Download
  • API Sequence Diagrams
  • Conclusion

Was this helpful?

Export as PDF
  1. TECHNOLOGY
  2. Architecture
  3. Low Level Design
  4. Project Factory (Campaign Manager)

Manage Resources

Technical Design Document: Manage Resources API Flows

Overview

This document outlines the various API flows and interactions for the Project Factory, focusing on resource data creation with retry logic, template generation, campaign update flows, and data search and download processes. The aim is to manage and automate various aspects of resource and campaign data efficiently using the Project Factory services.

Project Factory Resources Data Create with Retry Logic

Description: This flow describes how the Project Factory handles resource data creation with retry logic. It ensures data consistency and reliability by retrying operations if failures occur.

Sequence of Operations:

  1. Client Request Initiation:

    • The client sends a request to the Project Factory with filestoreid and type.

  2. MDMS Service Interaction:

    • Project Factory retrieves the type schema from the MDMS Service.

    • MDMS Service returns the schema, which is then validated.

  3. Data Validation:

    • The Project Factory validates the data against the MDMS schema.

    • If validation is successful, it informs the client that data processing has started.

    • If validation fails, an error message is returned, and the user must resubmit.

  4. File Handling:

    • The Project Factory requests a file download from the FileStore Service.

    • Upon receiving the file, JSON data is created from the file of the desired type.

  5. Data Creation and Retry Logic:

    • Data is validated according to the schema.

    • Normal Create:

      • Data is created in the respective service, and status is tracked.

      • A loop continues until retry attempts exceed the maximum retries, or no failed data remains.

    • Bulk Create with Retry:

      • Data is created in the respective service, and the status is checked.

      • A search is conducted using the generateApi search.

      • The loop continues under the same conditions as the normal create process.

  6. Database Update:

    • The file is enriched with the created ID and sent back to the FileStore Service.

    • The updated file is received, and data is persisted in the database with a status of 'created' and the processed filestoreid.

Template Generate API Flow (forceUpdate = true)

Description: This flow is triggered when a client sends a generate request with forceUpdate = true. It checks for existing data and creates a new row with the status inProgress if necessary.

Sequence of Operations:

  1. Client Request Initiation:

    • The client sends a generate request with the specified type and forceUpdate = true.

  2. Validation and Data Check:

    • The Project Factory validates the type against predefined types and hierarchytype.

    • A check is performed to see if previous data exists. If it does, the data is marked as expired.

  3. Database and Response:

    • A new row is created with null fileStoreId and status inProgress.

    • The database is updated, and a success response is sent back to the client.

  4. Data Fetch and Storage:

    • The Project Factory fetches the template from the MDMS Service based on the type.

    • Data is consolidated and stored in the FileStore Service, which returns a filestoreid.

    • The database is updated with the new filestoreid.

Template Generate API During Update Campaign Flow (forceUpdate = true)

Description: This flow is initiated when a generate request is sent due to a boundary change in an ongoing campaign.

Sequence of Operations:

  1. Boundary Change Trigger:

    • The Project Factory sends a generate request with campaignId, type, and forceUpdate = true.

  2. Validation and Data Check:

    • The type is validated against predefined types and hierarchytype.

    • Previous data is checked, and if found, marked as expired.

    • The campaign is searched in the database based on the provided campaignId and its parent campaign ID.

  3. Database and Response:

    • A new row is created with null fileStoreId and status inProgress.

    • The database is updated, and a response is provided.

  4. File Update and Data Consolidation:

    • The Project Factory fetches file details from the FileStore Service using the parent campaign object.

    • The sheet is updated, freezing all the data.

    • If new boundaries are added, boundary relation data is fetched.

    • Data is consolidated, and stored in the FileStore, and the database is updated with the new filestoreid.

Project Factory Resources Data Search and Download

Description: This flow allows the client to search and download resource data based on a provided ID and type.

Sequence of Operations:

  1. Client Request Initiation:

    • The client sends a request with the id and type.

  2. Database Query:

    • The Project Factory checks the created resource based on the provided ID.

    • The corresponding resource details row is fetched from the database.

  3. Response to Client:

    • The Project Factory sends back the created resource response to the client.

API Sequence Diagrams

During Create flow

During Update Flow

Conclusion

The outlined API flows are crucial for handling resource data creation, management, and retrieval efficiently. They ensure data consistency, integrity, and seamless interaction between various services, making the Project Factory a robust system for managing campaign data. Implementing the retry logic, data validation, and template generation processes helps maintain a reliable and scalable architecture.

PreviousUpdate CampaignNextAdmin Console

Last updated 8 months ago

Was this helpful?

Data Create flow