Campaign Updation Flow

Technical Documentation: Update Campaign Web Flow

Overview

This document describes the web flow for updating an existing campaign using the Admin Console. The process involves interactions between the user and several backend services, ensuring the campaign data is updated correctly and validated before finalizing changes.

Actors and Participants

  • User: The person interacting with the Admin Console to update an existing campaign.

  • CampaignManager (Admin Console): The primary interface that the user uses to manage and update campaign information.

  • ProjectFactory: Responsible for handling the creation and updating of campaign objects and validating the data.

  • BoundaryService: Provides the boundary hierarchy definitions and relationship data necessary for the campaign.

  • MDMSService: Supplies master data such as project types, hierarchy configurations, and other templates.

  • FileStoreService: Manages the storage and retrieval of files related to the campaign.

Sequence Flow

1. Initiating Campaign Update

  • User: Begins the update process by selecting an existing campaign from the "My Campaign" screen within the Admin Console.

  • CampaignManager: Receives the request to update a specific campaign and retrieves the campaign object using its unique ID.

2. Fetching Campaign Data

  • CampaignManager sends a request to ProjectFactory to fetch the campaign object based on the provided campaign ID.

    • ProjectFactory responds with the campaign object containing the current campaign details.

3. Fetching Boundary Information

  • CampaignManager requests BoundaryService to fetch boundary hierarchy definitions based on the campaign's hierarchy type.

    • BoundaryService responds with the boundary hierarchy definition.

  • CampaignManager requests BoundaryService to fetch boundary relationship data based on the hierarchy type.

    • BoundaryService responds with the boundary relationship data.

4. User Data Input

  • User: Updates the necessary fields, such as boundary delivery configuration and other campaign-specific details, using the Admin Console.

  • CampaignManager: Sends the updated information to ProjectFactory to create or update the campaign object, storing it with an action status of "draft".

5. Template Generation

  • ProjectFactory: Automatically triggers the generation of templates for different resources, including:

    • Target templates

    • Facility templates

    • User templates

6. Template Download and Storage

  • User: Downloads the generated templates for each resource type via the Admin Console.

  • CampaignManager: Sends a request to FileStoreService to store the downloaded files.

    • FileStoreService responds with a filestoreid that uniquely identifies the stored file.

7. Data Validation

  • CampaignManager: Sends the data and the filestoreid to ProjectFactory for validation.

    • ProjectFactory responds with a unique validation ID, as the validation process may take some time.

  • CampaignManager: Periodically checks the validation status using the unique validation ID.

8. Validation Outcome

  • ProjectFactory:

    • If validation is successful:

      • Responds with a success message.

      • CampaignManager: Displays a success message to the user, indicating that they can proceed to the next step.

    • If validation fails:

      • Responds with an error message detailing the validation failure.

      • CampaignManager: Displays the error message to the user, prompting them to correct the errors and re-upload the files.

9. Final Campaign Update

  • User: Once all required data is filled in and validated, the user reviews the summary of the campaign data and clicks on the "Update Campaign" button.

  • CampaignManager: Sends a request to ProjectFactory with the campaign update API, marking the action as "update".

10. Campaign Update Outcome

  • ProjectFactory:

    • If the update is successful:

      • Responds with a success message, indicating that the campaign update has started.

      • CampaignManager: Displays a success message to the user, confirming that the campaign has been updated successfully.

    • If the update fails:

      • Responds with an error message detailing the failure.

      • CampaignManager: Displays the error message to the user, prompting them to correct any issues and try again.

Error Handling

  • Validation Failures: If validation fails at any stage (e.g., during file validation or input data checks), the CampaignManager will notify the user of the specific issues. The user must resolve these issues and re-upload the necessary data to proceed.

  • Service Errors: If any of the services (e.g., BoundaryService, ProjectFactory) encounter an error during processing, the CampaignManager will display an error message, detailing the problem and suggesting corrective actions.

Web Sequence Diagram

Conclusion

This document outlines the flow for updating an existing campaign using the Admin Console. The structured sequence ensures that any changes to the campaign are thoroughly validated and processed, minimizing errors and ensuring the integrity of the campaign data. By following this flow, users can confidently update campaigns, knowing that all necessary steps are taken to verify and finalize their changes.

Last updated

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