Skip to content

FinalPlanController

  • Namespace: Insorce.Controllers
  • Project: Andromeda.Web

Overview

The FinalPlanController manages the final planning phase of projects, providing comprehensive data views and processing related to project schedules, financials, HR, infrastructure, controls, and cost allocations. It supports project managers and stakeholders in reviewing, analyzing, and adjusting final project plans through multiple detailed screens and data outputs.

Feature Summary

  • Implements final project plan review, scheduling, financial, HR, infrastructure, and control data management.
  • Supports retrieval, aggregation, and transformation of project-related data including activities, risks, costs, FX rates, and schedules.
  • Enables downloading of project measures and schedule files, and updating of allocation heads and cost data.
  • Provides critical path analysis and cycle time calculations for project activities.
  • Facilitates data-driven decision making through detailed views and JSON data endpoints.

UX Summary

  • Multiple views render detailed project data to enhance user understanding and decision-making.
  • Data preparation impacts page load times and responsiveness, with some methods noted for potential UX degradation due to null returns or slow processing.
  • JSON endpoints support dynamic UI updates and user feedback, including success/failure notifications.
  • Some views contain invalid or incomplete fields that may affect form validation and user input handling.
  • Redirections and messaging influence workflow and interface responsiveness.

Data Dependencies

  • Relies on project data repositories for activities, risks, financials, infrastructure, and schedules.
  • Uses FX rate services to retrieve and refresh currency exchange rates.
  • Aggregates data from multiple models including configuration details, month data, and activity variable costs.
  • Processes file system access for schedule and project-related files with noted risks around input validation.
  • Performs JSON serialization/deserialization for data exchange and persistence.

Authentication / Authorization Notes

  • Controller methods generally require authenticated access to project-specific data.
  • No explicit permission schemes detailed, but data access implies role-based restrictions for project managers and stakeholders.
  • Some methods handle POST requests for data modification, necessitating secure input validation to prevent injection and tampering.
  • Security risks identified include potential injection vulnerabilities and unvalidated inputs in file handling and JSON deserialization.

Controller Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_Entities_ActivityActorArrow_Clone["Andromeda.Core.Entities.ActivityActorArrow.Clone"]
    Andromeda_Core_Entities_ActivityVariableCost_AssignProperties["Andromeda.Core.Entities.ActivityVariableCost.AssignProperties"]
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_CostAllocations_SetCost["Andromeda.Core.Entities.CostAllocations.SetCost"]
    Andromeda_Core_Entities_Gantt_ActivityGantt["Andromeda.Core.Entities.Gantt.ActivityGantt"]
    Andromeda_Core_Entities_Gantt_CycleHourlyEffortByActivity["Andromeda.Core.Entities.Gantt.CycleHourlyEffortByActivity"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor["Andromeda.Core.Entities.Gantt.HourlyEffortByActor"]
    Andromeda_Core_Entities_Gantt_TeamCountByHourly["Andromeda.Core.Entities.Gantt.TeamCountByHourly"]
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation["Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation"]
    Andromeda_Core_Entities_ProjectData_GetActivities["Andromeda.Core.Entities.ProjectData.GetActivities"]
    Andromeda_Core_Entities_ProjectData_GetActors["Andromeda.Core.Entities.ProjectData.GetActors"]
    Andromeda_Core_Entities_ProjectData_GetArrows["Andromeda.Core.Entities.ProjectData.GetArrows"]
    Andromeda_Core_Entities_ProjectData_GetClusterObj["Andromeda.Core.Entities.ProjectData.GetClusterObj"]
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities["Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities"]
    Andromeda_Core_Entities_ProjectData_GetConnectivityDetails["Andromeda.Core.Entities.ProjectData.GetConnectivityDetails"]
    Andromeda_Core_Entities_ProjectData_GetDelooperObj["Andromeda.Core.Entities.ProjectData.GetDelooperObj"]
    Andromeda_Core_Entities_ProjectData_GetInfraDetails["Andromeda.Core.Entities.ProjectData.GetInfraDetails"]
    Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails["Andromeda.Core.Entities.ProjectData.GetInfraMasterDetails"]
    Andromeda_Core_Entities_ProjectData_GetObjActivities["Andromeda.Core.Entities.ProjectData.GetObjActivities"]
    Andromeda_Core_Entities_ProjectData_GetObjRisks["Andromeda.Core.Entities.ProjectData.GetObjRisks"]
    Andromeda_Core_Entities_ProjectData_GetObjectiveExistance["Andromeda.Core.Entities.ProjectData.GetObjectiveExistance"]
    Andromeda_Core_Entities_ProjectData_GetOfficeList["Andromeda.Core.Entities.ProjectData.GetOfficeList"]
    Andromeda_Core_Entities_ProjectData_GetOfficePremises["Andromeda.Core.Entities.ProjectData.GetOfficePremises"]
    Andromeda_Core_Entities_ProjectData_GetPeakActivityUnits["Andromeda.Core.Entities.ProjectData.GetPeakActivityUnits"]
    Andromeda_Core_Entities_ProjectData_GetRiskControls["Andromeda.Core.Entities.ProjectData.GetRiskControls"]
    Andromeda_Core_Entities_ProjectData_GetSchedData["Andromeda.Core.Entities.ProjectData.GetSchedData"]
    Andromeda_Core_Entities_ProjectData_GetTeamMinFTE["Andromeda.Core.Entities.ProjectData.GetTeamMinFTE"]
    Andromeda_Core_Entities_ProjectData_GetUndesiredPaths["Andromeda.Core.Entities.ProjectData.GetUndesiredPaths"]
    Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls["Andromeda.Core.Entities.ProjectData.GetobjActivityRiskControls"]
    Andromeda_Core_Entities_Sched_GetHourEffort["Andromeda.Core.Entities.Sched.GetHourEffort"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter["Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Models_ModelHelper_ProjectTimeZone["Andromeda.Core.Models.ModelHelper.ProjectTimeZone"]
    Andromeda_Core_Models_ModelHelper_RefreshFxRates["Andromeda.Core.Models.ModelHelper.RefreshFxRates"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths["Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    FinalPlanController_AllocatedCost["FinalPlanController.AllocatedCost"]
    FinalPlanController_CostAllocation["FinalPlanController.CostAllocation"]
    FinalPlanController_DeleteAllocationHead["FinalPlanController.DeleteAllocationHead"]
    FinalPlanController_DeleteMasterHead["FinalPlanController.DeleteMasterHead"]
    FinalPlanController_DownLoadSchedFiles["FinalPlanController.DownLoadSchedFiles"]
    FinalPlanController_DownloadProjectMeasures["FinalPlanController.DownloadProjectMeasures"]
    FinalPlanController_GetBetweenActsPathsCycleTime["FinalPlanController.GetBetweenActsPathsCycleTime"]
    FinalPlanController_GetPathActivitiesCycleTimeByProduct["FinalPlanController.GetPathActivitiesCycleTimeByProduct"]
    FinalPlanController_InputSummary["FinalPlanController.InputSummary"]
    FinalPlanController_ProcessOutput["FinalPlanController.ProcessOutput"]
    FinalPlanController_RefreshFxRates["FinalPlanController.RefreshFxRates"]
    FinalPlanController_SchedData["FinalPlanController.SchedData"]
    FinalPlanController_UpdateHead["FinalPlanController.UpdateHead"]
    FinalPlanController_controlsData["FinalPlanController.controlsData"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_Entities_ActivityVariableCost_AssignProperties --> Andromeda_Core_Entities_Actor_GetLocation
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_GetHourEffort
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    Andromeda_Core_Entities_Gantt_TeamCountByHourly --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    Andromeda_Core_Entities_Gantt_TeamCountByHourly --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    Andromeda_Core_Entities_ProjectData_GetActivities --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Entities_ProjectData_GetActors --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Entities_ProjectData_GetActors --> Andromeda_Core_Models_ModelHelper_ProjectTimeZone
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Entities_ProjectData_GetRiskControls --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Models_ModelHelper_RefreshFxRates --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Models_ModelHelper_RefreshFxRates --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Models_ModelHelper_RefreshFxRates --> Andromeda_Core_Models_ModelHelper_RefreshFxRates
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks --> Andromeda_Core_Extensions_LinqExtensions_GetPathIds
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks --> Andromeda_Core_Services_ProcessExtensions_FindByID
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    FinalPlanController_AllocatedCost --> Andromeda_Core_Entities_ActivityVariableCost_AssignProperties
    FinalPlanController_AllocatedCost --> Andromeda_Core_Entities_Activity_TotalEffort
    FinalPlanController_AllocatedCost --> Andromeda_Core_Entities_CostAllocations_SetCost
    FinalPlanController_CostAllocation --> Andromeda_Core_Entities_Actor_GetLocation
    FinalPlanController_DeleteAllocationHead --> Andromeda_Core_DataManager_Execute
    FinalPlanController_DeleteMasterHead --> Andromeda_Core_DataManager_Execute
    FinalPlanController_DownLoadSchedFiles --> Andromeda_Core_Utility_Compress_CreateZip
    FinalPlanController_DownloadProjectMeasures --> Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation
    FinalPlanController_GetBetweenActsPathsCycleTime --> Andromeda_Core_Entities_Arrow_Clone
    FinalPlanController_GetBetweenActsPathsCycleTime --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    FinalPlanController_GetBetweenActsPathsCycleTime --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    FinalPlanController_GetPathActivitiesCycleTimeByProduct --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    FinalPlanController_GetPathActivitiesCycleTimeByProduct --> Andromeda_Core_Services_ProcessExtensions_FindByID
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_Activity_Clone
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_Arrow_Clone
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetActivities
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetActors
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetArrows
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetClusterObj
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetConnectivityDetails
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetDelooperObj
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetInfraDetails
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetObjActivities
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetObjRisks
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetObjectiveExistance
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetOfficeList
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetOfficePremises
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetPeakActivityUnits
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetRiskControls
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetSchedData
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetTeamMinFTE
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetUndesiredPaths
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls
    FinalPlanController_InputSummary --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    FinalPlanController_InputSummary --> Andromeda_Core_Services_SignalRMsg_SendMessage
    FinalPlanController_InputSummary --> Insorce_Helpers_ClusterHelper_GenerateCluster
    FinalPlanController_ProcessOutput --> Andromeda_Core_LoggingManager_Debug
    FinalPlanController_RefreshFxRates --> Andromeda_Core_DataManager_GetDataList
    FinalPlanController_RefreshFxRates --> Andromeda_Core_LoggingManager_Error
    FinalPlanController_RefreshFxRates --> Andromeda_Core_Models_ModelHelper_RefreshFxRates
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_ActivityGantt
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_CycleHourlyEffortByActivity
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_HourlyEffortByActor
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_TeamCountByHourly
    FinalPlanController_UpdateHead --> Andromeda_Core_DataManager_Execute
    FinalPlanController_controlsData --> Andromeda_Core_Entities_ActivityActorArrow_Clone
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Services_KClusters_RunClustering
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse

System Dependencies

Incoming Dependencies (Fan-In): None

Outgoing Dependencies (Fan-Out): None

Cycle Detection

No dependency cycles detected for this controller.

View → Action Mapping

Action View Model Path
allocatedcost AllocatedCost IEnumerable<Andromeda.Core.Entities.ActivityVariableCost> Andromeda.Web\Views\FinalPlan\AllocatedCost.cshtml
controloutput ControlOutput - Andromeda.Web\Views\FinalPlan\ControlOutput.cshtml
costallocation CostAllocation - Andromeda.Web\Views\FinalPlan\CostAllocation.cshtml
financialoutput FinancialOutput IEnumerable<Andromeda.Core.Entities.MonthData> Andromeda.Web\Views\FinalPlan\FinancialOutput.cshtml
hroutput HROutput - Andromeda.Web\Views\FinalPlan\HROutput.cshtml
infraoutput InfraOutput - Andromeda.Web\Views\FinalPlan\InfraOutput.cshtml
inputsummary InputSummary Andromeda.Core.Entities.ProjectData Andromeda.Web\Views\FinalPlan\InputSummary.cshtml
outputindex OutputIndex - Andromeda.Web\Views\FinalPlan\OutputIndex.cshtml
processoutput ProcessOutput - Andromeda.Web\Views\FinalPlan\ProcessOutput.cshtml
reviewfinalplan ReviewFinalPlan Andromeda.Core.Entities.ConfigurationDetails Andromeda.Web\Views\FinalPlan\ReviewFinalPlan.cshtml
scheduleoutput ScheduleOutput - Andromeda.Web\Views\FinalPlan\ScheduleOutput.cshtml
solutionoutput SolutionOutput IDictionary<string, object> Andromeda.Web\Views\FinalPlan\SolutionOutput.cshtml

Methods at a Glance

Command / Save Operations

Type Method HTTP URL Summary
entrypoint RefreshFxRates POST /FinalPlan/RefreshFxRates RefreshFxRates retrieves and updates FX rates relative to the registry...
entrypoint SaveAllocationHeads POST /FinalPlan/SaveAllocationHeads Decode valid JSON, save data via model, and return JSON with Id on success.
entrypoint AllocatedCost GET /FinalPlan/AllocatedCost Retrieve and filter project data, calculate FX rates, update cost allocations...
entrypoint UpdateHead POST /FinalPlan/UpdateHead UpdateHead decodes headInfo, updates existing head if headId > 0, otherwise...

File & Import Operations

Type Method HTTP URL Summary
entrypoint SchedData `` /FinalPlan/SchedData Transform activities into Gantt objects, process project files, identify...
entrypoint getfiles GET /FinalPlan/getfiles Initialize project variables, normalize type input, and select file details...
entrypoint DownloadProjectMeasures GET /FinalPlan/DownloadProjectMeasures DownloadProjectMeasures retrieves project data, serializes it to JSON, and...
entrypoint GetBetweenActsPathsCycleTime GET /FinalPlan/GetBetweenActsPathsCycleTime Filter paths by activities, process schedule data for cycle time, load project...
entrypoint DownLoadSchedFiles GET /FinalPlan/DownLoadSchedFiles Retrieve project ID, verify schedule files, and copy them to a temporary folder...

Query & View Methods

Type Method HTTP URL Summary
entrypoint ReviewFinalPlan GET /FinalPlan/ReviewFinalPlan Retrieve project data, prepare currency and cost details, and return the final...
entrypoint getCriticalPath `` /FinalPlan/getCriticalPath Traverse backward through activities to identify and build the critical path...
entrypoint HROutputData `` /FinalPlan/HROutputData HROutputData retrieves job description and training details using project ID...
entrypoint ControlOutput GET /FinalPlan/ControlOutput ControlOutput handles an HTTP GET request by initializing data and populating...
entrypoint CostAllocation GET /FinalPlan/CostAllocation Retrieve and transform project-related data, then store it in ViewData for the...
entrypoint GetPrePathActs GET /FinalPlan/GetPrePathActs GetPrePathActs retrieves and returns the complete pre-path activities for a...

Workflow & Routing

Type Method HTTP URL Summary
entrypoint SolutionOutput GET /FinalPlan/SolutionOutput The method compiles project-related data, conditionally processes actors, and...
entrypoint ProcessOutput GET /FinalPlan/ProcessOutput No key flows are defined in the ProcessOutput method.
entrypoint HROutput GET /FinalPlan/HROutput Retrieve project activities, process data for the view, and return the view...
entrypoint InfraOutput GET /FinalPlan/InfraOutput InfraOutput handles an HTTP GET request, retrieves multiple model data, and...
entrypoint ScheduleOutput GET /FinalPlan/ScheduleOutput ScheduleOutput handles HTTP GET by retrieving project data, processing it, and...
entrypoint controlsData GET /FinalPlan/controlsData Retrieve and process objectives, risks, and activities by filtering and...
entrypoint FinancialOutput GET /FinalPlan/FinancialOutput Retrieve financial details and project exchange rate, assign rate to view, and...
entrypoint FinancialOutput GET /FinalPlan/FinancialOutput Retrieve financial details and project exchange rate, assign rate to view, and...
entrypoint InputSummary GET /FinalPlan/InputSummary Initialize project data, evaluate clusters, calculate costs and metrics...
entrypoint DeleteAllocationHead POST /FinalPlan/DeleteAllocationHead DeleteAllocationHead processes a POST request to delete an allocation head by...
entrypoint GetPathActivitiesCycleTimeByProduct GET /FinalPlan/GetPathActivitiesCycleTimeByProduct Retrieve and process project activities by product to calculate and return...

Other Methods

Type Method HTTP URL Summary
entrypoint ControlOutputData GET /FinalPlan/ControlOutputData Retrieve and aggregate project data, associate risks with activities, and...
entrypoint InfraOutputData `` /FinalPlan/InfraOutputData Populate IDictionary with office, infrastructure, connectivity, and premises...
entrypoint DeleteMasterHead POST /FinalPlan/DeleteMasterHead DeleteMasterHead retrieves the Id from form data, converts it to integer, and...

Associated Screens / Views

  • ReviewFinalPlanReviewFinalPlan (Andromeda.Web\Views\FinalPlan\ReviewFinalPlan.cshtml)
  • SolutionOutputSolutionOutput (Andromeda.Web\Views\FinalPlan\SolutionOutput.cshtml)
  • ProcessOutputProcessOutput (Andromeda.Web\Views\FinalPlan\ProcessOutput.cshtml)
  • HROutputHROutput (Andromeda.Web\Views\FinalPlan\HROutput.cshtml)
  • InfraOutputInfraOutput (Andromeda.Web\Views\FinalPlan\InfraOutput.cshtml)
  • ControlOutputControlOutput (Andromeda.Web\Views\FinalPlan\ControlOutput.cshtml)
  • ScheduleOutputScheduleOutput (Andromeda.Web\Views\FinalPlan\ScheduleOutput.cshtml)
  • FinancialOutputFinancialOutput (Andromeda.Web\Views\FinalPlan\FinancialOutput.cshtml)
  • InputSummaryInputSummary (Andromeda.Web\Views\FinalPlan\InputSummary.cshtml)
  • CostAllocationCostAllocation (Andromeda.Web\Views\FinalPlan\CostAllocation.cshtml)
  • AllocatedCostAllocatedCost (Andromeda.Web\Views\FinalPlan\AllocatedCost.cshtml)

Entrypoint Methods

ReviewFinalPlan

Summary: Retrieve project data, prepare currency and cost details, and return the final plan review view.

ActionResult FinalPlanController.ReviewFinalPlan(int? id)

Routing

  • HTTP: GET
  • URL: /FinalPlan/ReviewFinalPlan
View Metadata
  • View: ReviewFinalPlan (Andromeda.Web\Views\FinalPlan\ReviewFinalPlan.cshtml)
  • Model: Andromeda.Core.Entities.ConfigurationDetails
Detailed Analysis

Key Flows - and return the final plan review view. - Calculate and assign FX rates - Create currency list by joining actors' locations with FX rates - Return view with final plan review data

Performance Issues - Summary: Optimize collection operations to reduce memory use and database queries. - Minimize Distinct() and OrderBy() on large datasets for ViewBag.FXRates

Maintainability Issues - Summary: Replace magic strings and numbers with constants to improve maintainability. - Use constants instead of magic strings like 'LocationCode', 'CurrencyCode', 'USD', Replace magic number '6' in Math.Round() with a named constant

UX Impact Notes - Summary: Displays financial insights to enhance user understanding of the final plan. - View of calculated FX rates, View of HR costs, View of infrastructure costs, Improved user financial insight

Test Case Ideas - Summary: Verify currency rate retrieval, FXRate handling, and ViewBag cost flags. - Handle Registry.ProjectCurrency as 'USD' - Handle non-'USD' Registry.ProjectCurrency with and without 'USD' in currency list - Return correct currency rates list for project - Set ViewBag.HRCost based on selected actors existence - Set ViewBag.InfraCost based on office cost presence

Dependencies & Called Services - Summary: Uses multiple interfaces and collections for final plan processing. - Enumerable utilities, IActorModel interface, IControlModel interface, IFinalPlanModel interface, IHRModel interface, IInfraModel interface, List collection, Math utilities, String utilities

ControlOutputData

Summary: Retrieve and aggregate project data, associate risks with activities, and prepare comprehensive data structures for use.

void FinalPlanController.ControlOutputData(IDictionary<string, object> list, int projectId)

Routing

  • HTTP: GET
  • URL: /FinalPlan/ControlOutputData
Detailed Analysis

Key Flows - Summary: Retrieve and aggregate project data, associate risks with activities, and prepare comprehensive data structures for use. - Fetch metrics, compensatory controls, objectives, patterns, files, and training data - Associate risks with activities and update risk collections

Error Flows - Summary: ControlOutputData risks runtime errors from incomplete code and missing null checks. - Missing error handling and null checks on dictionary keys and collections

Performance Issues - Summary: Optimize database calls and collection iterations to improve performance. - Uncached multiple database or model calls, Inefficient repeated LINQ operations on same collections, Nested loops causing multiple iterations over large collections

Maintainability Issues - Summary: The method's tight coupling, unclear code, and duplication reduce maintainability and readability. - Duplicated filtering and aggregation logic needs refactoring

Test Case Ideas - Summary: Verify correct data retrieval, aggregation, iteration, and associations in output. - Aggregate and assign multiple activity properties - Validate data returned from different model methods

Dependencies & Called Services - Summary: ControlOutputData uses collections and domain-specific models for data handling. - Enumerable for data iteration, ICollection for collection management, IDictionary for key-value storage, String for text data, FinalPlan domain model, IFinalPlanModel interface, IControlModel interface, IHRModel interface, IRiskModel interface

SolutionOutput

Summary: The method compiles project-related data, conditionally processes actors, and returns a view with the aggregated results.

ActionResult FinalPlanController.SolutionOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/SolutionOutput
View Metadata
  • View: SolutionOutput (Andromeda.Web\Views\FinalPlan\SolutionOutput.cshtml)
  • Model: IDictionary<string, object>
Detailed Analysis

Key Flows - and returns a view with the aggregated results. - Redirect to 'ProcessCreation' action if condition met - Reset DFS index on arrow details - Return view displaying compiled project data

Error Flows - Summary: Lack of explicit error handling risks unhandled exceptions and unclear error states. - Unclear condition triggers redirection to 'ProcessCreation'

Performance Issues - Summary: Excessive uncached database calls degrade performance. - Multiple database calls without caching, Lack of data retrieval optimization

Maintainability Issues - Summary: Unclear method purpose and lengthy data processing reduce code readability and maintainability. - Unclear purpose and behavior of method 'st', Long sequence of data retrieval and processing calls requiring refactoring

UX Impact Notes - Summary: Redirection and data rendering affect user workflow and usability. - Data compilation and rendering impact usability - Redirection to 'ProcessCreation' interrupts user workflow

Test Case Ideas - conditional logic - Handle actors list cases: empty - Redirect to ProcessCreation correctly based on condition - Call ControlOutputData with correct parameters and handle data - Return expected results from GetActorsWithLocation for various project IDs - Return correct arrow details from getArrowDetail - Return correct product factors from GetProductFactorsForProject - Return correct transfer modes from GetTransferModes - Reset indexes correctly in ResetDFSIndex on arrow details

Dependencies & Called Services - Summary: Uses interfaces and collections for process control and data management. - IControlModel for control logic

SchedData

Summary: Transform activities into Gantt objects, process project files, identify critical paths, calculate efforts, and compile scheduling data.

void FinalPlanController.SchedData(IDictionary<string, object> list, int projectId, IList<Actor> actors, IList<ProductFactor> products, IList<Arrow> arrows)

Routing

  • URL: /FinalPlan/SchedData

Cross-layer call chain - FinalPlanController.SchedData → Andromeda.Core.Entities.Gantt.HourlyEffortByActor - FinalPlanController.SchedData → Andromeda.Core.Entities.Gantt.TeamCountByHourly - FinalPlanController.SchedData → Andromeda.Core.Entities.Gantt.ActivityGantt - FinalPlanController.SchedData → Andromeda.Core.Entities.Gantt.CycleHourlyEffortByActivity - Andromeda.Core.Entities.Gantt.HourlyEffortByActor → Andromeda.Core.Entities.Sched.GetHourEffort - Andromeda.Core.Entities.Gantt.HourlyEffortByActor → Andromeda.Core.Entities.Sched.StartTimeHour - Andromeda.Core.Entities.Gantt.TeamCountByHourly → Andromeda.Core.Entities.Sched.StartTimeHourMin - Andromeda.Core.Entities.Gantt.TeamCountByHourly → Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Gantt_ActivityGantt["Andromeda.Core.Entities.Gantt.ActivityGantt"]
    Andromeda_Core_Entities_Gantt_CycleHourlyEffortByActivity["Andromeda.Core.Entities.Gantt.CycleHourlyEffortByActivity"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor["Andromeda.Core.Entities.Gantt.HourlyEffortByActor"]
    Andromeda_Core_Entities_Gantt_TeamCountByHourly["Andromeda.Core.Entities.Gantt.TeamCountByHourly"]
    Andromeda_Core_Entities_Sched_GetHourEffort["Andromeda.Core.Entities.Sched.GetHourEffort"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    FinalPlanController_SchedData["FinalPlanController.SchedData"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_GetHourEffort
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    Andromeda_Core_Entities_Gantt_TeamCountByHourly --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    Andromeda_Core_Entities_Gantt_TeamCountByHourly --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_ActivityGantt
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_CycleHourlyEffortByActivity
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_HourlyEffortByActor
    FinalPlanController_SchedData --> Andromeda_Core_Entities_Gantt_TeamCountByHourly
Detailed Analysis

Key Flows - Summary: Transform activities into Gantt objects, process project files, identify critical paths, calculate efforts, and compile scheduling data. - Calculate hourly effort by actor and filter active teams and out-of-process activities, Calculate daily effort per actor and convert effort data into GanttRow and GanttBar objects - Transform input activities into Activity and Gantt objects, Read and process project-specific arrow data files, Filter milestones and group schedule data by activity ID and version, Identify and process critical path activities, Compile periodic activity Gantt, hourly actor effort, team counts, and activity Gantt into output

Error Flows - Summary: Handle null references and ensure compilable code to prevent runtime errors. - Premature null returns after filtering causing unexpected behavior

Security Issues - Summary: No security issues identified in SchedData method.

Performance Issues - Summary: Optimize loops and data access to reduce memory use and repeated computations. - FirstOrDefault inside loops causing slow performance on large collections, Reading entire file into memory inefficient for large files, Multiple ToList() calls causing unnecessary memory allocation, Repeated getCriticalPath calls inside loops impacting performance, Use of Any method inside loops causing multiple collection iterations, Repeated creation of GanttBar objects in loops causing overhead, Iteration over large actors or actEffort collections causing performance issues

Maintainability Issues - Summary: Tight coupling and unclear code reduce maintainability and complicate changes. - Tight coupling between input list and Activity class, Use of magic strings and numbers reducing code clarity, Incomplete code with undefined variables and conditions, Anonymous types and non-descriptive variable names, Commented out code indicating dead or incomplete functionality

UX Impact Notes - Summary: Null returns and poorly formatted descriptions degrade user experience. - Premature null returns cause unexpected user errors

Test Case Ideas - Summary: Test SchedData for file handling, data processing, filtering, grouping, iteration, and robustness. - Calculate hourly effort by actor and filter active teams and out-of-process activities - Check file existence with valid and malicious projectId - Create Gantt object with transformed activities - Add GanttBar objects to collections and test performance with large datasets

Dependencies & Called Services - Summary: Uses core system types, collections, math functions, file handling, and domain-specific models. - Core system types (Double, Int32, String), Collections (Enumerable, List, ICollection, IDictionary), File handling, Mathematical functions, Domain-specific models (FinalPlan, Gantt, IActorModel, IProcessModel)

getCriticalPath

Summary: Traverse backward through activities to identify and build the critical path based on producer relationships and end times.

void FinalPlanController.getCriticalPath(Dictionary<string, List<Sched>> schedData, string endActivity, List<Sched> activityList, IList<EdgeInfo> arrowList)

Routing

  • URL: /FinalPlan/getCriticalPath
Detailed Analysis

Key Flows - Summary: Traverse backward through activities to identify and build the critical path based on producer relationships and end times. - Check schedData and Pre collection conditions for further processing - Filter arrowList for distinct producers of edges consuming the end activity, Identify producer activity with maximum end time from schedData, Verify maxWeightActivity presence in activityList before recursion, Add qualifying activities from schedData to activityList, Recursively call getCriticalPath to continue backward traversal

Error Flows - Summary: The method has incomplete code causing compilation errors and undefined behavior. - Incomplete variable declarations, Partial conditional statements, Potential compilation errors, Undefined behavior risks

Performance Issues - Summary: LINQ operations on large collections degrade performance due to full enumeration and multiple queries. - Costly multiple LINQ operations on schedData for large datasets

Maintainability Issues - Summary: Refactor getCriticalPath to improve naming, reduce complexity, and decouple dependencies. - Non-standard method naming reduces readability, Complex nested LINQ queries hinder clarity, Incomplete code fragments cause compilation issues, Tight coupling to specific types reduces flexibility, Complex lambda expressions need refactoring for readability

Test Case Ideas - conditional logic - Test conditional logic involving maxWeightActivity values - Ensure correct updates to activityList based on endActivity conditions - Check schedData containing endActivity key with matching and non-matching activityList - Handle empty arrowList with no dependencies - Validate behavior with empty schedData and no matching Pre.Contains activities

Dependencies & Called Services - Summary: Uses collections and query utilities to process service call sequences. - Enumerable for query operations, FinalPlan for execution strategy, List for ordered service storage

ProcessOutput

Summary: No key flows are defined in the ProcessOutput method.

ViewResult FinalPlanController.ProcessOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/ProcessOutput

Cross-layer call chain - FinalPlanController.ProcessOutput → Andromeda.Core.LoggingManager.Debug

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    FinalPlanController_ProcessOutput["FinalPlanController.ProcessOutput"]
    FinalPlanController_ProcessOutput --> Andromeda_Core_LoggingManager_Debug
View Metadata
  • View: ProcessOutput (Andromeda.Web\Views\FinalPlan\ProcessOutput.cshtml)
Detailed Analysis

Key Flows - Summary: No key flows are defined in the ProcessOutput method.

Performance Issues - Summary: Multiple database queries in one request degrade response time. - Multiple database queries per request, Increased response time due to query overhead

Maintainability Issues - Summary: Separate data retrieval, logging, and view rendering to improve maintainability. - Mixed concerns of data retrieval, logging, and view rendering, Reduced code maintainability and extensibility

UX Impact Notes - Summary: Returns a view that determines the user experience. - Return view for user rendering

Test Case Ideas - and proper debug logging. - Proper debug logging during method execution

Dependencies & Called Services - Summary: ProcessOutput depends on multiple models and a logging manager for data handling and logging. - Enumerable for collection operations, IActorModel for actor data, IControlModel for control data, IDictionary for key-value storage, IProcessModel for process data, IRiskModel for risk data - LoggingManager for logging

HROutput

Summary: Retrieve project activities, process data for the view, and return the view result to the client.

ViewResult FinalPlanController.HROutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/HROutput
View Metadata
  • View: HROutput (Andromeda.Web\Views\FinalPlan\HROutput.cshtml)
Detailed Analysis

Key Flows - and return the view result to the client. - Process data with HROutputData method for view - Return ViewResult to client

Error Flows - Summary: Lack of explicit error handling causes unhandled exceptions during data retrieval or processing. - Unhandled exceptions in data retrieval - Unhandled exceptions in data processing

Performance Issues - Summary: No performance issues identified.

Maintainability Issues - Summary: Replace magic strings with constants and remove incomplete code lines to improve maintainability. - Use constants or enums instead of magic strings for dictionary keys, Remove incomplete or empty code lines causing functionality issues

UX Impact Notes - Summary: Ensure fast, correct data preparation for smooth HR output page display. - Performance affects page load speed, Correctness ensures accurate data display, Direct impact on user navigation experience

Test Case Ideas - Summary: Verify HROutput returns valid ViewResult with correct filtered data and calls HROutputData properly. - Return valid ViewResult under normal conditions

Dependencies & Called Services - Summary: Uses collections and interfaces for HR and risk model management. - Enumerable for collection operations, FinalPlan for finalized data handling, IDictionary for key-value storage, IHRModel interface for HR data abstraction, IRiskModel interface for risk data abstraction

HROutputData

Summary: HROutputData retrieves job description and training details using project ID and stores them in a dictionary.

void FinalPlanController.HROutputData(IDictionary<string, object> list, int projectId)

Routing

  • URL: /FinalPlan/HROutputData
Detailed Analysis

Key Flows - Summary: HROutputData retrieves job description and training details using project ID and stores them in a dictionary. - Call model.GetActorJD with project ID and store result as 'JOBDESCRIPTION', Call model.GetTrainingData with project ID and store result as 'TRAININGDETAILS'

Test Case Ideas - Summary: Verify IDictionary populates correctly with a valid project ID. - IDictionary population with valid project ID

Dependencies & Called Services - Summary: Uses IDictionary, IFinalPlanModel, and IHRModel interfaces for service dependencies. - IDictionary interface dependency, IFinalPlanModel interface dependency, IHRModel interface dependency

InfraOutput

Summary: InfraOutput handles an HTTP GET request, retrieves multiple model data, and returns a view with processed data.

ViewResult FinalPlanController.InfraOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/InfraOutput
View Metadata
  • View: InfraOutput (Andromeda.Web\Views\FinalPlan\InfraOutput.cshtml)
Detailed Analysis

Key Flows - Summary: InfraOutput handles an HTTP GET request - and returns a view with processed data. - Handle HTTP GET request - Return ViewResult to render view

Performance Issues - Summary: Optimize multiple expensive method calls to improve performance. - Multiple calls to GetActorsWithLocation, Multiple calls to getInprocessArrowDetail, Multiple calls to GetAllActivities, Multiple calls to GetTransferModes, Expensive operations involving database queries

Maintainability Issues - Summary: Replace magic string dictionary keys with constants to improve maintainability. - Magic string dictionary keys, Lack of constants for keys

UX Impact Notes - Summary: Renders a view based on retrieved data, directly impacting user experience. - Returns ViewResult

Test Case Ideas - Summary: Verify InfraOutput handles GET requests - returns correct ViewResult - Handle HTTP GET requests correctly - Return ViewResult from InfraOutput - Return expected data from GetActorsWithLocation - Return expected data from getInprocessArrowDetail - Return expected data from GetAllActivities - Return and convert GetTransferModes data to dictionary correctly

Dependencies & Called Services - Summary: Uses interfaces and collections for service orchestration and data management. - IControlModel for control logic

InfraOutputData

Summary: Populate IDictionary with office, infrastructure, connectivity, and premises data, and retrieve project FX rate.

void FinalPlanController.InfraOutputData(IDictionary<string, object> list, int projectId)

Routing

  • URL: /FinalPlan/InfraOutputData
Detailed Analysis

Key Flows - Summary: Populate IDictionary with office, infrastructure, connectivity, and premises data, and retrieve project FX rate. - Populate IDictionary with office locations, infrastructure transactions, and project connectivity from myInfraModel, Retrieve project foreign exchange rate from actorModel by project ID, Initialize dictionary for connectivity details keyed by office ID, Filter and add project connectivity data per office to connectivity list, Add premises details to IDictionary from myInfraModel

Error Flows - Summary: InfraOutputData lacks explicit error handling for invalid or missing project IDs. - Missing explicit error handling for invalid project IDs, No exception management for non-existent project IDs

Performance Issues - Summary: Optimize data access and filtering to prevent performance bottlenecks with large datasets. - In-memory filtering of large datasets during LoadOffices iteration

Maintainability Issues - Summary: Non-descriptive names, magic strings, incomplete declarations, and unclear variables reduce maintainability. - Non-descriptive variable name 'list' for IDictionary, Incomplete dictionary declaration risks compilation errors, Use of magic strings like 'PREMISESDETAILS' increases error risk, Undefined purpose of 'LoadOffices' variable complicates comprehension

Test Case Ideas - Summary: Validate correct population and filtering of IDictionary with connectivity and premises data. - Populate IDictionary from LoadOffices, GetInfraDataWithProjectCurrency, ProjectConnectivityStandardConfigs, Initialize connectivity details dictionary without errors, Filter LoadOffices iteration to reduce database calls, Populate connectivityList for various office IDs, Include expected premises details in IDictionary

Dependencies & Called Services - Summary: Uses collections and model interfaces for service data management. - Enumerable for collection operations, IActorModel interface, IDictionary for key-value storage, IInfraModel interface

ControlOutput

Summary: ControlOutput handles an HTTP GET request by initializing data and populating it with project-specific information.

ViewResult FinalPlanController.ControlOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/ControlOutput
View Metadata
  • View: ControlOutput (Andromeda.Web\Views\FinalPlan\ControlOutput.cshtml)
Detailed Analysis

Key Flows - Summary: ControlOutput handles an HTTP GET request by initializing data and populating it with project-specific information. - Initialize empty dictionary, Populate dictionary with project data via ControlOutputData

Maintainability Issues - Summary: Use descriptive variable names to improve code readability and maintainability. - Non-descriptive variable name 'list' for dictionary

UX Impact Notes - Summary: Renders a view to update the user interface based on provided data. - Return ViewResult

Test Case Ideas - Summary: Verify ControlOutput handles GET requests - and returns ViewResult. - Handle HTTP GET request correctly - Return ViewResult as expected

Dependencies & Called Services - Summary: ControlOutput depends on the FinalPlan service. - Dependency on FinalPlan service

ScheduleOutput

Summary: ScheduleOutput handles HTTP GET by retrieving project data, processing it, and returning a view.

ViewResult FinalPlanController.ScheduleOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/ScheduleOutput
View Metadata
  • View: ScheduleOutput (Andromeda.Web\Views\FinalPlan\ScheduleOutput.cshtml)
Detailed Analysis

Key Flows - Summary: ScheduleOutput handles HTTP GET by retrieving project data - and returning a view. - Handle HTTP GET request - Return ViewResult

Performance Issues - Summary: Multiple database calls degrade performance when retrieving related data. - Multiple database calls for actors, Multiple database calls for product factors, Multiple database calls for activities

Maintainability Issues - Summary: Using a non-generic dictionary reduces type safety and code clarity. - Non-generic dictionary usage, Type safety issues, Reduced code clarity

UX Impact Notes - Summary: Renders scheduled output view and restricts method to HTTP GET requests. - Return ViewResult to render scheduled output

Test Case Ideas - Summary: Verify ScheduleOutput handles GET requests - returns ViewResult - Handle HTTP GET requests - Return ViewResult

Dependencies & Called Services - Summary: ScheduleOutput depends on multiple models and data structures for planning and control. - FinalPlan dependency, IActorModel interface usage, IControlModel interface usage, IDictionary data structure usage, IRiskModel interface usage

controlsData

Summary: Retrieve and process objectives, risks, and activities by filtering and grouping them into aggregated objects.

List<ObjectRiskActivities> FinalPlanController.controlsData(IList<ActivityActorArrow> objActivity, IList<Risks> allRisks, IList<ActivityGroup> activityGroups, IList<ActivityProperty> ActProperties)

Routing

  • HTTP: GET
  • URL: /FinalPlan/controlsData

Cross-layer call chain - FinalPlanController.controlsData → Andromeda.Core.Entities.ActivityActorArrow.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ActivityActorArrow_Clone["Andromeda.Core.Entities.ActivityActorArrow.Clone"]
    FinalPlanController_controlsData["FinalPlanController.controlsData"]
    FinalPlanController_controlsData --> Andromeda_Core_Entities_ActivityActorArrow_Clone
Detailed Analysis

Key Flows - Summary: Retrieve and process objectives, risks, and activities by filtering and grouping them into aggregated objects. - Create and aggregate ObjectRiskActivities for objectives with risks and activities - Retrieve objectives, risks, and activities by project ID, Filter and process activity groups to extract properties and actors, Filter objectives to associate related activities and risks

Error Flows - Summary: Avoid processing when activity list is empty; missing null checks risk exceptions. - Lack of null checks on collections risks null reference exceptions

Performance Issues - Summary: Excessive database calls and inefficient LINQ usage degrade performance and increase memory use. - Loading entire collections into memory with ToList() causing memory issues - Inefficient LINQ methods usage within loops on large datasets

Maintainability Issues - Summary: The method's readability and maintainability suffer from poor naming, duplication, and unclear code. - Duplicated filtering and selection logic requires refactoring

UX Impact Notes - Summary: Prepares aggregated property lists as comma-separated strings for user display. - Aggregated property lists, Comma-separated string formatting, Consolidated user information display

Test Case Ideas - Summary: Verify data retrieval, processing, filtering, object creation, and handling of empty inputs. - Create ObjectRiskActivities only if risks and activities exist - Handle empty code blocks and incomplete statements correctly - Return empty list when no project data exists - Add created objects to result collection

Dependencies & Called Services - Summary: Uses collections and interfaces for activity tracking and risk modeling. - ActivityActorArrow for activity tracking, Enumerable for collection operations, ICollection interface for collection abstraction, IRiskModel interface for risk modeling, List for data storage, String for text handling

getfiles

Summary: Initialize project variables, normalize type input, and select file details based on type with special handling for error files.

ActionResult FinalPlanController.getfiles(string type)

Routing

  • HTTP: GET
  • URL: /FinalPlan/getfiles
Detailed Analysis

Key Flows - Summary: Initialize project variables, normalize type input, and select file details based on type with special handling for error files. - Handle error-related types by retrieving files via pattern matching and updating paths - Switch on 'type' to set filename

Error Flows - Summary: Handle missing files by dynamic generation and address absent exception handling. - Runtime errors from incomplete code snippets and assignments

Security Issues - Summary: Prevent data tampering, injection, and improper content handling by validating inputs and MIME types. - Sanitize and validate data used to generate files - Assign correct and complete MIME types - Validate filePath assignments before use

Performance Issues - Summary: Optimize file retrieval and string operations to prevent performance degradation. - Performance impact from frequent file existence checks combined with data retrieval

Maintainability Issues - Summary: Hardcoded strings and unclear variable usage reduce code flexibility and clarity. - Unclear or incomplete variable declarations and assignments

UX Impact Notes - Summary: Users face file access issues due to hardcoded names, missing feedback, and potential delays. - Dynamic file generation ensures updated data but may delay access

Test Case Ideas - Summary: Test getfiles method for all type cases, file existence, encoding, and performance. - Check file existence for specific types like 'sadelays' - Validate all 'type' parameter switch cases - Ensure returned files are UTF-8 encoded with correct content

Dependencies & Called Services - Summary: Uses core data types and interfaces for file handling and actor model integration. - Boolean type usage, Directory operations, Encoding handling, Enumerable collections, File operations, IActorModel interface, String type usage

DownloadProjectMeasures

Summary: DownloadProjectMeasures retrieves project data, serializes it to JSON, and returns it as a downloadable file.

FileContentResult FinalPlanController.DownloadProjectMeasures()

Routing

  • HTTP: GET
  • URL: /FinalPlan/DownloadProjectMeasures

Cross-layer call chain - FinalPlanController.DownloadProjectMeasures → Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation - Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation → Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation["Andromeda.Core.Entities.ProjectDataEntity.CompetencyCompensation"]
    Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter["Andromeda.Core.Extensions.LinqExtensions.CurrencyConverter"]
    FinalPlanController_DownloadProjectMeasures["FinalPlanController.DownloadProjectMeasures"]
    Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation --> Andromeda_Core_Extensions_LinqExtensions_CurrencyConverter
    FinalPlanController_DownloadProjectMeasures --> Andromeda_Core_Entities_ProjectDataEntity_CompetencyCompensation
Detailed Analysis

Key Flows - and returns it as a downloadable file. - Create anonymous object from deserialized data - Fetch project comparison data using project ID - Return JSON as downloadable file with proper content type and filename

Error Flows - Summary: Return empty JSON when dataOfMeasures or its MeasuresJs is null or empty. - Return empty JSON file

Security Issues - Summary: System.Web.Helpers.Json.Decode causes JSON deserialization vulnerability. - JSON deserialization vulnerability, Use of System.Web.Helpers.Json.Decode for MeasuresJson

Performance Issues - Summary: JavaScriptSerializer causes performance issues when serializing anonymous objects. - Use of JavaScriptSerializer for anonymous object serialization

Maintainability Issues - Summary: Improve naming conventions, replace magic strings with constants, and simplify large anonymous objects. - Non-standard variable naming 'CurProjId', Use constants instead of magic strings like 'application/json' and 'ProjectMeasures_', Complex large anonymous object reduces maintainability

UX Impact Notes - Summary: Users download project-specific files; empty files risk poor UX if unhandled. - File download named by current project ID, Empty JSON files cause poor UX without client-side handling

Test Case Ideas - Summary: Verify correct project data retrieval, JSON processing, and file response formatting. - Create anonymous object correctly from deserialized data - Return correct project comparison data for valid project ID - Return empty file for empty or whitespace-only MeasuresJs - Return file with correct filename and content type when data exists - Ensure returned file content matches serialized JSON string

Dependencies & Called Services - Summary: Uses encoding, serialization, math operations, project data access, and string manipulation. - Encoding utilities, Project model interface, JSON serialization, Mathematical functions, Project data entity access, String operations

FinancialOutput

Summary: Retrieve financial details and project exchange rate, assign rate to view, and return financial output view.

ViewResult FinalPlanController.FinancialOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/FinancialOutput
View Metadata
  • View: FinancialOutput (Andromeda.Web\Views\FinalPlan\FinancialOutput.cshtml)
  • Model: IEnumerable<Andromeda.Core.Entities.MonthData>
Detailed Analysis

Key Flows - assign rate to view - and return financial output view. - Assign exchange rate to ViewBag.fxRate - Return FinancialOutput view

Maintainability Issues - Summary: Fix variable typo to ensure correct foreign exchange rate assignment. - Typo in foreign exchange rate variable assignment

UX Impact Notes - Summary: Displays financial details and exchange rates to enhance user information. - Display financial details, Show foreign exchange rate

Test Case Ideas - Summary: Verify FinancialOutput view renders with correct financial details and FX rate assigned. - Return FinancialOutput view successfully - Call GetFinancialDetails() on model and assign result - Assign returned FX rate to ViewBag.fxRate

Dependencies & Called Services - Summary: Uses IActorModel and IFinalPlanModel services. - IActorModel service dependency, IFinalPlanModel service dependency

FinancialOutput

Summary: Retrieve financial details and project exchange rate, assign rate to view, and return financial output view.

ViewResult FinalPlanController.FinancialOutput()

Routing

  • HTTP: GET
  • URL: /FinalPlan/FinancialOutput
View Metadata
  • View: FinancialOutput (Andromeda.Web\Views\FinalPlan\FinancialOutput.cshtml)
  • Model: IEnumerable<Andromeda.Core.Entities.MonthData>
Detailed Analysis

Key Flows - assign rate to view - and return financial output view. - Assign exchange rate to ViewBag.fxRate - Return FinancialOutput view

Maintainability Issues - Summary: Fix variable typo to ensure correct foreign exchange rate assignment. - Typo in foreign exchange rate variable assignment

UX Impact Notes - Summary: Displays financial details and exchange rates to enhance user information. - Display financial details, Show foreign exchange rate

Test Case Ideas - Summary: Verify FinancialOutput view renders with correct financial details and FX rate assigned. - Return FinancialOutput view successfully - Call GetFinancialDetails() on model and assign result - Assign returned FX rate to ViewBag.fxRate

Dependencies & Called Services - Summary: Uses IActorModel and IFinalPlanModel services. - IActorModel service dependency, IFinalPlanModel service dependency

RefreshFxRates

Summary: RefreshFxRates retrieves and updates FX rates relative to the registry currency, refreshes infrastructure FX data, projects rates for the current project, ensures USD presence, and returns distinct rounded rates in JSON.

JsonResult FinalPlanController.RefreshFxRates()

Routing

  • HTTP: POST
  • URL: /FinalPlan/RefreshFxRates

Cross-layer call chain - FinalPlanController.RefreshFxRates → Andromeda.Core.Models.ModelHelper.RefreshFxRates - FinalPlanController.RefreshFxRates → Andromeda.Core.DataManager.GetDataList - FinalPlanController.RefreshFxRates → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Models.ModelHelper.RefreshFxRates → Andromeda.Core.Models.ModelHelper.RefreshFxRates - Andromeda.Core.Models.ModelHelper.RefreshFxRates → Andromeda.Core.DataManager.GetDataList - Andromeda.Core.Models.ModelHelper.RefreshFxRates → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Models_ModelHelper_RefreshFxRates["Andromeda.Core.Models.ModelHelper.RefreshFxRates"]
    FinalPlanController_RefreshFxRates["FinalPlanController.RefreshFxRates"]
    Andromeda_Core_Models_ModelHelper_RefreshFxRates --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Models_ModelHelper_RefreshFxRates --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Models_ModelHelper_RefreshFxRates --> Andromeda_Core_Models_ModelHelper_RefreshFxRates
    FinalPlanController_RefreshFxRates --> Andromeda_Core_DataManager_GetDataList
    FinalPlanController_RefreshFxRates --> Andromeda_Core_LoggingManager_Error
    FinalPlanController_RefreshFxRates --> Andromeda_Core_Models_ModelHelper_RefreshFxRates
Detailed Analysis

Key Flows - Summary: RefreshFxRates retrieves and updates FX rates relative to the registry currency - and returns distinct rounded rates in JSON. - Call FXMaster with updated FX rates - Return JSON with distinct currency names and rates rounded to six decimals - Update FX rates relative to registry currency if present - Update registry currency value

Error Flows - Summary: Handle FX rate update errors with logging and JSON responses. - Catch and log System.Net.WebException with detailed message and return JSON response - Catch and log general exceptions and return JSON success response - Log error if FX rates collection is null or missing registry currency

Security Issues - Summary: No security issues identified in RefreshFxRates method.

Performance Issues - Summary: Optimize collection operations and reduce multiple external calls to improve performance. - Unnecessary memory allocation from ToList() on FX rates and currency lists, Inefficient FirstOrDefault usage on large FX rates collections, Inefficient Distinct calls without specified comparer, Multiple database or service calls for FX rates, actor lists, and world map locations

Maintainability Issues - Summary: The method suffers from unclear naming, magic literals, typos, tight coupling, and incomplete code. - Tight coupling with specific logging implementations

UX Impact Notes - Summary: The method returns JSON that triggers UI updates and displays error messages affecting user experience. - Log error messages without guaranteed user display - Return JSON triggering UI updates or page reloads - Return error responses impacting user experience

Test Case Ideas - Summary: Verify correct FX rate retrieval, processing, JSON output, and method execution. - Handle non-USD project currency and add missing USD - Return JsonResult type - Return JSON with distinct - Update FX rates relative to registry currency

Dependencies & Called Services - Summary: RefreshFxRates depends on models, services, collections, logging, and utilities. - IControlModel for control logic - ILoginModel for authentication - LoggingManager for logging

InputSummary

Summary: Initialize project data, evaluate clusters, calculate costs and metrics, analyze critical paths, process teams, and prepare project review data.

ActionResult FinalPlanController.InputSummary(int? isOptimize)

Routing

  • HTTP: GET
  • URL: /FinalPlan/InputSummary

Cross-layer call chain - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetActors - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetActivities - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetOfficeList - FinalPlanController.InputSummary → Andromeda.Core.Entities.Activity.Clone - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetArrows - FinalPlanController.InputSummary → Andromeda.Core.Entities.Arrow.Clone - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetClusterObj - FinalPlanController.InputSummary → Insorce.Helpers.ClusterHelper.GenerateCluster - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetDelooperObj - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetInfraMasterDetails - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetInfraDetails - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetOfficePremises - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetConnectivityDetails - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetSchedData - FinalPlanController.InputSummary → Andromeda.Core.Services.SignalRMsg.SendMessage - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetobjActivityRiskControls - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetObjRisks - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetObjActivities - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetRiskControls - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetObjectiveExistance - FinalPlanController.InputSummary → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetUndesiredPaths - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetPeakActivityUnits - FinalPlanController.InputSummary → Andromeda.Core.Entities.ProjectData.GetTeamMinFTE - Andromeda.Core.Entities.ProjectData.GetActors → Andromeda.Core.DataManager.GetDataList - Andromeda.Core.Entities.ProjectData.GetActors → Andromeda.Core.Models.ModelHelper.ProjectTimeZone - Andromeda.Core.Entities.ProjectData.GetActivities → Andromeda.Core.DataManager.GetDataList - Insorce.Helpers.ClusterHelper.GenerateCluster → Andromeda.Core.Services.KClusters.RunClustering - Insorce.Helpers.ClusterHelper.GenerateCluster → Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse - Insorce.Helpers.ClusterHelper.GenerateCluster → Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Info - Andromeda.Core.Services.SignalRMsg.SendMessage → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities → Andromeda.Core.DataManager.GetDataList - Andromeda.Core.Entities.ProjectData.GetRiskControls → Andromeda.Core.DataManager.GetData - Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks → Andromeda.Core.Services.ProcessExtensions.FindByID - Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks → Andromeda.Core.Extensions.LinqExtensions.GetPathIds

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_ProjectData_GetActivities["Andromeda.Core.Entities.ProjectData.GetActivities"]
    Andromeda_Core_Entities_ProjectData_GetActors["Andromeda.Core.Entities.ProjectData.GetActors"]
    Andromeda_Core_Entities_ProjectData_GetArrows["Andromeda.Core.Entities.ProjectData.GetArrows"]
    Andromeda_Core_Entities_ProjectData_GetClusterObj["Andromeda.Core.Entities.ProjectData.GetClusterObj"]
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities["Andromeda.Core.Entities.ProjectData.GetCompensatoryActivities"]
    Andromeda_Core_Entities_ProjectData_GetConnectivityDetails["Andromeda.Core.Entities.ProjectData.GetConnectivityDetails"]
    Andromeda_Core_Entities_ProjectData_GetDelooperObj["Andromeda.Core.Entities.ProjectData.GetDelooperObj"]
    Andromeda_Core_Entities_ProjectData_GetInfraDetails["Andromeda.Core.Entities.ProjectData.GetInfraDetails"]
    Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails["Andromeda.Core.Entities.ProjectData.GetInfraMasterDetails"]
    Andromeda_Core_Entities_ProjectData_GetObjActivities["Andromeda.Core.Entities.ProjectData.GetObjActivities"]
    Andromeda_Core_Entities_ProjectData_GetObjRisks["Andromeda.Core.Entities.ProjectData.GetObjRisks"]
    Andromeda_Core_Entities_ProjectData_GetObjectiveExistance["Andromeda.Core.Entities.ProjectData.GetObjectiveExistance"]
    Andromeda_Core_Entities_ProjectData_GetOfficeList["Andromeda.Core.Entities.ProjectData.GetOfficeList"]
    Andromeda_Core_Entities_ProjectData_GetOfficePremises["Andromeda.Core.Entities.ProjectData.GetOfficePremises"]
    Andromeda_Core_Entities_ProjectData_GetPeakActivityUnits["Andromeda.Core.Entities.ProjectData.GetPeakActivityUnits"]
    Andromeda_Core_Entities_ProjectData_GetRiskControls["Andromeda.Core.Entities.ProjectData.GetRiskControls"]
    Andromeda_Core_Entities_ProjectData_GetSchedData["Andromeda.Core.Entities.ProjectData.GetSchedData"]
    Andromeda_Core_Entities_ProjectData_GetTeamMinFTE["Andromeda.Core.Entities.ProjectData.GetTeamMinFTE"]
    Andromeda_Core_Entities_ProjectData_GetUndesiredPaths["Andromeda.Core.Entities.ProjectData.GetUndesiredPaths"]
    Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls["Andromeda.Core.Entities.ProjectData.GetobjActivityRiskControls"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Models_ModelHelper_ProjectTimeZone["Andromeda.Core.Models.ModelHelper.ProjectTimeZone"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_SignalRMsg_SendMessage["Andromeda.Core.Services.SignalRMsg.SendMessage"]
    FinalPlanController_InputSummary["FinalPlanController.InputSummary"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    Andromeda_Core_Entities_ProjectData_GetActivities --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Entities_ProjectData_GetActors --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Entities_ProjectData_GetActors --> Andromeda_Core_Models_ModelHelper_ProjectTimeZone
    Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities --> Andromeda_Core_DataManager_GetDataList
    Andromeda_Core_Entities_ProjectData_GetRiskControls --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks --> Andromeda_Core_Extensions_LinqExtensions_GetPathIds
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks --> Andromeda_Core_Services_ProcessExtensions_FindByID
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_SignalRMsg_SendMessage --> Andromeda_Core_LoggingManager_Info
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_Activity_Clone
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_Arrow_Clone
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetActivities
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetActors
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetArrows
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetClusterObj
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetCompensatoryActivities
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetConnectivityDetails
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetDelooperObj
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetInfraDetails
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetInfraMasterDetails
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetObjActivities
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetObjRisks
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetObjectiveExistance
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetOfficeList
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetOfficePremises
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetPeakActivityUnits
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetRiskControls
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetSchedData
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetTeamMinFTE
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetUndesiredPaths
    FinalPlanController_InputSummary --> Andromeda_Core_Entities_ProjectData_GetobjActivityRiskControls
    FinalPlanController_InputSummary --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    FinalPlanController_InputSummary --> Andromeda_Core_Services_SignalRMsg_SendMessage
    FinalPlanController_InputSummary --> Insorce_Helpers_ClusterHelper_GenerateCluster
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Andromeda_Core_Services_KClusters_RunClustering
    Insorce_Helpers_ClusterHelper_GenerateCluster --> Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse
View Metadata
  • View: InputSummary (Andromeda.Web\Views\FinalPlan\InputSummary.cshtml)
  • Model: Andromeda.Core.Entities.ProjectData
Detailed Analysis

Key Flows - Summary: Initialize project data, evaluate clusters, calculate costs and metrics, analyze critical paths, process teams, and prepare project review data. - Calculate foreign exchange rates and store cluster info in ViewData, Calculate costs in USD, effort, control coverage, benefits, cycle time, and first time right for actors and activities - Redirect to ProcessCreation if no project activities exist - Retrieve project ID and initialize ProjectData with dependencies, Clone project actors, activities, and arrows; initialize ActivityClusterReport, Generate cluster evaluation if absent using ClusterHelper, Perform critical path analysis by sorting and selecting critical paths and child paths, Filter active, non-system teams and calculate utilization metrics, Deserialize measures JSON, perform calculations, and serialize results for ViewData, Retrieve out-process properties, legacy and automated systems, and project review status

Error Flows - Summary: Handle null checks and empty collections to prevent exceptions and ensure proper redirection. - Null reference exceptions from missing null checks in cluster evaluation and activity processing - InvalidOperationException from selecting first critical path without empty collection check - Redirect to ProcessCreation if project activities count is zero or condition met

Security Issues - Summary: Fix deserialization and configuration file tampering vulnerabilities. - ConfigurationManager.AppSettings vulnerable to config file tampering

Performance Issues - Summary: Multiple LINQ queries and large collection operations degrade performance and increase memory usage. - Multiple LINQ queries on large datasets

Maintainability Issues - and complex logic reducing maintainability. - Long parameter list reduces readability, Incomplete and truncated code causes errors, Use of magic strings reduces clarity, Non-descriptive variable names, Commented-out and unfinished code present, Complex LINQ queries hinder understanding, Inconsistent naming and typos lower quality, Anonymous types lack clear naming

UX Impact Notes - Summary: Redirects and messaging impact workflow and interface responsiveness. - Redirect users to ProcessCreation disrupts workflow - Send messages via SignalRMsg affects user experience

Test Case Ideas - and conditional redirection. - Test redirection when project activities count is zero or condition met - Validate calculations of control coverage

Dependencies & Called Services - Summary: Uses diverse models, collections, utilities, and serialization for service operations. - Domain models: IActorModel, IFinalPlanModel, IInfraModel, IProcessModel, IProjectModel, IRiskModel, Data structures: List, Enumerable, Utilities: Math, Convert, Enum, Serialization: JavaScriptSerializer, Messaging: SignalRMsg, Basic types: Int32, String, UI and helper components: Activity, Arrow, Calendar, ClusterHelper, Data container: ProjectData

CostAllocation

Summary: Retrieve and transform project-related data, then store it in ViewData for the view.

ActionResult FinalPlanController.CostAllocation()

Routing

  • HTTP: GET
  • URL: /FinalPlan/CostAllocation

Cross-layer call chain - FinalPlanController.CostAllocation → Andromeda.Core.Entities.Actor.GetLocation - Andromeda.Core.Entities.Actor.GetLocation → Andromeda.Core.DataManager.GetData

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    FinalPlanController_CostAllocation["FinalPlanController.CostAllocation"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    FinalPlanController_CostAllocation --> Andromeda_Core_Entities_Actor_GetLocation
View Metadata
  • View: CostAllocation (Andromeda.Web\Views\FinalPlan\CostAllocation.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and transform project-related data, then store it in ViewData for the view. - Retrieve and assign currency codes from infrastructure model

Performance Issues - Summary: Multiple database calls and ToList() usage degrade performance with large datasets. - ToList() loads entire dataset into memory

Maintainability Issues - Summary: Refactor method to smaller units and avoid anonymous objects for clarity and completeness. - Method does too much; break into smaller methods, Anonymous objects reduce code clarity and maintainability, Incomplete statement indicates code quality issue

UX Impact Notes - Summary: ViewData controls displayed cost allocations and currency codes. - Data in ViewData dictionary, Displayed cost allocations, Displayed currency codes

Test Case Ideas - Summary: Verify correct data retrieval, transformation, storage, and display of cost allocations. - Retrieve and assign currency codes to ViewData

Dependencies & Called Services - Summary: Uses multiple interfaces and types to model actors and control processes. - Actor model interface, Control model interface, Final plan model interface, Infrastructure model interface, Enumerable collection, String type - Process model interface

SaveAllocationHeads

Summary: Decode valid JSON, save data via model, and return JSON with Id on success.

JsonResult FinalPlanController.SaveAllocationHeads()

Routing

  • HTTP: POST
  • URL: /FinalPlan/SaveAllocationHeads
Detailed Analysis

Key Flows - and return JSON with Id on success. - Return JSON with Id when save result equals 1

Error Flows - Summary: Handle errors from invalid or malformed JSON in request data. - Invalid JSON data in request form, Deserialization failure of JSON data

Security Issues - Summary: Direct JSON deserialization from request form risks injection attacks. - Direct JSON deserialization from request form, Lack of explicit validation or sanitization

Performance Issues - Summary: No performance issues detected in the analyzed code. - No performance bottlenecks found

Maintainability Issues - Summary: Replace magic string with constant and complete conditional code for clarity. - Complete conditional check on allocInfo.Count to improve readability and maintainability

UX Impact Notes - Summary: SaveAllocationHeads method communicates success or failure via JSON responses affecting UX. - Successful save returns JSON with Id for user actions

Test Case Ideas - Summary: Validate SaveAllocationHeads saves CostAllocations and returns correct JSON responses. - Handle empty allocInfo collection correctly - Return no JSON with Id when condition differs from 1

Dependencies & Called Services - Summary: Uses IFinalPlanModel to save allocation heads. - Dependency on IFinalPlanModel for data operations

DeleteAllocationHead

Summary: DeleteAllocationHead processes a POST request to delete an allocation head by Id and returns a JSON result.

JsonResult FinalPlanController.DeleteAllocationHead()

Routing

  • HTTP: POST
  • URL: /FinalPlan/DeleteAllocationHead

Cross-layer call chain - FinalPlanController.DeleteAllocationHead → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    FinalPlanController_DeleteAllocationHead["FinalPlanController.DeleteAllocationHead"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    FinalPlanController_DeleteAllocationHead --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: DeleteAllocationHead processes a POST request to delete an allocation head by Id and returns a JSON result. - Return JsonResult with deletion outcome

Error Flows - Summary: Validate 'Id' parameter and handle deletion errors explicitly. - Unhandled errors from deletion operation in model

Security Issues - Summary: Validate and sanitize user input to prevent SQL injection and data tampering. - Unvalidated conversion of Request.Form['Id'] to integer - Potential data tampering via unchecked input

Maintainability Issues - Summary: Using magic strings reduces code maintainability. - Use constant for 'Id' instead of magic string in Request.Form

UX Impact Notes - Summary: Returns JsonResult affecting user flow based on client handling. - JsonResult return

Test Case Ideas - Summary: Verify DeleteAllocationHead restricts to POST and deletes allocation heads by valid Id and project context. - Delete allocation head with valid Id - Restrict DeleteAllocationHead to HTTP POST requests, Confirm deletion respects project Id scope

Dependencies & Called Services - Summary: Convert IFinalPlanModel during DeleteAllocationHead execution. - Convert IFinalPlanModel

AllocatedCost

Summary: Retrieve and filter project data, calculate FX rates, update cost allocations, and prepare data for presentation.

ActionResult FinalPlanController.AllocatedCost()

Routing

  • HTTP: GET
  • URL: /FinalPlan/AllocatedCost

Cross-layer call chain - FinalPlanController.AllocatedCost → Andromeda.Core.Entities.Activity.TotalEffort - FinalPlanController.AllocatedCost → Andromeda.Core.Entities.ActivityVariableCost.AssignProperties - FinalPlanController.AllocatedCost → Andromeda.Core.Entities.CostAllocations.SetCost - Andromeda.Core.Entities.ActivityVariableCost.AssignProperties → Andromeda.Core.Entities.Actor.GetLocation

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ActivityVariableCost_AssignProperties["Andromeda.Core.Entities.ActivityVariableCost.AssignProperties"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_CostAllocations_SetCost["Andromeda.Core.Entities.CostAllocations.SetCost"]
    FinalPlanController_AllocatedCost["FinalPlanController.AllocatedCost"]
    Andromeda_Core_Entities_ActivityVariableCost_AssignProperties --> Andromeda_Core_Entities_Actor_GetLocation
    FinalPlanController_AllocatedCost --> Andromeda_Core_Entities_ActivityVariableCost_AssignProperties
    FinalPlanController_AllocatedCost --> Andromeda_Core_Entities_Activity_TotalEffort
    FinalPlanController_AllocatedCost --> Andromeda_Core_Entities_CostAllocations_SetCost
View Metadata
  • View: AllocatedCost (Andromeda.Web\Views\FinalPlan\AllocatedCost.cshtml)
  • Model: IEnumerable<Andromeda.Core.Entities.ActivityVariableCost>
Detailed Analysis

Key Flows - update cost allocations - Calculate project FX rate with default fallback - assign properties - Exclude cost allocations with 'Asset Value' measurement unit - Update cost allocations using SetCost method

Performance Issues - Summary: Multiple database queries and LINQ operations cause performance and memory overhead. - Multiple database queries degrade performance on large datasets - LINQ methods on large datasets cause computational and memory overhead

Maintainability Issues - Summary: Hardcoded values and complex, tightly coupled code reduce maintainability and readability. - Tightly coupled code around SetCost and serialization hinders modifications

UX Impact Notes - Summary: Filtered cost allocations update ViewData - Filtered cost allocations stored in ViewData, ViewData controls displayed user data

Test Case Ideas - Summary: Verify filtering, serialization, FX rate calculation, cost allocation, ordering, and empty data handling. - Calculate FX rate with fallback to 1 for missing currency - Exclude cost allocations with 'Asset Value' measurement unit - Call SetCost for each allocation and update costs by currency and FX rate - Handle empty or missing activities

Dependencies & Called Services - Summary: Uses models and utilities to allocate costs across activities and processes. - Activity and ActivityVariableCost models, CostAllocations management, Enumerable utilities, Actor, Control, FinalPlan, Infra, and Process models, JavaScriptSerializer for data serialization, String operations

UpdateHead

Summary: UpdateHead decodes headInfo, updates existing head if headId > 0, otherwise inserts new head and returns the Id.

JsonResult FinalPlanController.UpdateHead()

Routing

  • HTTP: POST
  • URL: /FinalPlan/UpdateHead

Cross-layer call chain - FinalPlanController.UpdateHead → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    FinalPlanController_UpdateHead["FinalPlanController.UpdateHead"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    FinalPlanController_UpdateHead --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: UpdateHead decodes headInfo - updates existing head if headId > 0 - otherwise inserts new head and returns the Id. - Insert new head if headId <= 0 and update headId - Return JSON response with Id - Update existing head if headId > 0

Error Flows - Summary: Handle JSON deserialization errors and clarify conditional logic for headId and ID. - Unclear or incomplete conditional logic involving headId and ID

Security Issues - Summary: No security issues identified in UpdateHead method.

Maintainability Issues - Summary: UpdateHead method has tight coupling and unclear - Unclear and incomplete conditional logic around headId and ID impairs readability - Returned JSON object's 'Id' property lacks explicit definition

UX Impact Notes - Summary: Returns JSON with Id to enable UI updates and user feedback. - Return JSON object with Id - Enable client UI updates

Test Case Ideas - Summary: Test UpdateHead for correct update/insert logic - Valid 'headInfo' JSON updates or inserts successfully - Conditional logic with varying headId and ID values - headId ≤ 0 triggers model.InsertNewHead call and updates headId - Method returns JSON with expected 'Id' property - Method returns control without errors in edge cases

Dependencies & Called Services - Summary: UpdateHead method depends on IFinalPlanModel service. - Dependency on IFinalPlanModel service

DeleteMasterHead

Summary: DeleteMasterHead retrieves the Id from form data, converts it to integer, and deletes the master head via the model.

JsonResult FinalPlanController.DeleteMasterHead()

Routing

  • HTTP: POST
  • URL: /FinalPlan/DeleteMasterHead

Cross-layer call chain - FinalPlanController.DeleteMasterHead → Andromeda.Core.DataManager.Execute - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    FinalPlanController_DeleteMasterHead["FinalPlanController.DeleteMasterHead"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    FinalPlanController_DeleteMasterHead --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: DeleteMasterHead retrieves the Id from form data, converts it to integer, and deletes the master head via the model. - Retrieve 'Id' from form data, Convert 'Id' to integer, Call model's deletemasterhead method to delete master head

Error Flows - causing unhandled exceptions. - Missing or invalid Id causes unhandled exceptions

Security Issues - Summary: Unvalidated Request.Form['Id'] risks SQL injection and data tampering. - Unvalidated Request.Form['Id']

Maintainability Issues - Summary: Replace magic string 'Id' with a constant to improve maintainability. - Use constant for 'Id' key in Request.Form

Test Case Ideas - Summary: Test DeleteMasterHead method with valid, missing, and boundary 'Id' values. - Valid 'Id' value for successful deletion, Missing 'Id' value in form data, Boundary integer values for 'Id' conversion robustness

Dependencies & Called Services - Summary: DeleteMasterHead uses Convert and IFinalPlanModel services. - Convert service, IFinalPlanModel interface

GetPathActivitiesCycleTimeByProduct

Summary: Retrieve and process project activities by product to calculate and return cycle times as JSON.

JsonResult FinalPlanController.GetPathActivitiesCycleTimeByProduct(int ProductId)

Routing

  • HTTP: GET
  • URL: /FinalPlan/GetPathActivitiesCycleTimeByProduct

Cross-layer call chain - FinalPlanController.GetPathActivitiesCycleTimeByProduct → Andromeda.Core.Services.ProcessExtensions.FindByID - FinalPlanController.GetPathActivitiesCycleTimeByProduct → Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths["Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    FinalPlanController_GetPathActivitiesCycleTimeByProduct["FinalPlanController.GetPathActivitiesCycleTimeByProduct"]
    FinalPlanController_GetPathActivitiesCycleTimeByProduct --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    FinalPlanController_GetPathActivitiesCycleTimeByProduct --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - Summary: Retrieve and process project activities by product to calculate and return cycle times as JSON. - Return cycle time data as JSON

Error Flows - Summary: Handle missing data files and parsing errors by returning null without explicit error messages. - Return null if required data files are missing or parsing conditions fail - Return null on certain conditions without explicit error messages causing unhandled exceptions

Security Issues - Summary: Unvalidated configuration and file system access risks unauthorized file exposure. - Unvalidated ConfigurationManager.AppSettings usage - Unvalidated file system access

Performance Issues - Summary: Repeated database queries and inefficient large data handling degrade performance. - Expensive LINQ operations on large datasets impacting performance

Maintainability Issues - Summary: The method mixes concerns, uses unclear magic numbers and strings, and has poor naming and unclear object usage. - Use of unexplained magic numbers in array length checks reduces clarity

UX Impact Notes - Summary: Method risks null reference errors and lacks user feedback on errors. - Null return risks null reference exceptions

Test Case Ideas - Summary: Verify correct filtering, parsing, and cycle time calculations for activities by product. - Calculate start times, end times, delays, and cycle times with varied schedules - Filter activities by product ID, Parse Actor and EdgeInfo arrays with boundary lengths, Filter activities by deadline types Absolute and Relative - Handle no activities found for product

Dependencies & Called Services - Summary: Uses collections, date-time, math, and process-related models for data handling and calculations. - Array operations, DateTime manipulation, Dictionary usage, Enumerable collections, File handling, Actor, Control, and Process models, Integer operations, List collections, Math calculations, String operations, TimeSpan calculations - Process extensions

GetBetweenActsPathsCycleTime

Summary: Filter paths by activities, process schedule data for cycle time, load project files, and compute delays for JSON output.

JsonResult FinalPlanController.GetBetweenActsPathsCycleTime(int StartId, int EndId)

Routing

  • HTTP: GET
  • URL: /FinalPlan/GetBetweenActsPathsCycleTime

Cross-layer call chain - FinalPlanController.GetBetweenActsPathsCycleTime → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - FinalPlanController.GetBetweenActsPathsCycleTime → Andromeda.Core.Entities.Arrow.Clone - FinalPlanController.GetBetweenActsPathsCycleTime → Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths["Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths"]
    FinalPlanController_GetBetweenActsPathsCycleTime["FinalPlanController.GetBetweenActsPathsCycleTime"]
    FinalPlanController_GetBetweenActsPathsCycleTime --> Andromeda_Core_Entities_Arrow_Clone
    FinalPlanController_GetBetweenActsPathsCycleTime --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    FinalPlanController_GetBetweenActsPathsCycleTime --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
Detailed Analysis

Key Flows - Summary: Filter paths by activities, process schedule data for cycle time, load project files, and compute delays for JSON output. - Calculate cycle time from max end and min start times, Calculate maximum delay and wait periods from schedule data - Check existence and parse project actor and arrow files - Return results as JSON response

Error Flows - Summary: The method returns null or throws exceptions on missing data - Return null on missing or invalid data - Exceptions from unhandled Convert.ToInt32 and Convert.ToDouble errors

Security Issues - Summary: The method risks path traversal and unauthorized file access from unsanitized inputs. - Unauthorized file access via ConfigurationManager.AppSettings and System.IO.File with user inputs

Performance Issues - Summary: Optimize memory use and reduce redundant collection enumerations to improve performance. - Excessive ToList() and ToArray() calls on large datasets causing high memory use - Loading entire large files into memory at once

Maintainability Issues - Summary: Excessive method calls, unclear naming, magic values, and hardcoded strings reduce maintainability. - Excessive method calls and object initializations increase complexity, Use of unexplained magic numbers and strings reduces clarity, Non-descriptive variable names hinder understanding and maintenance, Hardcoded file names and config keys reduce flexibility and increase error risk, Anonymous types and complex LINQ expressions complicate debugging and maintenance

UX Impact Notes - Summary: Returning null or slow processing degrades UI responsiveness and timeline accuracy. - Returning null causes UI errors

Test Case Ideas - Summary: Verify correct path, cycle time, filtering, delay calculation, file handling, and performance. - Efficient performance with large datasets of activities - Processing multiple or no deadline paths for activities

Dependencies & Called Services - Summary: Uses collections, date-time, math, and model interfaces for processing cycle time. - Array for data storage, Arrow for data flow or transformation, Convert for type conversions, DateTime for time calculations, Dictionary for key-value mappings, Enumerable for collection operations, File for file handling, IActorModel interface for actor data, IFinalPlanModel interface for plan data, IProcessModel interface for process data, Int32 for integer operations, List for dynamic collections, Math for mathematical functions, String for text manipulation, TimeSpan for duration calculations

GetPrePathActs

Summary: GetPrePathActs retrieves and returns the complete pre-path activities for a given EndId in JSON format.

JsonResult FinalPlanController.GetPrePathActs(int EndId)

Routing

  • HTTP: GET
  • URL: /FinalPlan/GetPrePathActs
Detailed Analysis

Key Flows - Summary: GetPrePathActs retrieves and returns the complete pre-path activities for a given EndId in JSON format. - Return populated path IDs list as JSON

Error Flows - Summary: The method returns incomplete data without error on invalid inputs. - Returns empty or incomplete path data on errors

Performance Issues - Summary: Using FindByID in a loop causes inefficient data retrieval and degrades performance. - Inefficient data retrieval from FindByID in loop, Potential performance degradation due to repeated database calls

Maintainability Issues - Summary: Separate data retrieval and JSON response construction to improve maintainability. - Mixed data retrieval and JSON response construction, Lack of method separation for distinct tasks

UX Impact Notes - Summary: Returning JsonResult requires correct client-side JSON handling to ensure good UX. - JsonResult response, Client-side JSON handling, User experience dependency on JSON processing

Test Case Ideas - Summary: Verify GetPrePathActs handles GET requests and returns correct path IDs for valid EndId. - Handle HTTP GET requests correctly - Return correct path IDs for valid EndId

Dependencies & Called Services - Summary: Uses interfaces for actor, final plan, and process models with enumerable support. - Enumerable interface usage, IActorModel dependency, IFinalPlanModel dependency, IProcessModel dependency

DownLoadSchedFiles

Summary: Retrieve project ID, verify schedule files, and copy them to a temporary folder for processing.

ActionResult FinalPlanController.DownLoadSchedFiles()

Routing

  • HTTP: GET
  • URL: /FinalPlan/DownLoadSchedFiles

Cross-layer call chain - FinalPlanController.DownLoadSchedFiles → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    FinalPlanController_DownLoadSchedFiles["FinalPlanController.DownLoadSchedFiles"]
    FinalPlanController_DownLoadSchedFiles --> Andromeda_Core_Utility_Compress_CreateZip
Detailed Analysis

Key Flows - Summary: Retrieve project ID, verify schedule files, and copy them to a temporary folder for processing. - Check existence of schedule files in source directory - Retrieve project ID and construct file paths, Copy schedule files to temporary folder, Prepare files for compression or download

Error Flows - Summary: Handle errors from missing folders or files during download to ensure process reliability. - Failure to create temporary folder causes download delays or errors

Security Issues - Summary: Unvalidated inputs risk security breaches and path traversal vulnerabilities. - Unvalidated Registry.CurrentProjectId usage

Performance Issues - Summary: File copy operations slow for large files or cross-disk transfers. - Slow file copy for large files, Performance degradation when copying across different disks

Maintainability Issues - Summary: Hardcoded paths, incomplete code, and unhelpful comments reduce maintainability. - Use of hardcoded folder paths and file names, Incomplete or malformed code snippets, Non-informative comments

UX Impact Notes - Summary: Temporary folder or file copy failures cause download delays or errors. - Temporary folder creation failures delay or error user downloads, File copying errors cause incomplete or failed downloads

Test Case Ideas - Summary: Verify folder creation, file copying, filename handling, and path traversal security. - Temporary folder creation, Nonexistent project or temporary folders, File copy with varying sizes, Filename '.txt' extension appending, Path traversal attack prevention

Dependencies & Called Services - Summary: Uses compression, directory handling, file operations, and string manipulation services. - Compression service, Directory management, File operations, String manipulation