Skip to content

ProcessController

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

Overview

The ProcessController manages comprehensive process modeling, simulation, and management features within the application. It supports project creation, process map visualization and editing, activity and actor management, business rules and forms handling, and integration with external services for validation and analysis.

Feature Summary

  • Implements process modeling and simulation workflows including creation, enrichment, validation, and visualization of process maps.
  • Supports management of project activities, actors, products, business rules, forms, and deadlines.
  • Handles file uploads and downloads related to process maps, Excel templates, Visio diagrams, and project backups.
  • Facilitates asynchronous computations for effort, cost, controls, and team-related metrics.
  • Integrates with external APIs for PDF processing, semantic similarity checks, and AI data updates.
  • Provides bulk upload and update capabilities for activities, business rules, and related data.
  • Manages user interactions for merging activities, setting deadlines, updating volumes, and handling process re-imports.

UX Summary

  • Multiple views support user workflows including dashboards, process visualization, enrichment, validation, and detailed activity/product management.
  • AJAX and JSON responses are extensively used to provide dynamic UI updates and feedback.
  • Redirects and conditional UI flags control user navigation and workflow progression.
  • File upload and download operations impact user experience with potential delays and error messages.
  • Error handling and validation feedback vary in clarity, sometimes causing user confusion or degraded experience.
  • Asynchronous background processing affects UI responsiveness and requires client-side handling for smooth user flow.

Data Dependencies

  • Relies on project, activity, actor, arrow, product, business rule, and control models for data retrieval and updates.
  • Uses process map models to manage shapes, swimlanes, edges, and related XML representations.
  • Interacts with external services for PDF processing, AI data generation, and semantic similarity computations.
  • Handles file system operations for saving and loading Excel, Visio, JSON, and backup files.
  • Maintains session and TempData for state management during multi-step workflows.
  • Performs JSON deserialization and serialization extensively for data exchange and processing.

Authentication / Authorization Notes

  • Authentication and authorization are implied but inconsistently enforced across methods.
  • Several methods lack explicit input validation and role checks, risking injection and unauthorized data access.
  • Some actions expose sensitive operations like project deletion and data updates without clear permission enforcement.
  • Session and request data are often used without sanitization, increasing security risks.
  • Role-based access control is partially implemented but requires strengthening to prevent bypasses.

Controller Call Chain Diagram

flowchart TD
    Andromeda_Core_Constants_GetSkill["Andromeda.Core.Constants.GetSkill"]
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_DataManager_ExecuteScalar["Andromeda.Core.DataManager.ExecuteScalar"]
    Andromeda_Core_DataManager_ExecuteScalar2["Andromeda.Core.DataManager.ExecuteScalar2"]
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_DataManager_GetDataSet["Andromeda.Core.DataManager.GetDataSet"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Activity_Effort["Andromeda.Core.Entities.Activity.Effort"]
    Andromeda_Core_Entities_Activity_GetNVAType["Andromeda.Core.Entities.Activity.GetNVAType"]
    Andromeda_Core_Entities_Activity_IterationEffort["Andromeda.Core.Entities.Activity.IterationEffort"]
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Activity_getAutomationType["Andromeda.Core.Entities.Activity.getAutomationType"]
    Andromeda_Core_Entities_Activity_getFrequency["Andromeda.Core.Entities.Activity.getFrequency"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkEndTimeUTC["Andromeda.Core.Entities.Actor.WorkEndTimeUTC"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeUTC["Andromeda.Core.Entities.Actor.WorkStartTimeUTC"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_EdgeInfo_Clone["Andromeda.Core.Entities.EdgeInfo.Clone"]
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_Gantt_ActivityDelay["Andromeda.Core.Entities.Gantt.ActivityDelay"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor["Andromeda.Core.Entities.Gantt.HourlyEffortByActor"]
    Andromeda_Core_Entities_Gantt_TeamCountByHourly["Andromeda.Core.Entities.Gantt.TeamCountByHourly"]
    Andromeda_Core_Entities_MIPrediction_GetConfidence["Andromeda.Core.Entities.MIPrediction.GetConfidence"]
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_OutProcessProps_getDay["Andromeda.Core.Entities.OutProcessProps.getDay"]
    Andromeda_Core_Entities_PathData_GetPathIds["Andromeda.Core.Entities.PathData.GetPathIds"]
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Entities_Roles_GetRolesForUser["Andromeda.Core.Entities.Roles.GetRolesForUser"]
    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_Entities_ShapeInfo_Clone["Andromeda.Core.Entities.ShapeInfo.Clone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Core_Extensions_LinqExtensions_DaysConverter["Andromeda.Core.Extensions.LinqExtensions.DaysConverter"]
    Andromeda_Core_Extensions_LinqExtensions_DistinctBy["Andromeda.Core.Extensions.LinqExtensions.DistinctBy"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_Extensions_LinqExtensions_GetTransfeModesName["Andromeda.Core.Extensions.LinqExtensions.GetTransfeModesName"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceAtOnce["Andromeda.Core.Extensions.LinqExtensions.ReplaceAtOnce"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialChar"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_Extensions_LinqExtensions_ToNameString["Andromeda.Core.Extensions.LinqExtensions.ToNameString"]
    Andromeda_Core_Extensions_LinqExtensions_ToOrdinalHtmlString["Andromeda.Core.Extensions.LinqExtensions.ToOrdinalHtmlString"]
    Andromeda_Core_Extensions_LinqExtensions_ToOrdinalString["Andromeda.Core.Extensions.LinqExtensions.ToOrdinalString"]
    Andromeda_Core_Extensions_LinqExtensions_ZeroHandledInRound["Andromeda.Core.Extensions.LinqExtensions.ZeroHandledInRound"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Models_ModelHelper_GetProjectDetails["Andromeda.Core.Models.ModelHelper.GetProjectDetails"]
    Andromeda_Core_Services_Algorithms_Delooper_ChangeEffort["Andromeda.Core.Services.Algorithms.Delooper.ChangeEffort"]
    Andromeda_Core_Services_Algorithms_Delooper_ChangeVolume["Andromeda.Core.Services.Algorithms.Delooper.ChangeVolume"]
    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_Algorithms_Delooper_PopulateConnectedActivities["Andromeda.Core.Services.Algorithms.Delooper.PopulateConnectedActivities"]
    Andromeda_Core_Services_Algorithms_Delooper_PopulateUnitMapping["Andromeda.Core.Services.Algorithms.Delooper.PopulateUnitMapping"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN["Andromeda.Core.Services.BPMN.BPMNGenerate.ExportBPMN"]
    Andromeda_Core_Services_CsvHelper_ReadHeader["Andromeda.Core.Services.CsvHelper.ReadHeader"]
    Andromeda_Core_Services_CsvHelper_ReadallErrors["Andromeda.Core.Services.CsvHelper.ReadallErrors"]
    Andromeda_Core_Services_CsvHelper_readRecords["Andromeda.Core.Services.CsvHelper.readRecords"]
    Andromeda_Core_Services_ExcelGenerator_CellReferenceToIndex["Andromeda.Core.Services.ExcelGenerator.CellReferenceToIndex"]
    Andromeda_Core_Services_ExcelGenerator_CloneRow["Andromeda.Core.Services.ExcelGenerator.CloneRow"]
    Andromeda_Core_Services_ExcelGenerator_GetCellValue["Andromeda.Core.Services.ExcelGenerator.GetCellValue"]
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    Andromeda_Core_Services_ExcelGenerator_UpdateCell["Andromeda.Core.Services.ExcelGenerator.UpdateCell"]
    Andromeda_Core_Services_ExcelGenerator_VerifyExcel["Andromeda.Core.Services.ExcelGenerator.VerifyExcel"]
    Andromeda_Core_Services_KClusters_MinCluster["Andromeda.Core.Services.KClusters.MinCluster"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_Registry_GetPermissions["Andromeda.Core.Services.Registry.GetPermissions"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Services_TimeRange_ContainsValue["Andromeda.Core.Services.TimeRange.ContainsValue"]
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX["Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX"]
    Andromeda_Core_Services_VdxTraversal_BuildGraph["Andromeda.Core.Services.VdxTraversal.BuildGraph"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    Andromeda_Core_Utility_Compress_UnzipFolder["Andromeda.Core.Utility.Compress.UnzipFolder"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Andromeda_Core_Utility_VdxGenerate_ExportVDX["Andromeda.Core.Utility.VdxGenerate.ExportVDX"]
    Andromeda_Validation_ProcessMapValidation_RemoveConnectorsAndDuplicate["Andromeda.Validation.ProcessMapValidation.RemoveConnectorsAndDuplicate"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    Andromeda_Validation_ProcessMapValidation_ValidateOutProcessActivities["Andromeda.Validation.ProcessMapValidation.ValidateOutProcessActivities"]
    Andromeda_Validation_ShapeEntity_isConnector["Andromeda.Validation.ShapeEntity.isConnector"]
    Andromeda_Validation_SwimlaneInfo_Clone["Andromeda.Validation.SwimlaneInfo.Clone"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_Helpers_DaysConverter["Insorce.Helpers.Helpers.DaysConverter"]
    Insorce_Helpers_Helpers_GetIndividualPath["Insorce.Helpers.Helpers.GetIndividualPath"]
    Insorce_Helpers_Helpers_SetDashboardIdToCookie["Insorce.Helpers.Helpers.SetDashboardIdToCookie"]
    Insorce_Helpers_Helpers_getDashboardIdFromCookie["Insorce.Helpers.Helpers.getDashboardIdFromCookie"]
    Insorce_Helpers_Helpers_getSkillLevel["Insorce.Helpers.Helpers.getSkillLevel"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    Insorce_Models_UsersModel_FromMembershipUser["Insorce.Models.UsersModel.FromMembershipUser"]
    ProcessController_AHTEffortUpdate["ProcessController.AHTEffortUpdate"]
    ProcessController_ActivityProduct["ProcessController.ActivityProduct"]
    ProcessController_AddTimer["ProcessController.AddTimer"]
    ProcessController_BulkAHTUpdate["ProcessController.BulkAHTUpdate"]
    ProcessController_BulkUploadExcel["ProcessController.BulkUploadExcel"]
    ProcessController_BusinessRules["ProcessController.BusinessRules"]
    ProcessController_ChangeDecisionToProcessActivity["ProcessController.ChangeDecisionToProcessActivity"]
    ProcessController_ChangeSuccessorActivitiesIOProcess["ProcessController.ChangeSuccessorActivitiesIOProcess"]
    ProcessController_CheckVisioValidations["ProcessController.CheckVisioValidations"]
    ProcessController_Checksynonyms["ProcessController.Checksynonyms"]
    ProcessController_ComputeBRsRelatedData["ProcessController.ComputeBRsRelatedData"]
    ProcessController_ComputeControlsData["ProcessController.ComputeControlsData"]
    ProcessController_ComputeEffortData["ProcessController.ComputeEffortData"]
    ProcessController_ComputeEffortRelatedData["ProcessController.ComputeEffortRelatedData"]
    ProcessController_ComputeHRCostData["ProcessController.ComputeHRCostData"]
    ProcessController_ComputeInfraCostData["ProcessController.ComputeInfraCostData"]
    ProcessController_ComputeTeamsRelatedData["ProcessController.ComputeTeamsRelatedData"]
    ProcessController_CreateOrUpdateErrorsVisio["ProcessController.CreateOrUpdateErrorsVisio"]
    ProcessController_CreateProject["ProcessController.CreateProject"]
    ProcessController_CreateProject_Old["ProcessController.CreateProject_Old"]
    ProcessController_CreateSimulationChild["ProcessController.CreateSimulationChild"]
    ProcessController_CreateXMLForActivityProps["ProcessController.CreateXMLForActivityProps"]
    ProcessController_DProjTemp["ProcessController.DProjTemp"]
    ProcessController_DataInputs["ProcessController.DataInputs"]
    ProcessController_DeadLines["ProcessController.DeadLines"]
    ProcessController_DeleteActivityBR["ProcessController.DeleteActivityBR"]
    ProcessController_DeleteActivityForm["ProcessController.DeleteActivityForm"]
    ProcessController_DeleteBR["ProcessController.DeleteBR"]
    ProcessController_DeleteProduct["ProcessController.DeleteProduct"]
    ProcessController_DownloadActivityBulkUpload["ProcessController.DownloadActivityBulkUpload"]
    ProcessController_DownloadBPMN["ProcessController.DownloadBPMN"]
    ProcessController_DownloadErrorVisio["ProcessController.DownloadErrorVisio"]
    ProcessController_DownloadFileFromPath["ProcessController.DownloadFileFromPath"]
    ProcessController_DownloadFormMaster["ProcessController.DownloadFormMaster"]
    ProcessController_DownloadPeriodicActivitiesProp["ProcessController.DownloadPeriodicActivitiesProp"]
    ProcessController_DownloadProjectXmls["ProcessController.DownloadProjectXmls"]
    ProcessController_DownloadVisio["ProcessController.DownloadVisio"]
    ProcessController_EditBaseProcessMap["ProcessController.EditBaseProcessMap"]
    ProcessController_EditProductName["ProcessController.EditProductName"]
    ProcessController_EnrichProcessMap["ProcessController.EnrichProcessMap"]
    ProcessController_ExcelProject["ProcessController.ExcelProject"]
    ProcessController_FetchPDFStatus["ProcessController.FetchPDFStatus"]
    ProcessController_FormBRActivity["ProcessController.FormBRActivity"]
    ProcessController_FormBRMaster["ProcessController.FormBRMaster"]
    ProcessController_Forms["ProcessController.Forms"]
    ProcessController_FormsAndBRMapping["ProcessController.FormsAndBRMapping"]
    ProcessController_FormsBRMapping["ProcessController.FormsBRMapping"]
    ProcessController_GenerateExcelBulkUpload["ProcessController.GenerateExcelBulkUpload"]
    ProcessController_GeolocateTeamSize["ProcessController.GeolocateTeamSize"]
    ProcessController_GeolocateWorkingHours["ProcessController.GeolocateWorkingHours"]
    ProcessController_GetActivitiesBreakUp["ProcessController.GetActivitiesBreakUp"]
    ProcessController_GetAllClusters["ProcessController.GetAllClusters"]
    ProcessController_GetBrSimilarity["ProcessController.GetBrSimilarity"]
    ProcessController_GetClusterData["ProcessController.GetClusterData"]
    ProcessController_GetClusterFlowActivities["ProcessController.GetClusterFlowActivities"]
    ProcessController_GetDeadlineObservations["ProcessController.GetDeadlineObservations"]
    ProcessController_GetDecisionOutputs["ProcessController.GetDecisionOutputs"]
    ProcessController_GetDecisionVolumes["ProcessController.GetDecisionVolumes"]
    ProcessController_GetEffReworkEffort["ProcessController.GetEffReworkEffort"]
    ProcessController_GetEffortReworkEffort["ProcessController.GetEffortReworkEffort"]
    ProcessController_GetFormSimilarity["ProcessController.GetFormSimilarity"]
    ProcessController_GetGenAIData["ProcessController.GetGenAIData"]
    ProcessController_GetMIPredictionsData["ProcessController.GetMIPredictionsData"]
    ProcessController_GetMasterExcelData["ProcessController.GetMasterExcelData"]
    ProcessController_GetMinimumFTEandCycleTime["ProcessController.GetMinimumFTEandCycleTime"]
    ProcessController_GetObservationSched["ProcessController.GetObservationSched"]
    ProcessController_GetObservationsforAHT["ProcessController.GetObservationsforAHT"]
    ProcessController_GetProcessBatchActs["ProcessController.GetProcessBatchActs"]
    ProcessController_GetProcessWaitTypes["ProcessController.GetProcessWaitTypes"]
    ProcessController_GetProjDataForGenAI["ProcessController.GetProjDataForGenAI"]
    ProcessController_GetRevisedMinFTE["ProcessController.GetRevisedMinFTE"]
    ProcessController_GetReworkLoopsInscopeOutscope["ProcessController.GetReworkLoopsInscopeOutscope"]
    ProcessController_GetSchedObservations["ProcessController.GetSchedObservations"]
    ProcessController_GetSinkAndsourceVolume["ProcessController.GetSinkAndsourceVolume"]
    ProcessController_GetStandardizationHistory["ProcessController.GetStandardizationHistory"]
    ProcessController_GetTeamActivities["ProcessController.GetTeamActivities"]
    ProcessController_ImportProcessmap["ProcessController.ImportProcessmap"]
    ProcessController_Index["ProcessController.Index"]
    ProcessController_IsModelValidationNodeReviewed["ProcessController.IsModelValidationNodeReviewed"]
    ProcessController_IsObservationAccordionReviewed["ProcessController.IsObservationAccordionReviewed"]
    ProcessController_MergeActivities["ProcessController.MergeActivities"]
    ProcessController_MergeActivity["ProcessController.MergeActivity"]
    ProcessController_MoveToSystemTeam["ProcessController.MoveToSystemTeam"]
    ProcessController_PDFDataToNERModel["ProcessController.PDFDataToNERModel"]
    ProcessController_PermanentDeleteProject["ProcessController.PermanentDeleteProject"]
    ProcessController_ProceedFinalJSON["ProcessController.ProceedFinalJSON"]
    ProcessController_ProcessFlowSimulation["ProcessController.ProcessFlowSimulation"]
    ProcessController_ProcessMapDetails["ProcessController.ProcessMapDetails"]
    ProcessController_ProcessMapRejections["ProcessController.ProcessMapRejections"]
    ProcessController_ProcessPDFJSON["ProcessController.ProcessPDFJSON"]
    ProcessController_ProjectSOPImageReading["ProcessController.ProjectSOPImageReading"]
    ProcessController_ReImportDiagramConfirm["ProcessController.ReImportDiagramConfirm"]
    ProcessController_ReUploadTemplateExcel["ProcessController.ReUploadTemplateExcel"]
    ProcessController_ReadDataFromFile["ProcessController.ReadDataFromFile"]
    ProcessController_ReadReimportExcelData["ProcessController.ReadReimportExcelData"]
    ProcessController_ReadUploadedJSON["ProcessController.ReadUploadedJSON"]
    ProcessController_Reimport["ProcessController.Reimport"]
    ProcessController_RemoveBR["ProcessController.RemoveBR"]
    ProcessController_RemoveForm["ProcessController.RemoveForm"]
    ProcessController_RemoveMilestone["ProcessController.RemoveMilestone"]
    ProcessController_RenamePropeties["ProcessController.RenamePropeties"]
    ProcessController_ReplaceProductToActivities["ProcessController.ReplaceProductToActivities"]
    ProcessController_ReviewProcessMap["ProcessController.ReviewProcessMap"]
    ProcessController_SaveFormBrs["ProcessController.SaveFormBrs"]
    ProcessController_SaveProcessDeadLines["ProcessController.SaveProcessDeadLines"]
    ProcessController_SaveProcessWaitTypesReleaseConstraint["ProcessController.SaveProcessWaitTypesReleaseConstraint"]
    ProcessController_SaveProductForSelectedActs["ProcessController.SaveProductForSelectedActs"]
    ProcessController_SaveProductParentFactors["ProcessController.SaveProductParentFactors"]
    ProcessController_SaveProductVolumeDecisionVolFormula["ProcessController.SaveProductVolumeDecisionVolFormula"]
    ProcessController_SaveVolumeProduct["ProcessController.SaveVolumeProduct"]
    ProcessController_SaveinMasterTempTable["ProcessController.SaveinMasterTempTable"]
    ProcessController_SemanticCheckBetweenLists["ProcessController.SemanticCheckBetweenLists"]
    ProcessController_ShowCrunchedHistory["ProcessController.ShowCrunchedHistory"]
    ProcessController_SuggestedNewName["ProcessController.SuggestedNewName"]
    ProcessController_UpdataExcelData["ProcessController.UpdataExcelData"]
    ProcessController_UpdateActivitiesBrs["ProcessController.UpdateActivitiesBrs"]
    ProcessController_UpdateActivitiesFormModes["ProcessController.UpdateActivitiesFormModes"]
    ProcessController_UpdateActivityDetails["ProcessController.UpdateActivityDetails"]
    ProcessController_UpdateBulkDOE["ProcessController.UpdateBulkDOE"]
    ProcessController_UpdateCluster["ProcessController.UpdateCluster"]
    ProcessController_UpdateDOE["ProcessController.UpdateDOE"]
    ProcessController_UpdateFORMBRMaster["ProcessController.UpdateFORMBRMaster"]
    ProcessController_UpdateFinalJSONto3Cubed["ProcessController.UpdateFinalJSONto3Cubed"]
    ProcessController_UpdateInputErrorStatus["ProcessController.UpdateInputErrorStatus"]
    ProcessController_UpdateIsNERModelExecuted["ProcessController.UpdateIsNERModelExecuted"]
    ProcessController_UpdateIsProjectStarted["ProcessController.UpdateIsProjectStarted"]
    ProcessController_UpdateVolumeFormula["ProcessController.UpdateVolumeFormula"]
    ProcessController_UpdateVolumes["ProcessController.UpdateVolumes"]
    ProcessController_UploadActivityDetails["ProcessController.UploadActivityDetails"]
    ProcessController_UploadBulkActivityFile["ProcessController.UploadBulkActivityFile"]
    ProcessController_UploadProjectBackup["ProcessController.UploadProjectBackup"]
    ProcessController_UploadTemplateExcel["ProcessController.UploadTemplateExcel"]
    ProcessController_ValidateAndSaveDiaram["ProcessController.ValidateAndSaveDiaram"]
    ProcessController_ValidateExcelTemplate["ProcessController.ValidateExcelTemplate"]
    ProcessController_ValidateFormsBrsSynonyms["ProcessController.ValidateFormsBrsSynonyms"]
    ProcessController_ValidateProduct["ProcessController.ValidateProduct"]
    ProcessController_ValidateVisioFromSOP["ProcessController.ValidateVisioFromSOP"]
    ProcessController_Volume["ProcessController.Volume"]
    ProcessController_asynComputeBRsData["ProcessController.asynComputeBRsData"]
    ProcessController_asynComputeControlsData["ProcessController.asynComputeControlsData"]
    ProcessController_asynComputeEffortData["ProcessController.asynComputeEffortData"]
    ProcessController_asynComputeEffortRelatedData["ProcessController.asynComputeEffortRelatedData"]
    ProcessController_asynComputeTeamsRelatedData["ProcessController.asynComputeTeamsRelatedData"]
    ProcessController_getProceeMapPageData["ProcessController.getProceeMapPageData"]
    ProcessController_saveDiagram["ProcessController.saveDiagram"]
    System_Web_Mvc_LargeJsonResult_JsonEncode["System.Web.Mvc.LargeJsonResult.JsonEncode"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_DataManager_GetDataSet --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_GetDataSet --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Entities_Gantt_ActivityDelay --> Andromeda_Core_Services_TimeRange_ContainsValue
    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_OutProcessProps_getDay --> Andromeda_Core_Extensions_LinqExtensions_ToNameString
    Andromeda_Core_Entities_OutProcessProps_getDay --> Andromeda_Core_Extensions_LinqExtensions_ToOrdinalHtmlString
    Andromeda_Core_Entities_OutProcessProps_getDay --> Andromeda_Core_Extensions_LinqExtensions_ToOrdinalString
    Andromeda_Core_Entities_Roles_GetRolesForUser --> Andromeda_Core_Entities_Roles_GetRolesForUser
    Andromeda_Core_Models_ModelHelper_GetProjectDetails --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Models_ModelHelper_GetProjectDetails --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN --> Andromeda_Validation_ProcessMapValidation_RemoveConnectorsAndDuplicate
    Andromeda_Core_Services_ExcelGenerator_VerifyExcel --> Andromeda_Core_Utility_Compress_CreateZip
    Andromeda_Core_Services_ExcelGenerator_VerifyExcel --> Andromeda_Core_Utility_Compress_UnzipFolder
    Andromeda_Core_Services_Registry_GetPermissions --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX --> Andromeda_Core_Utility_Compress_CreateZip
    Andromeda_Core_Services_VdxTraversal_BuildGraph --> Andromeda_Core_Entities_ShapeInfo_Clone
    Andromeda_Core_Services_VdxTraversal_BuildGraph --> Andromeda_Validation_ShapeEntity_isConnector
    Andromeda_Core_Utility_VdxGenerate_ExportVDX --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    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
    Insorce_Helpers_Helpers_DaysConverter --> Andromeda_Core_Extensions_LinqExtensions_DaysConverter
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_Arrow_Clone
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_EdgeInfo_Clone
    Insorce_Helpers_Helpers_getSkillLevel --> Andromeda_Core_Constants_GetSkill
    Insorce_Helpers_Helpers_getSkillLevel --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse --> Andromeda_Core_LoggingManager_Error
    ProcessController_AHTEffortUpdate --> Andromeda_Core_LoggingManager_Error
    ProcessController_ActivityProduct --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_AddTimer --> Andromeda_Core_Entities_ShapeInfo_Clone
    ProcessController_BulkAHTUpdate --> Andromeda_Core_LoggingManager_Error
    ProcessController_BulkUploadExcel --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_BulkUploadExcel --> Andromeda_Core_Entities_Roles_GetRolesForUser
    ProcessController_BulkUploadExcel --> Andromeda_Core_Extensions_LinqExtensions_DistinctBy
    ProcessController_BulkUploadExcel --> Andromeda_Core_LoggingManager_Error
    ProcessController_BulkUploadExcel --> Andromeda_Core_LoggingManager_Exception
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_BulkUploadExcel --> Insorce_Models_UserProfile_GetUserProfile
    ProcessController_BulkUploadExcel --> Insorce_Models_UsersModel_FromMembershipUser
    ProcessController_BusinessRules --> Andromeda_Core_Entities_MIPrediction_GetConfidence
    ProcessController_BusinessRules --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_BusinessRules --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_BusinessRules --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ChangeDecisionToProcessActivity --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ChangeDecisionToProcessActivity --> Andromeda_Core_Extensions_LinqExtensions_GetPathIds
    ProcessController_ChangeDecisionToProcessActivity --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ChangeSuccessorActivitiesIOProcess --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ChangeSuccessorActivitiesIOProcess --> Andromeda_Core_Entities_ShapeInfo_Clone
    ProcessController_ChangeSuccessorActivitiesIOProcess --> Andromeda_Core_Extensions_LinqExtensions_GetPathIds
    ProcessController_CheckVisioValidations --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_CheckVisioValidations --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_CheckVisioValidations --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CheckVisioValidations --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_Checksynonyms --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeBRsRelatedData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeControlsData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeEffortData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeEffortRelatedData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeHRCostData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeInfraCostData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ComputeTeamsRelatedData --> Andromeda_Core_LoggingManager_Exception
    ProcessController_CreateOrUpdateErrorsVisio --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_CreateProject --> Andromeda_Core_DataManager_Execute
    ProcessController_CreateProject --> Andromeda_Core_DataManager_ExecuteScalar
    ProcessController_CreateProject --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_CreateProject --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_CreateProject --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_CreateProject --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CreateProject --> Insorce_Models_UserProfile_GetUserProfile
    ProcessController_CreateProject_Old --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_CreateProject_Old --> Andromeda_Core_LoggingManager_Error
    ProcessController_CreateProject_Old --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_CreateProject_Old --> Insorce_Models_UserProfile_GetUserProfile
    ProcessController_CreateSimulationChild --> Andromeda_Core_DataManager_Execute
    ProcessController_CreateSimulationChild --> Andromeda_Core_DataManager_GetDataSet
    ProcessController_CreateSimulationChild --> Andromeda_Core_Extensions_LinqExtensions_ReplaceAtOnce
    ProcessController_CreateSimulationChild --> Andromeda_Core_LoggingManager_Error
    ProcessController_CreateXMLForActivityProps --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_DProjTemp --> Andromeda_Core_Utility_Compress_CreateZip
    ProcessController_DataInputs --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_DataInputs --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_DataInputs --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_PopulateConnectedActivities
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_DataInputs --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_DeadLines --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    ProcessController_DeleteActivityBR --> Andromeda_Core_LoggingManager_Error
    ProcessController_DeleteActivityForm --> Andromeda_Core_LoggingManager_Error
    ProcessController_DeleteBR --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_DeleteProduct --> Andromeda_Core_DataManager_Execute
    ProcessController_DownloadActivityBulkUpload --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_DownloadActivityBulkUpload --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_DownloadBPMN --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_DownloadBPMN --> Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN
    ProcessController_DownloadErrorVisio --> Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX
    ProcessController_DownloadFileFromPath --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_DownloadFormMaster --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_DownloadFormMaster --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Activity_getFrequency
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkEndTimeUTC
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkStartTimeUTC
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_OutProcessProps_getDay
    ProcessController_DownloadProjectXmls --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_DownloadProjectXmls --> Andromeda_Core_Utility_Compress_CreateZip
    ProcessController_DownloadVisio --> Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX
    ProcessController_DownloadVisio --> Andromeda_Core_Utility_VdxGenerate_ExportVDX
    ProcessController_EditBaseProcessMap --> Andromeda_Core_LoggingManager_Info
    ProcessController_EditBaseProcessMap --> Andromeda_Core_Services_Registry_GetPermissions
    ProcessController_EditProductName --> Andromeda_Core_DataManager_Execute
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Gantt_ActivityDelay
    ProcessController_EnrichProcessMap --> Andromeda_Core_Extensions_LinqExtensions_ZeroHandledInRound
    ProcessController_EnrichProcessMap --> Andromeda_Core_LoggingManager_Error
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_ChangeEffort
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_PopulateConnectedActivities
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ExcelProject --> Andromeda_Core_Services_ExcelGenerator_GetCellValue
    ProcessController_ExcelProject --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_FetchPDFStatus --> Andromeda_Core_LoggingManager_Info
    ProcessController_FormBRActivity --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_FormBRMaster --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_Forms --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_Forms --> Andromeda_Core_Entities_MIPrediction_GetConfidence
    ProcessController_Forms --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_FormsBRMapping --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_FormsBRMapping --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Entities_Activity_GetNVAType
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_LoggingManager_Error
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Services_ExcelGenerator_CloneRow
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Services_ExcelGenerator_UpdateCell
    ProcessController_GeolocateTeamSize --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GeolocateTeamSize --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_GeolocateWorkingHours --> Andromeda_Core_Entities_PathData_GetPathIds
    ProcessController_GetActivitiesBreakUp --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetActivitiesBreakUp --> Andromeda_Core_Entities_Activity_IterationEffort
    ProcessController_GetActivitiesBreakUp --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_GetAllClusters --> Andromeda_Core_Services_KClusters_MinCluster
    ProcessController_GetBrSimilarity --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_GetClusterData --> Insorce_Helpers_ClusterHelper_GenerateCluster
    ProcessController_GetClusterFlowActivities --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_GetClusterFlowActivities --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_GetDeadlineObservations --> Andromeda_Core_DataManager_GetDataList
    ProcessController_GetDecisionOutputs --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_GetDecisionOutputs --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_GetDecisionVolumes --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_GetEffReworkEffort --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetEffReworkEffort --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_GetEffortReworkEffort --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_GetEffortReworkEffort --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GetFormSimilarity --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_GetGenAIData --> Andromeda_Core_DataManager_ExecuteScalar2
    ProcessController_GetMIPredictionsData --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar
    ProcessController_GetMIPredictionsData --> Andromeda_Core_Services_Registry_GetPermissions
    ProcessController_GetMasterExcelData --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_GetMinimumFTEandCycleTime --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GetMinimumFTEandCycleTime --> Insorce_Helpers_Helpers_DaysConverter
    ProcessController_GetObservationSched --> Andromeda_Core_DataManager_GetData
    ProcessController_GetObservationsforAHT --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetObservationsforAHT --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GetObservationsforAHT --> Andromeda_Core_Entities_PathData_GetPathIds
    ProcessController_GetProcessBatchActs --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_GetProcessWaitTypes --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_GetProcessWaitTypes --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_GetNVAType
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_getAutomationType
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Actor_WorkEndTimeUTC
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Actor_WorkStartTimeUTC
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Extensions_LinqExtensions_GetTransfeModesName
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_GetRevisedMinFTE --> Andromeda_Core_DataManager_ExecuteScalar
    ProcessController_GetRevisedMinFTE --> Insorce_Helpers_Helpers_DaysConverter
    ProcessController_GetReworkLoopsInscopeOutscope --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_GetReworkLoopsInscopeOutscope --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_GetSchedObservations --> Andromeda_Core_DataManager_GetDataList
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_GetStandardizationHistory --> Andromeda_Core_DataManager_GetData
    ProcessController_GetTeamActivities --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ImportProcessmap --> Andromeda_Core_LoggingManager_Error
    ProcessController_ImportProcessmap --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ImportProcessmap --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_ImportProcessmap --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_ImportProcessmap --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_Index --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_Index --> Insorce_Helpers_Helpers_SetDashboardIdToCookie
    ProcessController_Index --> Insorce_Helpers_Helpers_getDashboardIdFromCookie
    ProcessController_IsModelValidationNodeReviewed --> Andromeda_Core_LoggingManager_Error
    ProcessController_IsObservationAccordionReviewed --> Andromeda_Core_LoggingManager_Error
    ProcessController_IsObservationAccordionReviewed --> Andromeda_Core_LoggingManager_Info
    ProcessController_MergeActivities --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_MergeActivity --> System_Web_Mvc_LargeJsonResult_JsonEncode
    ProcessController_MoveToSystemTeam --> Andromeda_Validation_SwimlaneInfo_Clone
    ProcessController_PDFDataToNERModel --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_PermanentDeleteProject --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_ProceedFinalJSON --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_ProceedFinalJSON --> Andromeda_Core_LoggingManager_Info
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Gantt_ActivityDelay
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Gantt_TeamCountByHourly
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ProcessMapDetails --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ProcessMapDetails --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ProcessMapDetails --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_ProcessMapRejections --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ProcessMapRejections --> Andromeda_Core_Entities_PathData_GetPathIds
    ProcessController_ProcessPDFJSON --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_ProjectSOPImageReading --> Andromeda_Core_LoggingManager_Error
    ProcessController_ProjectSOPImageReading --> Andromeda_Core_LoggingManager_Info
    ProcessController_ReImportDiagramConfirm --> Andromeda_Core_LoggingManager_Error
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Services_Registry_GetPermissions
    ProcessController_ReadDataFromFile --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_ReadDataFromFile --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace
    ProcessController_ReadDataFromFile --> Andromeda_Core_LoggingManager_Error
    ProcessController_ReadDataFromFile --> Andromeda_Core_LoggingManager_Info
    ProcessController_ReadDataFromFile --> Andromeda_Core_Services_ExcelGenerator_CellReferenceToIndex
    ProcessController_ReadDataFromFile --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ReadReimportExcelData --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_ReadReimportExcelData --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ReadReimportExcelData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ReadUploadedJSON --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ReadUploadedJSON --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ReadUploadedJSON --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_ReadUploadedJSON --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_Reimport --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_RemoveBR --> Andromeda_Core_LoggingManager_Error
    ProcessController_RemoveForm --> Andromeda_Core_LoggingManager_Error
    ProcessController_RemoveMilestone --> Andromeda_Core_DataManager_Execute
    ProcessController_RenamePropeties --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_RenamePropeties --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_ReplaceProductToActivities --> Andromeda_Core_LoggingManager_Error
    ProcessController_ReviewProcessMap --> Andromeda_Core_Entities_EdgeInfo_Clone
    ProcessController_ReviewProcessMap --> Andromeda_Core_Entities_ShapeInfo_Clone
    ProcessController_ReviewProcessMap --> Andromeda_Core_Services_VdxTraversal_BuildGraph
    ProcessController_SaveFormBrs --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_SaveProcessDeadLines --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveProcessWaitTypesReleaseConstraint --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveProductForSelectedActs --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveProductParentFactors --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_SaveVolumeProduct --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveVolumeProduct --> Andromeda_Core_LoggingManager_Exception
    ProcessController_SaveVolumeProduct --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_SaveVolumeProduct --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_Entities_Roles_GetRolesForUser
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_LoggingManager_Exception
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_SaveinMasterTempTable --> Insorce_Models_UserProfile_GetUserProfile
    ProcessController_SaveinMasterTempTable --> Insorce_Models_UsersModel_FromMembershipUser
    ProcessController_SemanticCheckBetweenLists --> Andromeda_Core_LoggingManager_Error
    ProcessController_ShowCrunchedHistory --> Andromeda_Core_DataManager_ExecuteScalar2
    ProcessController_SuggestedNewName --> Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse
    ProcessController_UpdataExcelData --> Andromeda_Core_Services_ExcelGenerator_CellReferenceToIndex
    ProcessController_UpdataExcelData --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_UpdateActivitiesBrs --> Andromeda_Core_LoggingManager_Error
    ProcessController_UpdateActivitiesFormModes --> Andromeda_Core_LoggingManager_Error
    ProcessController_UpdateActivityDetails --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateActivityDetails --> Andromeda_Core_DataManager_GetDataList
    ProcessController_UpdateActivityDetails --> Andromeda_Core_LoggingManager_Error
    ProcessController_UpdateBulkDOE --> Andromeda_Core_LoggingManager_Error
    ProcessController_UpdateCluster --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateDOE --> Andromeda_Core_Extensions_LinqExtensions_DistinctBy
    ProcessController_UpdateFORMBRMaster --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_UpdateFinalJSONto3Cubed --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_UpdateInputErrorStatus --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateIsNERModelExecuted --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateIsProjectStarted --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateIsProjectStarted --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_UpdateVolumeFormula --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateVolumes --> Andromeda_Core_LoggingManager_Error
    ProcessController_UpdateVolumes --> Andromeda_Core_Services_Algorithms_Delooper_ChangeVolume
    ProcessController_UpdateVolumes --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_UploadActivityDetails --> Andromeda_Core_Services_CsvHelper_ReadHeader
    ProcessController_UploadActivityDetails --> Andromeda_Core_Services_CsvHelper_ReadallErrors
    ProcessController_UploadActivityDetails --> Andromeda_Core_Services_CsvHelper_readRecords
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Extensions_LinqExtensions_DistinctBy
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Services_CsvHelper_ReadHeader
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Services_CsvHelper_ReadallErrors
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Services_CsvHelper_readRecords
    ProcessController_UploadProjectBackup --> Andromeda_Core_LoggingManager_Error
    ProcessController_UploadProjectBackup --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_UploadTemplateExcel --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_UploadTemplateExcel --> Andromeda_Core_LoggingManager_Error
    ProcessController_UploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_UploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Validation_ProcessMapValidation_ValidateOutProcessActivities
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_LoggingManager_Error
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Services_ExcelGenerator_VerifyExcel
    ProcessController_ValidateExcelTemplate --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_ValidateFormsBrsSynonyms --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ValidateProduct --> Andromeda_Core_DataManager_GetDataList
    ProcessController_ValidateProduct --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ValidateVisioFromSOP --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ValidateVisioFromSOP --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ValidateVisioFromSOP --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_Volume --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_Volume --> Andromeda_Core_LoggingManager_Exception
    ProcessController_Volume --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_Volume --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_Volume --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_Volume --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_asynComputeBRsData --> Insorce_Helpers_ClusterHelper_GenerateCluster
    ProcessController_asynComputeControlsData --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_asynComputeControlsData --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_asynComputeControlsData --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_asynComputeControlsData --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_asynComputeControlsData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_asynComputeControlsData --> Insorce_Helpers_ClusterHelper_GenerateCluster
    ProcessController_asynComputeControlsData --> Insorce_Helpers_Helpers_GetIndividualPath
    ProcessController_asynComputeEffortData --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_asynComputeEffortData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_asynComputeEffortData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Entities_Gantt_HourlyEffortByActor
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_PopulateUnitMapping
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_asynComputeEffortRelatedData --> Insorce_Helpers_Helpers_getSkillLevel
    ProcessController_asynComputeTeamsRelatedData --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_asynComputeTeamsRelatedData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_getProceeMapPageData --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_saveDiagram --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_saveDiagram --> Andromeda_Core_LoggingManager_Error

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
activityproduct ActivityProduct - Andromeda.Web\Views\Process\ActivityProduct.cshtml
aht AHT - Andromeda.Web\Views\Process\AHT.cshtml
businessrules BusinessRules - Andromeda.Web\Views\Process\BusinessRules.cshtml
checkvisiovalidations CheckVisioValidations List<Andromeda.Validation.VisioError> Andromeda.Web\Views\Process\CheckVisioValidations.cshtml
controldata ControlData Tuple<int,string> Andromeda.Web\Views\Process\ControlData.cshtml
createproject CreateProject IList<Andromeda.Validation.VisioError> Andromeda.Web\Views\Process\CreateProject.cshtml
customerexperience CustomerExperience - Andromeda.Web\Views\Process\CustomerExperience.cshtml
datainputs DataInputs Tuple<IList<Andromeda.Core.Entities.Actor>, IList<Andromeda.Core.Entities.Activity>, List<Andromeda.Core.Entities.Arrow>> Andromeda.Web\Views\Process\DataInputs.cshtml
deadlines DeadLines - Andromeda.Web\Views\Process\DeadLines.cshtml
deadlinesactivities DeadlinesActivities - Andromeda.Web\Views\Process\DeadlinesActivities.cshtml
editbaseprocessmap EditBaseProcessMap - Andromeda.Web\Views\Process\EditBaseProcessMap.cshtml
editprocessdata EditProcessData - Andromeda.Web\Views\Process\EditProcessData.cshtml
editskillcompetency EditSkillCompetency - Andromeda.Web\Views\Process\EditSkillCompetency.cshtml
enrichprocessmap EnrichProcessMap Tuple<IList<Andromeda.Core.Entities.Arrow>, IList<Andromeda.Core.Entities.EnrichActivityModel>, List<Andromeda.Core.Entities.Arrow>> Andromeda.Web\Views\Process\EnrichProcessMap.cshtml
enrichprocessmap2 EnrichProcessMap2 Tuple<IList<Andromeda.Core.Entities.Arrow>, IList<Andromeda.Core.Entities.EnrichActivityModel>, List<Andromeda.Core.Entities.Arrow>> Andromeda.Web\Views\Process\EnrichProcessMap2.cshtml
exceltemplate ExcelTemplate - Andromeda.Web\Views\Process\ExcelTemplate.cshtml
excelvisioconfirmationdialogues ExcelVisioConfirmationDialogues - Andromeda.Web\Views\Process\ExcelVisioConfirmationDialogues.cshtml
fixvalidationerrors FixValidationErrors IList<Andromeda.Validation.VisioError> Andromeda.Web\Views\Process\FixValidationErrors.cshtml
formbractivity FormBRActivity - Andromeda.Web\Views\Process\FormBRActivity.cshtml
formbrmaster FormBRMaster - Andromeda.Web\Views\Process\FormBRMaster.cshtml
forms Forms - Andromeda.Web\Views\Process\Forms.cshtml
formsandbrmapping FormsAndBRMapping - Andromeda.Web\Views\Process\FormsAndBRMapping.cshtml
formsbrmapping FormsBRMapping - Andromeda.Web\Views\Process\FormsBRMapping.cshtml
geolocateteamsize GeolocateTeamSize - Andromeda.Web\Views\Process\GeolocateTeamSize.cshtml
geolocateworkinghours GeolocateWorkingHours - Andromeda.Web\Views\Process\GeolocateWorkingHours.cshtml
hormonizeteams HormonizeTeams - Andromeda.Web\Views\Process\HormonizeTeams.cshtml
index Index IList<Andromeda.Core.Entities.CustomWidgetView> Andromeda.Web\Views\Process\Index.cshtml
mergeactivities MergeActivities List<MergeActivity> Andromeda.Web\Views\Process\MergeActivities.cshtml
mxgraph mxGraph Tuple<int,string, int, int> Andromeda.Web\Views\Process\mxGraph.cshtml
partialprocesscreation PartialProcessCreation - Andromeda.Web\Views\Process\PartialProcessCreation.cshtml
periodicactivities PeriodicActivities - Andromeda.Web\Views\Process\PeriodicActivities.cshtml
processcreation ProcessCreation - Andromeda.Web\Views\Process\ProcessCreation.cshtml
processflowsimulation ProcessFlowSimulation IList<Andromeda.Core.Entities.EnrichActivityModel> Andromeda.Web\Views\Process\ProcessFlowSimulation.cshtml
processmaprejections ProcessMapRejections - Andromeda.Web\Views\Process\ProcessMapRejections.cshtml
processmapvisualization ProcessMapVisualization Tuple<Andromeda.Core.Entities.ProjectData, IList<Andromeda.Core.Entities.Arrow>, List<Andromeda.Core.Entities.CustomizeView>> Andromeda.Web\Views\Process\ProcessMapVisualization.cshtml
product Product - Andromeda.Web\Views\Process\Product.cshtml
projectmapping ProjectMapping - Andromeda.Web\Views\Process\ProjectMapping.cshtml
relasestartconstraint RelaseStartConstraint - Andromeda.Web\Views\Process\RelaseStartConstraint.cshtml
releaseformsactivities ReleaseFormsActivities - Andromeda.Web\Views\Process\ReleaseFormsActivities.cshtml
reviewprocessmap ReviewProcessMap - Andromeda.Web\Views\Process\ReviewProcessMap.cshtml
sourcecolumnmapping SourceColumnMapping object Andromeda.Web\Views\Process\SourceColumnMapping.cshtml
systemsandapplications SystemsandApplications - Andromeda.Web\Views\Process\SystemsandApplications.cshtml
validation Validation IList<Andromeda.Validation.VisioError> Andromeda.Web\Views\Process\Validation.cshtml
visiovalidation VisioValidation IList<Andromeda.Core.Entities.VisioError> Andromeda.Web\Views\Process\VisioValidation.cshtml
volume Volume - Andromeda.Web\Views\Process\Volume.cshtml
waittypes WaitTypes - Andromeda.Web\Views\Process\WaitTypes.cshtml

Methods at a Glance

Command / Save Operations

Type Method HTTP URL Summary
entrypoint AddTimer POST /Process/AddTimer AddTimer initializes context, creates and configures timer shapes and edges...
entrypoint UpdateCopiedActivities `` /Process/UpdateCopiedActivities UpdateCopiedActivities duplicates project activities and arrows, updates...
entrypoint SaveProductFactor POST /Process/SaveProductFactor Save a new product factor from form data and return the matching product factor...
entrypoint EditProductName POST /Process/EditProductName EditProductName updates product details and logs name changes if detected.
entrypoint RecalculateVolumes POST /Process/RecalculateVolumes RecalculateVolumes calls UpdateVolumes using a valid ProjectId.
entrypoint UpdateVolumes `` /Process/UpdateVolumes Update activity volumes by ensuring actor counts meet minimum FTE requirements.
entrypoint GetRootActivities `` /Process/GetRootActivities Filter activities with single source and target arrows, merge arrow properties...
entrypoint UpdateActivityRecords `` /Process/UpdateActivityRecords UpdateActivityRecords matches and updates valid activity records based on...
entrypoint UpdateAHT POST /Process/UpdateAHT UpdateAHT retrieves activity records, updates bulk AHT values, saves config...
entrypoint UpdateActivityDetails POST /Process/UpdateActivityDetails Retrieve valid session activities, update activity details, and save...
entrypoint SaveGraphic POST /Process/SaveGraphic No key flows are defined for the SaveGraphic method.
entrypoint SaveCustomExpression POST /Process/SaveCustomExpression SaveCustomExpression reads POST request data to create a CustomExpression...
entrypoint SaveActivityBatchAllAny POST /Process/SaveActivityBatchAllAny Decode input JSONs, conditionally save batches and activities, then save...
entrypoint MergeActivity POST /Process/MergeActivity MergeActivity retrieves, filters, and merges activities, updates references and...
entrypoint BulkAHTUpdate POST /Process/BulkAHTUpdate Decode activities and update AHT in bulk; save configuration if next stage...
entrypoint BulkAHTUndesiredUpdate POST /Process/BulkAHTUndesiredUpdate BulkAHTUndesiredUpdate decodes JSON, groups data by undesired outcome, updates...
entrypoint BulkUpdateCluster POST /Process/BulkUpdateCluster Decode valid JSON activities, group and aggregate ActivityIds, then update...
entrypoint BulkFormsUpdate POST /Process/BulkFormsUpdate Decode activities from the request, update their properties, save...
entrypoint RemoveUndoForm POST /Process/RemoveUndoForm RemoveUndoForm deletes specified activity data from session undoFormData and...
entrypoint RemoveUndoBR POST /Process/RemoveUndoBR RemoveUndoBR retrieves an activity ID from the request, removes the matching...
entrypoint DeleteActivityForm POST /Process/DeleteActivityForm Decode JSON request, delete specified activity properties, update undo data and...
entrypoint InsertActivityForms POST /Process/InsertActivityForms Extract and convert activity form data from the POST request, then set activity...
entrypoint SaveTeamsInOutScope POST /Process/SaveTeamsInOutScope SaveTeamsInOutScope updates teams and either saves configuration and redirects...
entrypoint SaveMilestoneUndesired POST /Process/SaveMilestoneUndesired Update project review and milestone status, save configuration, then return...
entrypoint UpdateAllAnyMode POST /Process/UpdateAllAnyMode No key flows are defined for the UpdateAllAnyMode method.
entrypoint RemoveForm POST /Process/RemoveForm RemoveForm deletes a form from the current project, updates review status, and...
entrypoint SaveFormBRMaster POST /Process/SaveFormBRMaster No key flows are defined for the SaveFormBRMaster method.
entrypoint SaveProductForSelectedActs POST /Process/SaveProductForSelectedActs Extract IDs from the request and update the product for specified activities.
entrypoint EditSkillCompetency GET /Process/EditSkillCompetency Retrieve project data, filter related actors and activities, and prepare...
entrypoint UpdateMode POST /Process/UpdateMode UpdateMode decodes JSON, updates arrow modes for activities, conditionally...
entrypoint ClusterRankingOnDemand GET /Process/ClusterRankingOnDemand Retrieve project data and configuration, perform cluster analysis, and return...
entrypoint CreateXMLForActivityProps `` /Process/CreateXMLForActivityProps Convert shape and activity data into XML, ensure project folder exists, and...
entrypoint BulkUndesiredUpdate POST /Process/BulkUndesiredUpdate Decode activities from JSON, group by undesired outcome, update each in bulk...
entrypoint UpdateBulkDOE POST /Process/UpdateBulkDOE UpdateBulkDOE decodes JSON, updates DOE activity properties, sets reviewed...
entrypoint ImplementLOT POST /Process/ImplementLOT Extract form data, filter product factors and activities, then update activity...
entrypoint SaveVolumeProduct POST /Process/SaveVolumeProduct Extract form data, update volumes and configuration, recalculate metrics...
entrypoint ReplaceProductToActivities POST /Process/ReplaceProductToActivities ReplaceProductToActivities updates activity products and product review status...
entrypoint DeleteSystems POST /Process/DeleteSystems DeleteSystems handles a POST request to delete DOE properties for the current...
entrypoint asynComputeEffortData `` /Process/asynComputeEffortData Retrieve project data, compute weighted automation efforts, update project...
entrypoint asynComputeInfraCostData `` /Process/asynComputeInfraCostData Retrieve multiple models' data, compute infrastructure costs, update project...
entrypoint UpdateNVAandActivityProperties `` /Process/UpdateNVAandActivityProperties Consolidate and update activity properties by resolving correct ActivityIds...
entrypoint GetActivityFromJson `` /Process/GetActivityFromJson Parse JSON array to create ActivityTemplate objects with mapped properties and...
entrypoint UpdateIsProjectStarted POST /Process/UpdateIsProjectStarted UpdateIsProjectStarted handles a POST request to mark a project as started and...
entrypoint InsertFetchedData POST /Process/InsertFetchedData InsertFetchedData handles an HTTP POST request to update project data using...
entrypoint UpdateVolumeFormula POST /Process/UpdateVolumeFormula UpdateVolumeFormula updates the volume formula when both ID and VolumeFormula...
entrypoint UpdateAHTBetweenRange POST /Process/UpdateAHTBetweenRange The method decodes range data, updates activities with AHT outside limits, and...
entrypoint HormonizeTeams GET /Process/HormonizeTeams Load and parse project XML to populate UI data and update ViewData with NER...
entrypoint SaveAllStartVolumes POST /Process/SaveAllStartVolumes Retrieve project ID, parse start volume actions, create Activity objects...
entrypoint UpdateIsNERModelExecuted POST /Process/UpdateIsNERModelExecuted The method updates the NER model execution status to true for the current...

Export & Reporting

Type Method HTTP URL Summary
entrypoint DownloadBPMN GET /Process/DownloadBPMN DownloadBPMN retrieves project data, generates BPMN XML, and converts it to...
entrypoint DownloadProjectRecovery `` /Process/DownloadProjectRecovery DownloadProjectRecovery has no defined key flows.
entrypoint GetSinkAndsourceVolume GET /Process/GetSinkAndsourceVolume Extracts data from models to calculate volumes, consolidates paths, and...
entrypoint FetchPDFStatus GET /Process/FetchPDFStatus Send a POST request with project details, handle the HTTP response...
entrypoint ProcessPDFJSON POST /Process/ProcessPDFJSON ProcessPDFJSON handles PDF data extraction and JSON conversion.
entrypoint DownloadPeriodicActivitiesProp GET /Process/DownloadPeriodicActivitiesProp DownloadPeriodicActivitiesProp fetches project data, calculates actor efforts...
entrypoint PDFDataToNERModel POST /Process/PDFDataToNERModel The method processes JSON nodes to create shapes, edges, swimlanes, updates the...
entrypoint SavePDFFinalData `` /Process/SavePDFFinalData Process JSON data to build swimlanes, shapes, and edges collections, update...

File & Import Operations

Type Method HTTP URL Summary
entrypoint CreateProject POST /Process/CreateProject CreateProject verifies project uniqueness, creates the project, and uploads a...
entrypoint GetImportedChanges POST /Process/GetImportedChanges The method processes POST data, checks for Visio errors, updates MapDetails...
entrypoint ReValidateAndImport POST /Process/ReValidateAndImport Process form data without validation errors, call TraverseAndSave if not...
entrypoint CreateProject POST /Process/CreateProject CreateProject verifies project uniqueness, creates the project, and uploads a...
entrypoint CreateProject_Old POST /Process/CreateProject_Old Extract project details, validate uniqueness, handle file uploads, create...
entrypoint ExcelProject `` /Process/ExcelProject The method processes .csv or .xlsx files to extract headers, map them to...
entrypoint ProjectMapping POST /Process/ProjectMapping Ensure target directory exists, save uploaded file, process it, and return JSON...
entrypoint ReadDataFromFile POST /Process/ReadDataFromFile No overall behaviour summary returned
entrypoint Reimport POST /Process/Reimport Process valid '.vsdx' or '.vsdm' files by saving, optionally unzipping...
entrypoint ImportProcessMapChanges `` /Process/ImportProcessMapChanges ImportProcessMapChanges updates a process map and copied activities for a given...
entrypoint ReImportDiagramConfirm `` /Process/ReImportDiagramConfirm ReImportDiagramConfirm validates session data, handles Visio errors, processes...
entrypoint ReImportDiagramNo `` /Process/ReImportDiagramNo The method clears the 'dataxml' session variable and returns a success JSON...
entrypoint DownloadVisio POST /Process/DownloadVisio DownloadVisio generates VSDX files when 'Type' is not 'vdx' and filters...
entrypoint DownloadFileFromPath GET /Process/DownloadFileFromPath DownloadFileFromPath validates the file parameter, returns the file with...
entrypoint GetProjectXML GET /Process/GetProjectXML GetProjectXML returns the XML file for a valid ProjectID by constructing the...
entrypoint GetErrorProjectXML GET /Process/GetErrorProjectXML GetErrorProjectXML returns the XML file for a valid SessionID.
entrypoint DownloadActivityDetails `` /Process/DownloadActivityDetails Retrieve and filter project activity details, aggregate specific properties...
entrypoint UploadActivityDetails POST /Process/UploadActivityDetails UploadActivityDetails detects duplicate activity IDs and returns them in a JSON...
entrypoint GetUpdatedActivityRecords `` /Process/GetUpdatedActivityRecords GetUpdatedActivityRecords filters and updates activity records based on...
entrypoint DownloadProjectXmls GET /Process/DownloadProjectXmls DownloadProjectXmls exports project data to XML, optionally compresses it...
entrypoint CreateSimulationChild GET /Process/CreateSimulationChild Create a simulation child project, copy necessary files, and redirect or...
entrypoint DownloadFormMaster `` /Process/DownloadFormMaster DownloadFormMaster processes project activity properties to extract, group, and...
entrypoint DownloadActivityBulkUpload `` /Process/DownloadActivityBulkUpload Process bulk upload by branching on activity 'type' to set headers and generate...
entrypoint UploadAHTFile POST /Process/UploadAHTFile Uploads a valid AHT file, calls UploadBulkActivityFile with headers, and...
entrypoint UploadBulkSqFeets POST /Process/UploadBulkSqFeets The method processes an uploaded file via POST, validates headers, and returns...
entrypoint UploadBulkAHT POST /Process/UploadBulkAHT UploadBulkAHT processes bulk AHT data uploads efficiently.
entrypoint UploadBulkCluster POST /Process/UploadBulkCluster UploadBulkCluster processes a valid file upload via HTTP POST and returns a...
entrypoint UploadBulkBRs POST /Process/UploadBulkBRs No key flows defined for UploadBulkBRs method.
entrypoint UploadBulkBRwithSkills POST /Process/UploadBulkBRwithSkills Receives a file via HTTP POST, processes it with UploadBulkActivityFile, and...
entrypoint UploadBulkFormBRMaster POST /Process/UploadBulkFormBRMaster The method receives a file via HTTP POST, validates headers, and processes the...
entrypoint UploadFormMaster POST /Process/UploadFormMaster Receive valid file, pass it with headers to UploadBulkActivityFile, return...
entrypoint UploadBulkFormsFromMapping POST /Process/UploadBulkFormsFromMapping The method handles an HTTP POST file upload, processes it via...
entrypoint UploadProductForm POST /Process/UploadProductForm UploadProductForm processes a valid CSV upload, validates and updates product...
entrypoint UploadFormActivity POST /Process/UploadFormActivity UploadFormActivity validates and saves uploaded files, parses CSV data, and...
entrypoint UploadFormBrs POST /Process/UploadFormBrs UploadFormBrs validates and saves a CSV file, parses its content, processes and...
entrypoint UploadBRsActivities POST /Process/UploadBRsActivities UploadBRsActivities processes an uploaded file, validates and parses CSV data...
entrypoint UploadBulkForm POST /Process/UploadBulkForm Process HTTP POST file upload, handle it via UploadBulkActivityFile, and return...
entrypoint UploadBulkDOE POST /Process/UploadBulkDOE UploadBulkDOE processes a file upload via POST, delegates processing, and...
entrypoint UploadBulkActivityFile `` /Process/UploadBulkActivityFile No overall behaviour summary returned
entrypoint ImportProcessmap POST /Process/ImportProcessmap ImportProcessmap handles various file types by saving, validating, processing...
entrypoint UpdataExcelData `` /Process/UpdataExcelData The method processes Excel data to update activity details, calculate timing...
entrypoint GetMinimumFTEandCycleTime GET /Process/GetMinimumFTEandCycleTime Calculate minimum FTE per actor and cycle time by processing activity data and...
entrypoint ValidateExcelTemplate `` /Process/ValidateExcelTemplate ValidateExcelTemplate verifies the Excel file structure, processes and groups...
entrypoint UploadTemplateExcel POST /Process/UploadTemplateExcel UploadTemplateExcel processes an uploaded Excel file to extract and update...
entrypoint DeleteActivityProperties POST /Process/DeleteActivityProperties The method processes CSV files or calls SaveFormBrs for non-CSV files.
entrypoint ReUploadTemplateExcel POST /Process/ReUploadTemplateExcel Validate project ID, process uploaded Excel sheets, map data to database...
entrypoint ReadReimportExcelData POST /Process/ReadReimportExcelData Read Excel data, validate headers, update project entities, and asynchronously...
entrypoint ResetReImportData POST /Process/ResetReImportData ResetReImportData handles POST requests by clearing session data and returning...
entrypoint ValidateMavenExcel POST /Process/ValidateMavenExcel ValidateMavenExcel saves the uploaded file, validates it using...
entrypoint ExcelTemplate GET /Process/ExcelTemplate The method handles an HTTP GET request and returns a View to the client.
entrypoint UpdateErrorsXMLFile POST /Process/UpdateErrorsXMLFile Decode JSON data from the request, convert to typed collections, and update the...
entrypoint CreateOrUpdateErrorsVisio `` /Process/CreateOrUpdateErrorsVisio Transform input data into XML, manage file paths and directories, and save the...
entrypoint GenerateExcelBulkUpload `` /Process/GenerateExcelBulkUpload GenerateExcelBulkUpload initializes paths, retrieves project data, processes...
entrypoint GetMasterExcelData `` /Process/GetMasterExcelData GetMasterExcelData retrieves and processes master Excel data for application...
entrypoint BulkUploadExcel POST /Process/BulkUploadExcel BulkUploadExcel saves the file, processes activity and business data with...
entrypoint SaveExcelErrorsinFile POST /Process/SaveExcelErrorsinFile SaveExcelErrorsinFile creates necessary directories, writes trimmed error...
entrypoint ClearExcelErrorsinFile POST /Process/ClearExcelErrorsinFile ClearExcelErrorsinFile deletes the Excel error file if it exists and confirms...
entrypoint UploadProjectBackup POST /Process/UploadProjectBackup Validate and process a '.bak' project backup by extracting, verifying...
entrypoint DProjTemp GET /Process/DProjTemp Retrieve project details, generate multiple Excel bulk upload files, and create...
entrypoint UpdateandGenerateExcel `` /Process/UpdateandGenerateExcel Process form data to create activity objects with constraints, handle...
entrypoint DownloadExcelFromTempPath GET /Process/DownloadExcelFromTempPath Returns Excel file as ActionResult when TempData contains a valid file path.
entrypoint ProjectJSONReading POST /Process/ProjectJSONReading The method validates the file extension and returns a response based on JSON...
entrypoint ReadUploadedJSON `` /Process/ReadUploadedJSON The method decodes JSON, processes nodes and edges, validates the process map...
entrypoint ProjectSOPImageReading POST /Process/ProjectSOPImageReading Uploads a valid file, saves it, sends image data to a PDF API, and returns...
entrypoint DownloadErrorVisio GET /Process/DownloadErrorVisio DownloadErrorVisio retrieves project data, parses XML to extract diagram info...
entrypoint SavePDFData POST /Process/SavePDFData Retrieve project data, validate JSON upload success and user errors, then...
entrypoint ReviewProcessMap GET /Process/ReviewProcessMap Load and parse project XML to extract process map elements, prepare view data...
entrypoint LoadPDFMap `` /Process/LoadPDFMap LoadPDFMap retrieves the project folder, finds 'Input_' files, and returns the...

Query & View Methods

Type Method HTTP URL Summary
entrypoint Index `` /Process/Index Sets dashboard ID cookie and retrieves project data when 'view' parameter is...
entrypoint GetControActvities GET /Process/GetControActvities Retrieve all control activities, enrich each with related data, and return the...
entrypoint getProceeMapPageData `` /Process/getProceeMapPageData No key flows are defined for the getProceeMapPageData method.
entrypoint GetControlsAppliedActivities GET /Process/GetControlsAppliedActivities Retrieve activities by ProjectID, convert each category to comma-separated...
entrypoint DeleteGraphic POST /Process/DeleteGraphic DeleteGraphic retrieves the graphic ID from the request and locates the...
entrypoint GetDecisionOutputs GET /Process/GetDecisionOutputs Retrieve and filter project data to identify decision activities and construct...
entrypoint GetDeadlineActivities GET /Process/GetDeadlineActivities Fetch deadline activities for the current project, filtering by activity ID or...
entrypoint GetActivityConstraintAndBatchData GET /Process/GetActivityConstraintAndBatchData Retrieve and filter project arrow details by successor and release type, map...
entrypoint CustomerExperience GET /Process/CustomerExperience Handles HTTP GET requests by rendering and returning a view to the client.
entrypoint GetEffortReworkEffort GET /Process/GetEffortReworkEffort Retrieve project activities, calculate total and rework effort, and return...
entrypoint GetReworkLoopsInscopeOutscope `` /Process/GetReworkLoopsInscopeOutscope Retrieve project-related data, calculate metrics for in-scope and out-scope...
entrypoint GetRevisedMinFTE GET /Process/GetRevisedMinFTE Retrieve ProjectId, calculate revised minimum FTE cycle time, convert units...
entrypoint GetAllClusters GET /Process/GetAllClusters Retrieve project data, perform cluster analysis on activities by actor and...
entrypoint RelaseStartConstraint GET /Process/RelaseStartConstraint RelaseStartConstraint handles an HTTP GET request, retrieves project activities...
entrypoint DeadlinesActivities GET /Process/DeadlinesActivities The method handles an HTTP GET request, reads project XML data, joins...
entrypoint GetTeamActivities GET /Process/GetTeamActivities GetTeamActivities fetches and filters project activities by TeamId, returning...
entrypoint GetModeIdFromsName `` /Process/GetModeIdFromsName The method finds a TransferModes object by name and returns its Id.
entrypoint GetObservationsforVolume GET /Process/GetObservationsforVolume Retrieve project data, filter activities by type and predecessors, identify...
entrypoint GetDeadlineObservations GET /Process/GetDeadlineObservations Retrieve project data, analyze scheduling increases, filter and group deadline...
entrypoint GetSchedObservations GET /Process/GetSchedObservations Retrieve scheduled observations for the current project, round times, and...
entrypoint GetObservationSched GET /Process/GetObservationSched GetObservationSched retrieves the current project ID and calls the actor model...
entrypoint Product `` /Process/Product Fetch project activities and related data, handle empty activities by...
entrypoint AHT `` /Process/AHT Fetch project activities and related data, handle missing activities by...
entrypoint PeriodicActivities `` /Process/PeriodicActivities Retrieve project activities and related data, redirect if none, then prepare...
entrypoint GeolocateWorkingHours `` /Process/GeolocateWorkingHours Fetch project data, identify key activities, analyze paths for undesired ends...
entrypoint GeolocateTeamSize `` /Process/GeolocateTeamSize Filter active, non-system actors and set ViewData with actors, FX rates, and...
entrypoint GetFormSimilarity GET /Process/GetFormSimilarity Retrieve project and template forms, compare them using semantic similarity...
entrypoint GetStandardizationHistory GET /Process/GetStandardizationHistory GetStandardizationHistory fetches, sorts by DoneDate descending, and returns...
entrypoint ComputeHRCostData GET /Process/ComputeHRCostData Retrieve project details, start async HR cost computation in background, and...
entrypoint ComputeInfraCostData GET /Process/ComputeInfraCostData Retrieve project details, start async cost computation in background, and...
entrypoint GetActivitiesBreakUp GET /Process/GetActivitiesBreakUp Retrieve project actors and their activities, filter and map data, then return...
entrypoint ShowCrunchedHistory GET /Process/ShowCrunchedHistory ShowCrunchedHistory returns JSON immediately if project ID is zero, otherwise...
entrypoint GetProjDataForGenAI GET /Process/GetProjDataForGenAI Retrieve project ID, fetch related activities and actors with locations, then...
entrypoint GetGenAIData GET /Process/GetGenAIData Retrieve the current project ID and return valid JSON data as a JsonResult.

Validation & Rules

Type Method HTTP URL Summary
entrypoint ProcessFlowSimulation GET /Process/ProcessFlowSimulation Process project data to validate activities, enrich details, generate...
entrypoint ValidateAndSaveDiaram POST /Process/ValidateAndSaveDiaram Decode and validate process map data, handle errors, update statuses, and save...
entrypoint ValidateProcessMap POST /Process/ValidateProcessMap ValidateProcessMap extracts form data, processes map details, checks Visio...
entrypoint ProcessMapDetails `` /Process/ProcessMapDetails Decode JSON inputs into objects, validate map data, and handle errors if saving...
entrypoint ProjectNameExists GET /Process/ProjectNameExists The method checks if a project exists and returns a JSON with a message and...
entrypoint GetProcessMapChanges `` /Process/GetProcessMapChanges Validate input, retrieve and compare project data to identify changes...
entrypoint MapValidationErrors GET /Process/MapValidationErrors Initialize view properties and process session data to display validation...
entrypoint ValidationErrors GET /Process/ValidationErrors The method processes valid 'dataxml' session data, sets ViewData, and returns...
entrypoint Validation GET /Process/Validation The method validates a project with optional parameters, filters errors based...
entrypoint InputValidation GET /Process/InputValidation InputValidation processes multiple case types but many implementations are...
entrypoint ValidateProduct GET /Process/ValidateProduct ValidateProduct retrieves project data, validates the activity product root...
entrypoint CheckDeletedActivities `` /Process/CheckDeletedActivities Retrieve activities, check for deletions, collect error messages, and return...
entrypoint SaveMergeRules POST /Process/SaveMergeRules SaveMergeRules processes a POST request with valid JSON, updates project ID...
entrypoint MergeActivitiesValidation GET /Process/MergeActivitiesValidation Retrieve and filter project activities, map them to enriched MergeActivity...
entrypoint MoveToSystemTeam POST /Process/MoveToSystemTeam The method validates team shapes by actor ID and clones the first matching team...
entrypoint checkDeleteActivity POST /Process/checkDeleteActivity Check for dependencies on an activity before allowing its deletion and return...
entrypoint DeleteSimulationChild POST /Process/DeleteSimulationChild DeleteSimulationChild validates simulationProjId, calls DiscardSimulationChild...
entrypoint SaveUpdateFormsBrs POST /Process/SaveUpdateFormsBrs Decode JSON properties, create ActivityProperty objects from business rules...
entrypoint BulkBusinessRulesUpdate POST /Process/BulkBusinessRulesUpdate Decode activities, update business rule properties, save configurations, and...
entrypoint SaveProductForm `` /Process/SaveProductForm Map products to filtered form entries and insert concatenated entries as...
entrypoint SaveFormBrs `` /Process/SaveFormBrs Initialize and populate form business rules dictionaries, convert them to...
entrypoint UpdateActivitiesBrs POST /Process/UpdateActivitiesBrs Decode JSON activities, apply business rules, update session and activity data...
entrypoint DeleteActivityBR POST /Process/DeleteActivityBR Decode JSON request, delete specified activity properties, update undo data and...
entrypoint CopyBrsFromTree POST /Process/CopyBrsFromTree Copy business rules from the project tree, create implementation plans, and...
entrypoint FormsAndBRMapping GET /Process/FormsAndBRMapping Retrieve project data, process activities and properties, then map forms to...
entrypoint FormsBRMapping GET /Process/FormsBRMapping Retrieve and process project data, perform clustering, and filter business...
entrypoint BusinessRules GET /Process/BusinessRules Retrieve project data, process business rules and automation paths, then...
entrypoint InsertBusinessRulesForTags POST /Process/InsertBusinessRulesForTags Process request form differently based on presence of 'BRs' key.
entrypoint InsertActivityBRules POST /Process/InsertActivityBRules InsertActivityBRules processes activity properties or handles empty activity...
entrypoint UpdateDOE POST /Process/UpdateDOE UpdateDOE checks for 'DataInputs' in the request form to trigger additional...
entrypoint FormBRMaster GET /Process/FormBRMaster Retrieve and process project activities, business rules, and forms, then...
entrypoint RemoveBR POST /Process/RemoveBR RemoveBR deletes a business rule, updates review status, and returns the...
entrypoint UpdateFORMBRMaster POST /Process/UpdateFORMBRMaster UpdateFORMBRMaster decodes and deletes old forms and rules, inserts new master...
entrypoint DeleteBR `` /Process/DeleteBR DeleteBR removes business rule properties and updates related product form...
entrypoint CheckVisioValidations GET /Process/CheckVisioValidations CheckVisioValidations loads error XML, parses elements, saves data if no...
entrypoint GetTeamActivityCompetency GET /Process/GetTeamActivityCompetency The method filters project activities by TeamId and returns those with business...
entrypoint Checksynonyms POST /Process/Checksynonyms Process new properties to map business rules, retrieve synonyms, detect...
entrypoint ValidateFormsBrsSynonyms POST /Process/ValidateFormsBrsSynonyms Decode JSON form data, retrieve synonyms for each property, detect duplicates...
entrypoint CheckPathMeetsatSameEnd GET /Process/CheckPathMeetsatSameEnd Load project activities and arrows, identify paths ending in activities with...
entrypoint GetMIPredictionsData GET /Process/GetMIPredictionsData The method validates ProjId, retrieves and filters project data, calls an...
entrypoint UpdateActivityPropsMIData POST /Process/UpdateActivityPropsMIData Process JSON input to update activity properties and reviewed status based on...
entrypoint ChangeSuccessorActivitiesIOProcess POST /Process/ChangeSuccessorActivitiesIOProcess The method validates and updates successor activities, modifies process shapes...
entrypoint Volume `` /Process/Volume Retrieve and validate project activities and related data, calculate and adjust...
entrypoint SystemsandApplications `` /Process/SystemsandApplications Retrieve and verify project data, gather related entities, set flags, invoke...
entrypoint GetBrSimilarity GET /Process/GetBrSimilarity Retrieve and filter project data, compare business rules semantically, and...
entrypoint IsObservationAccordionReviewed POST /Process/IsObservationAccordionReviewed Process form data to verify accordion validity, update review status, and...
entrypoint IsModelValidationNodeReviewed POST /Process/IsModelValidationNodeReviewed Retrieve NodeId, update review status, verify project and control nodes review...
entrypoint SemanticCheckBetweenLists POST /Process/SemanticCheckBetweenLists No key flows are defined in the SemanticCheckBetweenLists method.
entrypoint ValidateVisioFromSOP `` /Process/ValidateVisioFromSOP Transform JSON into diagram objects, validate them, adjust positions, handle...
entrypoint UpdateFinalJSONto3Cubed POST /Process/UpdateFinalJSONto3Cubed Load and update activities, arrows, and infrastructure; process forms, rules...

Workflow & Routing

Type Method HTTP URL Summary
entrypoint GetVolumeCalculated GET /Process/GetVolumeCalculated GetVolumeCalculated handles an HTTP GET request and deserializes JSON data from...
entrypoint ShowDeadLine POST /Process/ShowDeadLine ShowDeadLine processes AJAX POST requests to set activity deadlines using...
entrypoint SaveEnrichProcess POST /Process/SaveEnrichProcess SaveEnrichProcess reads and maps form data, updates models, handles out-process...
entrypoint ProcessVisualization GET /Process/ProcessVisualization ProcessVisualization retrieves and filters customized views, loads project and...
entrypoint EnrichProcessMap GET /Process/EnrichProcessMap Fetch and organize project data into process maps, calculate metrics, identify...
entrypoint EditBaseProcessMap GET /Process/EditBaseProcessMap Initialize projectId using ProjID parameter or fallback to default registry...
entrypoint ProcessCreation GET /Process/ProcessCreation ProcessCreation retrieves project data, sets review flags, and returns a view...
entrypoint CreateXMLToDrawProcessMap POST /Process/CreateXMLToDrawProcessMap Decode JSON data to build process map components, create swimlanes and shapes...
entrypoint saveDiagram POST /Process/saveDiagram Process and update the project diagram from XML data, handle deletions, save...
entrypoint DeleteProduct POST /Process/DeleteProduct DeleteProduct processes a POST request with ProductID, deletes the product, and...
entrypoint AddNewActor POST /Process/AddNewActor AddNewActor processes POST data to create a new actor and returns the new team...
entrypoint UpdateActivityActor POST /Process/UpdateActivityActor UpdateActivityActor processes a POST request to update activity actor...
entrypoint EditProcessData GET /Process/EditProcessData Fetch project data, filter activities, aggregate DOE and product probabilities...
entrypoint SaveProductParentFactors POST /Process/SaveProductParentFactors The method updates product parent factors, processes activities and decisions...
entrypoint GetClusterFlowActivities `` /Process/GetClusterFlowActivities Process activities and arrows to group activities by cluster and arrows by...
entrypoint GetDecisionVolumes `` /Process/GetDecisionVolumes Filter and process activities and arrows to update properties, calculate...
entrypoint UpdateGraphic POST /Process/UpdateGraphic Process HTTP POST data to update a customized view after validating role and...
entrypoint GetProcessActivities GET /Process/GetProcessActivities GetProcessActivities retrieves the current project ID, filters activities by...
entrypoint GetProcessProductFactors GET /Process/GetProcessProductFactors Retrieve current project ID, fetch product factors via control model, and...
entrypoint GetProcessWaitTypes GET /Process/GetProcessWaitTypes Retrieve project data, filter valid wait arrows, fetch related system...
entrypoint GetProcessBatchActs GET /Process/GetProcessBatchActs Retrieve project data, filter batch-related arrows and activities, map transfer...
entrypoint GetProcessAllAnyActs GET /Process/GetProcessAllAnyActs Retrieve project data, process activities to identify predecessors, and return...
entrypoint SaveProcessDeadLines POST /Process/SaveProcessDeadLines Receive valid JSON, decode into Activity objects, and save deadlines via...
entrypoint SaveProcessWaitTypes POST /Process/SaveProcessWaitTypes Decode JSON data, save wait types, save configuration, and return JSON response.
entrypoint SaveProcessBatchActs POST /Process/SaveProcessBatchActs Decode JSON from request, save batch acts and fixed configurations, then return...
entrypoint SaveProcessAllAnyActs POST /Process/SaveProcessAllAnyActs The method processes JSON activity data from an HTTP POST request, saves it...
entrypoint MergeActivities GET /Process/MergeActivities Retrieve and filter project actors and activities, construct MergeActivity...
entrypoint RemoveMilestone POST /Process/RemoveMilestone Process POST request to remove a milestone, update the process map, and...
entrypoint SimulateProcess GET /Process/SimulateProcess SimulateProcess handles an HTTP GET request and returns EnrichProcessMap's...
entrypoint DeleteActivity POST /Process/DeleteActivity DeleteActivity removes the activity shape and related arrows, updates the...
entrypoint DataInputs GET /Process/DataInputs Retrieve and process project data, activities, and metrics; filter and...
entrypoint BulkAHTDOEsUpdate POST /Process/BulkAHTDOEsUpdate Decode request data, update bulk AHTDOEs, process and update activity...
entrypoint UpdateActivitiesFormBrs POST /Process/UpdateActivitiesFormBrs Process arrow mode data from the request to update predecessor and successor...
entrypoint UpdateActivitiesFormModes POST /Process/UpdateActivitiesFormModes UpdateActivitiesFormModes processes form data, updates activity properties and...
entrypoint UndoFormChanges POST /Process/UndoFormChanges UndoFormChanges restores previous form data for a specific activity from...
entrypoint InsertActProperties POST /Process/InsertActProperties Process new activity properties and update arrow modes, then return a JSON...
entrypoint UpdateActivityBrSkill POST /Process/UpdateActivityBrSkill The method processes POST data to update activity BR skill and review status...
entrypoint BulkDecisionOutputsUpdate POST /Process/BulkDecisionOutputsUpdate Process and update decision activities and outputs, optionally save...
entrypoint UpdateCluster POST /Process/UpdateCluster UpdateCluster processes an HTTP POST request, converts and uses control...
entrypoint SaveProductVolumeDecisionVolFormula POST /Process/SaveProductVolumeDecisionVolFormula Process form data to update product activities, recalculate volumes, save...
entrypoint Forms GET /Process/Forms Retrieve and process project data, transform activities, manage forms, and...
entrypoint RenamePropeties POST /Process/RenamePropeties RenameProperties processes valid form data by iterating PropData and renaming...
entrypoint SaveModeAndForms POST /Process/SaveModeAndForms Process form data to update activity properties and arrow modes, then return a...
entrypoint InsertProductFormMapping POST /Process/InsertProductFormMapping Processes POST form data and returns a JSON response.
entrypoint GetEffReworkEffort GET /Process/GetEffReworkEffort Retrieve process data, calculate total and rework efforts, filter active...
entrypoint AHTEffortUpdate POST /Process/AHTEffortUpdate Update AHT effort by processing form data, saving activity properties, and...
entrypoint SavemultiplePredecessor POST /Process/SavemultiplePredecessor Process form data to create and save predecessor-successor relationships, then...
entrypoint FormBRActivity GET /Process/FormBRActivity Retrieve and process project data, populate ViewData, and render the Form BR...
entrypoint InsertActivityBRForms POST /Process/InsertActivityBRForms Decode JSON data, update activity properties, adjust process map modes, and...
entrypoint UpdateSkillCompetency POST /Process/UpdateSkillCompetency UpdateSkillCompetency processes valid competency data to update skills or...
entrypoint ReleaseFormsActivities GET /Process/ReleaseFormsActivities Process HTTP GET request to retrieve and join project activities and actors...
entrypoint SaveProcessWaitTypesReleaseConstraint POST /Process/SaveProcessWaitTypesReleaseConstraint Decode JSON from request, save configuration and process wait types release.
entrypoint ActivityProduct GET /Process/ActivityProduct Retrieve and process project data, filter and deduplicate product factors, and...
entrypoint VisioMapProcessCreation GET /Process/VisioMapProcessCreation Handles HTTP GET request by setting ProjectName in ViewData and returning the...
entrypoint SaveControlPatternActivityDetails POST /Process/SaveControlPatternActivityDetails Decode JSON from POST, process valid activities, populate products, set control...
entrypoint UndesiredUpdate POST /Process/UndesiredUpdate Parse valid ID, retrieve and convert undesired outcome status, update process...
entrypoint UpdateProductMIData POST /Process/UpdateProductMIData UpdateProductMIData processes product data, updates review status, and returns...
entrypoint UpdateAHTMIData POST /Process/UpdateAHTMIData Extract and decode AHT data from the request, then bulk update using the...
entrypoint GetObservationsforAHT GET /Process/GetObservationsforAHT Retrieve and process project data to calculate effort metrics and return...
entrypoint TeamPeriodicFTE GET /Process/TeamPeriodicFTE Calculate daily FTE efforts per active, non-system actor using out-process...
entrypoint ChangeDecisionToProcessActivity POST /Process/ChangeDecisionToProcessActivity Change a decision activity to a process activity by validating inputs, updating...
entrypoint DeadLines `` /Process/DeadLines Initialize project context, process activities and deadlines, manage review and...
entrypoint ProcessMapRejections `` /Process/ProcessMapRejections Fetch project activities and paths, handle missing activities by redirecting...
entrypoint ReplaceSystems POST /Process/ReplaceSystems ReplaceSystems processes an HTTP POST request to extract old and new system...
entrypoint GetClusterData GET /Process/GetClusterData Fetch project-related data, identify the best cluster key, and return processed...
entrypoint SaveinMasterTempTable POST /Process/SaveinMasterTempTable Process form data, notify eligible administrators for 'Industry' type, save...
entrypoint asynComputeHRCostData `` /Process/asynComputeHRCostData Calculate project HR costs by filtering active actors, converting salaries...
entrypoint asynComputeControlsData `` /Process/asynComputeControlsData Retrieve and process project-related data to calculate control metrics and...
entrypoint asynComputeBRsData `` /Process/asynComputeBRsData Retrieve and process project data, manage clusters, handle JSON entities, and...
entrypoint UpdateInputErrorStatus POST /Process/UpdateInputErrorStatus UpdateInputErrorStatus processes POST requests to update error status and...
entrypoint RearrangeProcessMap POST /Process/RearrangeProcessMap Process JSON data to update swim lanes and shapes, adjust specific shape...
entrypoint UpdateGenAIData POST /Process/UpdateGenAIData UpdateGenAIData processes POST requests by extracting data, updating GenAI...
entrypoint DirectToProcessMapRejections `` /Process/DirectToProcessMapRejections DirectToProcessMapRejections calls ProcessMapRejections without parameters.
entrypoint UpdateStartActsVolume POST /Process/UpdateStartActsVolume UpdateStartActsVolume processes a POST request to update activity volumes from...
entrypoint GetTeamsSimilarity POST /Process/GetTeamsSimilarity Process JSON input to identify duplicate teams by semantic similarity, generate...
entrypoint UpdateNERWordstoActsTms POST /Process/UpdateNERWordstoActsTms Process JSON input to update XML and Visio elements by replacing words with...
entrypoint UpdateActivityBRSkills POST /Process/UpdateActivityBRSkills Process valid JSON input to update each activity's BR skills and return a JSON...
helper Initialize GET /Process/Initialize Initialize processes HTTP GET requests and preserves existing MembershipService...

Other Methods

Type Method HTTP URL Summary
entrypoint DeleteProjects POST /Process/DeleteProjects DeleteProjects fetches all child projects, discards simulations for each, and...
entrypoint UndoBRChanges POST /Process/UndoBRChanges UndoBRChanges retrieves the activity ID from the request and fetches undo data...
entrypoint DeleteForm `` /Process/DeleteForm DeleteForm calls DeleteActsProperties with ProjectId and deleteForm parameters...
entrypoint PermanentDeleteProject POST /Process/PermanentDeleteProject PermanentDeleteProject permanently removes a project and all associated data.
entrypoint WaitTypes `` /Process/WaitTypes Fetch project activities and related data, handle missing activities by...
entrypoint SuggestedNewName POST /Process/SuggestedNewName Decode names, concatenate them, call GenerateClusterResponse, and return JSON...
entrypoint ComputeEffortData GET /Process/ComputeEffortData Retrieve project ID, start background thread to compute effort data...
entrypoint ComputeEffortRelatedData GET /Process/ComputeEffortRelatedData Retrieve project ID, start background thread for async effort computation, and...
entrypoint asynComputeEffortRelatedData `` /Process/asynComputeEffortRelatedData Retrieve and filter project data, compute effort metrics per actor and...
entrypoint ComputeControlsData GET /Process/ComputeControlsData Retrieve project ID, start asynchronous controls data computation in a new...
entrypoint ComputeTeamsRelatedData GET /Process/ComputeTeamsRelatedData Start a background thread to compute team data asynchronously for the current...
entrypoint asynComputeTeamsRelatedData `` /Process/asynComputeTeamsRelatedData Compute team-related metrics by aggregating activity data, filtering teams...
entrypoint ComputeBRsRelatedData GET /Process/ComputeBRsRelatedData Retrieve project ID, start background thread for async BRs data computation...
entrypoint ProceedFinalJSON GET /Process/ProceedFinalJSON Extract and classify activities and actors, generate success paths, and...

Associated Screens / Views

  • IndexIndex (Andromeda.Web\Views\Process\Index.cshtml)
  • EnrichProcessMapEnrichProcessMap (Andromeda.Web\Views\Process\EnrichProcessMap.cshtml)
  • EditBaseProcessMapEditBaseProcessMap (Andromeda.Web\Views\Process\EditBaseProcessMap.cshtml)
  • ProcessFlowSimulationProcessFlowSimulation (Andromeda.Web\Views\Process\ProcessFlowSimulation.cshtml)
  • CreateProjectCreateProject (Andromeda.Web\Views\Process\CreateProject.cshtml)
  • ProcessCreationProcessCreation (Andromeda.Web\Views\Process\ProcessCreation.cshtml)
  • ProjectMappingProjectMapping (Andromeda.Web\Views\Process\ProjectMapping.cshtml)
  • ValidationValidation (Andromeda.Web\Views\Process\Validation.cshtml)
  • EditProcessDataEditProcessData (Andromeda.Web\Views\Process\EditProcessData.cshtml)
  • CustomerExperienceCustomerExperience (Andromeda.Web\Views\Process\CustomerExperience.cshtml)
  • MergeActivitiesMergeActivities (Andromeda.Web\Views\Process\MergeActivities.cshtml)
  • DataInputsDataInputs (Andromeda.Web\Views\Process\DataInputs.cshtml)
  • FormsAndBRMappingFormsAndBRMapping (Andromeda.Web\Views\Process\FormsAndBRMapping.cshtml)
  • FormsBRMappingFormsBRMapping (Andromeda.Web\Views\Process\FormsBRMapping.cshtml)
  • FormsForms (Andromeda.Web\Views\Process\Forms.cshtml)
  • BusinessRulesBusinessRules (Andromeda.Web\Views\Process\BusinessRules.cshtml)
  • FormBRMasterFormBRMaster (Andromeda.Web\Views\Process\FormBRMaster.cshtml)
  • FormBRActivityFormBRActivity (Andromeda.Web\Views\Process\FormBRActivity.cshtml)
  • EditSkillCompetencyEditSkillCompetency (Andromeda.Web\Views\Process\EditSkillCompetency.cshtml)
  • RelaseStartConstraintRelaseStartConstraint (Andromeda.Web\Views\Process\RelaseStartConstraint.cshtml)
  • ReleaseFormsActivitiesReleaseFormsActivities (Andromeda.Web\Views\Process\ReleaseFormsActivities.cshtml)
  • DeadlinesActivitiesDeadlinesActivities (Andromeda.Web\Views\Process\DeadlinesActivities.cshtml)
  • ExcelTemplateExcelTemplate (Andromeda.Web\Views\Process\ExcelTemplate.cshtml)
  • ActivityProductActivityProduct (Andromeda.Web\Views\Process\ActivityProduct.cshtml)
  • CheckVisioValidationsCheckVisioValidations (Andromeda.Web\Views\Process\CheckVisioValidations.cshtml)
  • ProductProduct (Andromeda.Web\Views\Process\Product.cshtml)
  • VolumeVolume (Andromeda.Web\Views\Process\Volume.cshtml)
  • AHTAHT (Andromeda.Web\Views\Process\AHT.cshtml)
  • SystemsandApplicationsSystemsandApplications (Andromeda.Web\Views\Process\SystemsandApplications.cshtml)
  • DeadLinesDeadLines (Andromeda.Web\Views\Process\DeadLines.cshtml)
  • WaitTypesWaitTypes (Andromeda.Web\Views\Process\WaitTypes.cshtml)
  • ProcessMapRejectionsProcessMapRejections (Andromeda.Web\Views\Process\ProcessMapRejections.cshtml)
  • PeriodicActivitiesPeriodicActivities (Andromeda.Web\Views\Process\PeriodicActivities.cshtml)
  • GeolocateWorkingHoursGeolocateWorkingHours (Andromeda.Web\Views\Process\GeolocateWorkingHours.cshtml)
  • GeolocateTeamSizeGeolocateTeamSize (Andromeda.Web\Views\Process\GeolocateTeamSize.cshtml)
  • ReviewProcessMapReviewProcessMap (Andromeda.Web\Views\Process\ReviewProcessMap.cshtml)
  • HormonizeTeamsHormonizeTeams (Andromeda.Web\Views\Process\HormonizeTeams.cshtml)

Entrypoint Methods

GetVolumeCalculated

Summary: GetVolumeCalculated handles an HTTP GET request and deserializes JSON data from form fields for processing.

void ProcessController.GetVolumeCalculated()

Routing

  • HTTP: GET
  • URL: /Process/GetVolumeCalculated
Detailed Analysis

Key Flows - Summary: GetVolumeCalculated handles an HTTP GET request and deserializes JSON data from form fields for processing. - Receive HTTP GET request, Read JSON data from 'Activity', 'BusinessRules', 'Products', and 'Inputs' form fields, Deserialize JSON strings into variables

Error Flows - Summary: GetVolumeCalculated lacks explicit error handling for invalid or missing JSON data. - Missing error handling for invalid JSON data, No handling for missing JSON form fields

Security Issues - Summary: Direct JSON deserialization from request data risks injection attacks. - Unvalidated JSON deserialization

Performance Issues - Summary: Excessive calls to Json.Decode degrade performance. - Multiple calls to System.Web.Helpers.Json.Decode, Performance impact from repeated JSON decoding

Maintainability Issues - Summary: Replace magic strings with constants to improve maintainability and reduce errors. - Use constants for form field names, Avoid magic strings to reduce errors

Test Case Ideas - Summary: Test GetVolumeCalculated method's HTTP GET handling with complete and incomplete form data. - Handle HTTP GET requests correctly - Handle requests with missing form fields - Process valid JSON in all expected form fields

ShowDeadLine

Summary: ShowDeadLine processes AJAX POST requests to set activity deadlines using provided parameters.

void ProcessController.ShowDeadLine(int activityID, string dlType, string deadline, int deadlineActivityID)

Routing

  • HTTP: POST
  • URL: /Process/ShowDeadLine
Detailed Analysis

Key Flows - Summary: ShowDeadLine processes AJAX POST requests to set activity deadlines using provided parameters. - Call controlModel.SetDeadline with parameters to set deadline

Maintainability Issues - Summary: The method's void return limits testability and incomplete code reduces clarity. - Void return type limits reusability and testability

UX Impact Notes - Summary: AJAX request checks and deadline settings affect UI responsiveness and user notifications. - Deadline setting triggers user notifications and updates

Test Case Ideas - Summary: Verify ShowDeadLine sets deadlines correctly based on request type and activity. - Set deadline on AJAX requests - Do not set deadline on non-AJAX requests - Set deadline for different activity types

Dependencies & Called Services - Summary: ShowDeadLine method depends on IControlModel service. - Dependency on IControlModel service

AddTimer

Summary: AddTimer initializes context, creates and configures timer shapes and edges, updates actors and activities, and triggers copying if needed.

void ProcessController.AddTimer()

Routing

  • HTTP: POST
  • URL: /Process/AddTimer

Cross-layer call chain - ProcessController.AddTimer → Andromeda.Core.Entities.ShapeInfo.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ShapeInfo_Clone["Andromeda.Core.Entities.ShapeInfo.Clone"]
    ProcessController_AddTimer["ProcessController.AddTimer"]
    ProcessController_AddTimer --> Andromeda_Core_Entities_ShapeInfo_Clone
Detailed Analysis

Key Flows - creates and configures timer shapes and edges - updates actors and activities - Check 'Timer' swimlane presence and calculate IDs and locations - Create off-page reference shapes and edges by cloning - Create ShapeInfo objects for timer activities with position increments - Filter shapes and actors to assign properties - Retrieve and update timer team actor properties - Retrieve all project activities and update actor model with new timer teams - Set business properties on new activities using control model - Update process map and retrieve actors if timer team ID is zero

Error Flows - and unvalidated form data. - Null reference exceptions from unchecked collections - Exceptions from unvalidated or malformed form data

Security Issues - Summary: AddTimer method risks SQL injection, XSS, and undefined identifier vulnerabilities. - Use of Request.Form data without validation or sanitization, Undefined identifier 'actyloc' risks security issues, Malformed code snippets causing unexpected behavior

Performance Issues - Summary: Optimize data conversions, LINQ usage, and collection operations to improve performance. - Multiple LINQ queries on large datasets

Maintainability Issues - Summary: AddTimer method uses unclear naming, magic values, incomplete code, and tight external coupling. - Use of magic strings and numbers reduces clarity and maintainability, Incomplete and unclear code snippets hinder understanding, Lambda and LINQ usage lacks clear context for maintainability, Tight coupling with external models reduces modularity, Non-descriptive variable names decrease code readability

UX Impact Notes - Summary: Updates diagram elements to improve workflow visualization and interface clarity. - Create and update swimlane pages and shapes - Position timer shapes for visual alignment - Update positions and properties of shapes and edges

Test Case Ideas - Summary: Verify AddTimer handles data extraction - timer logic - and map updates correctly. - Create off-page reference shapes and edges with correct cloning and properties - Create and position timer shapes for various Timerdata inputs - Filter and assign actShapesList elements accurately - Detect presence or absence of Timer in SwimLaneList and validate IDs and locations - Add timer arrows to ArrowList and update swimlane widths - Retrieve and update timer team actor properties including working hours and location codes - Update process map and retrieve actors based on timerTeamId

Dependencies & Called Services - Summary: AddTimer method depends on collections, models, and data types for processing. - Enumerable utilities, Collection interfaces, Actor, Control, and Process models, List data structure, Shape information, String manipulation - Process handling

SaveEnrichProcess

Summary: SaveEnrichProcess reads and maps form data, updates models, handles out-process properties, and manages bookmarks and statuses.

JsonResult ProcessController.SaveEnrichProcess()

Routing

  • HTTP: POST
  • URL: /Process/SaveEnrichProcess
Detailed Analysis

Key Flows - updates models - handles out-process properties - Check activity dependency via 'IsDependOnPre' - Process out-process properties with frequency conditions when 'OutProcess' is true - Read and decode form JSON data, Map data to domain objects, Save product knowledge - Update control and process models - Update bookmarks and arrow statuses

Error Flows - Summary: Handle exceptions from data conversions and JSON deserialization explicitly. - Incomplete conditional checks causing unhandled cases or early exits

Security Issues - Summary: Unsanitized user input risks SQL injection and XSS vulnerabilities. - Unsanitized user input from Request.Form, Incomplete code sections risking security flaws

Performance Issues - Summary: Optimize large collection iterations and reduce repeated JSON decoding for better performance. - Inefficient iteration over large collections without batching, Repeated JSON decoding on large form data payloads

Maintainability Issues - Summary: Refactor SaveEnrichProcess to improve clarity, error handling, abstraction, and reduce coupling. - Use of magic strings for form keys reduces clarity and maintainability, Incomplete and malformed code snippets hinder understanding and maintenance, Hardcoded magic numbers reduce readability and flexibility, Use interfaces instead of concrete collection types to improve abstraction, Lack of error handling around JSON decoding and data conversions reduces robustness, Tight coupling with external dependencies complicates testing and future changes

UX Impact Notes - Summary: Security flaws and data errors disrupt user flow and cause runtime failures. - Security vulnerabilities affecting user experience, Form field presence altering user flow, Data conversion and parsing errors causing unexpected behavior, Runtime errors from incomplete or malformed code

Test Case Ideas - Summary: Validate SaveEnrichProcess handles HTTP POST - updates models - Handle HTTP POST requests and return JsonResult - Handle out-process properties with varied frequency and types - Set business data with filtered activity properties - Process malicious or malformed JSON in form fields, Process empty and populated businessRules collections

Dependencies & Called Services - Summary: Uses data conversion, collection handling, math operations, and time management services. - Data conversion utilities, Enumeration and collection interfaces, Control, HR, and process model interfaces, List data structure, Mathematical functions, String manipulation, TimeSpan for time calculations

Index

Summary: Sets dashboard ID cookie and retrieves project data when 'view' parameter is provided.

ActionResult ProcessController.Index(int? view)

Routing

  • URL: /Process/Index

Cross-layer call chain - ProcessController.Index → Insorce.Helpers.Helpers.getDashboardIdFromCookie - ProcessController.Index → Insorce.Helpers.Helpers.SetDashboardIdToCookie - ProcessController.Index → 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"]
    Insorce_Helpers_Helpers_SetDashboardIdToCookie["Insorce.Helpers.Helpers.SetDashboardIdToCookie"]
    Insorce_Helpers_Helpers_getDashboardIdFromCookie["Insorce.Helpers.Helpers.getDashboardIdFromCookie"]
    ProcessController_Index["ProcessController.Index"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    ProcessController_Index --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_Index --> Insorce_Helpers_Helpers_SetDashboardIdToCookie
    ProcessController_Index --> Insorce_Helpers_Helpers_getDashboardIdFromCookie
View Metadata
  • View: Index (Andromeda.Web\Views\Process\Index.cshtml)
  • Model: IList<Andromeda.Core.Entities.CustomWidgetView>
Detailed Analysis

Key Flows - Summary: Sets dashboard ID cookie and retrieves project data when 'view' parameter is provided. - Set dashboard ID cookie

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

Performance Issues - Summary: Retrieving and sorting large data sets degrades response time. - Retrieving large data sets - Sorting large data sets

Maintainability Issues - Summary: Improve code clarity, reduce magic strings, and decouple tightly coupled models and services. - Unclear condition '!view.HasValue' reduces code readability, Use constant for dashboard ID instead of magic string '1', Tight coupling with models and services reduces modularity and increases complexity

UX Impact Notes - Summary: Incorrect dashboard ID causes missing or wrong dashboard data, affecting user experience. - Incorrect dashboard ID causes missing or wrong dashboard data, View populates with project-related data affecting UI

Test Case Ideas - Summary: Verify correct data retrieval, cookie handling, and view rendering with valid input. - Check method returns expected view with populated data - Confirm 'getDashboardIdFromCookie' returns and assigns dashboard ID - Validate integer 'view' parameter processing and cookie setting

Dependencies & Called Services - Summary: Uses core utilities and interfaces for processing and project modeling. - Enumerable utilities, Helper functions, IProcessModel interface, IProjectModel interface, Int32 data type

ProcessVisualization

Summary: ProcessVisualization retrieves and filters customized views, loads project and process map data, and returns the visualization view.

ActionResult ProcessController.ProcessVisualization()

Routing

  • HTTP: GET
  • URL: /Process/ProcessVisualization
Detailed Analysis

Key Flows - and returns the visualization view. - Return 'ProcessMapVisualization' view with project data

Error Flows - Summary: Handle null project access and invalid JSON data with complete validation. - Null or failure on accessing Registry.CurrentProjectI if project unset - Incomplete conditional checks causing unhandled data validation errors

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

Performance Issues - Summary: Optimize data processing to reduce memory use and improve performance with large datasets. - Excessive memory allocation from ToList() during view filtering, Repeated JSON decoding inside loops for each view, Single-step XML reading and ViewData population affecting performance, Inefficient iteration over large view collections

Maintainability Issues - Summary: Incomplete code, magic strings, typos, and Tuple usage reduce maintainability and clarity. - Incomplete code lines reduce clarity and maintainability, Magic strings in filtering conditions reduce readability and maintainability, Typographical errors cause compilation issues, Tuple usage for passing multiple data objects complicates code understanding

UX Impact Notes - Summary: Displays process map visualization to enhance user understanding. - Return view 'ProcessMapVisualization'

Test Case Ideas - Summary: Verify data retrieval, filtering, initialization, and handling of malformed inputs in ProcessVisualization. - Test filtering logic with various viewType and Name values - Test getArrowDetail returns correct arrow details - Validate GetCustomizedViews returns expected data - Validate ReadProjectXml returns correct process map and populates ViewData

Dependencies & Called Services - Summary: ProcessVisualization uses collections, actor and process models, and strings. - Enumerable collections, IActorModel interface, IProcessModel interface, String data type

EnrichProcessMap

Summary: Fetch and organize project data into process maps, calculate metrics, identify bottlenecks, and handle conditional redirects.

ActionResult ProcessController.EnrichProcessMap(string screen)

Routing

  • HTTP: GET
  • URL: /Process/EnrichProcessMap

Cross-layer call chain - ProcessController.EnrichProcessMap → Andromeda.Core.LoggingManager.Error - ProcessController.EnrichProcessMap → Andromeda.Core.Entities.Activity.Clone - ProcessController.EnrichProcessMap → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.EnrichProcessMap → Andromeda.Core.Entities.Arrow.Clone - ProcessController.EnrichProcessMap → Andromeda.Core.Entities.Actor.GetLocation - ProcessController.EnrichProcessMap → Andromeda.Core.Services.Algorithms.Delooper.PopulateConnectedActivities - ProcessController.EnrichProcessMap → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - ProcessController.EnrichProcessMap → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.EnrichProcessMap → Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths - ProcessController.EnrichProcessMap → Andromeda.Core.Services.Algorithms.Delooper.ChangeEffort - ProcessController.EnrichProcessMap → Andromeda.Core.Extensions.LinqExtensions.ZeroHandledInRound - ProcessController.EnrichProcessMap → Andromeda.Core.Entities.Gantt.ActivityDelay - Andromeda.Core.Entities.Actor.GetLocation → Andromeda.Core.DataManager.GetData - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - Andromeda.Core.Entities.Gantt.ActivityDelay → Andromeda.Core.Services.TimeRange.ContainsValue

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_Gantt_ActivityDelay["Andromeda.Core.Entities.Gantt.ActivityDelay"]
    Andromeda_Core_Extensions_LinqExtensions_ZeroHandledInRound["Andromeda.Core.Extensions.LinqExtensions.ZeroHandledInRound"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_ChangeEffort["Andromeda.Core.Services.Algorithms.Delooper.ChangeEffort"]
    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_PopulateConnectedActivities["Andromeda.Core.Services.Algorithms.Delooper.PopulateConnectedActivities"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_TimeRange_ContainsValue["Andromeda.Core.Services.TimeRange.ContainsValue"]
    ProcessController_EnrichProcessMap["ProcessController.EnrichProcessMap"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Entities_Gantt_ActivityDelay --> Andromeda_Core_Services_TimeRange_ContainsValue
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_EnrichProcessMap --> Andromeda_Core_Entities_Gantt_ActivityDelay
    ProcessController_EnrichProcessMap --> Andromeda_Core_Extensions_LinqExtensions_ZeroHandledInRound
    ProcessController_EnrichProcessMap --> Andromeda_Core_LoggingManager_Error
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_ChangeEffort
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_PopulateConnectedActivities
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_EnrichProcessMap --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: EnrichProcessMap (Andromeda.Web\Views\Process\EnrichProcessMap.cshtml)
  • Model: Tuple<IList<Andromeda.Core.Entities.Arrow>, IList<Andromeda.Core.Entities.EnrichActivityModel>, List<Andromeda.Core.Entities.Arrow>>
Detailed Analysis

Key Flows - and handle conditional redirects. - Calculate cumulative effort, cost, and handling times - Fetch and log activities - Handle conditional redirects based on project state or activity counts - Organize data into swimlanes, shapes, arrows, and activity groups, Identify critical paths, bottlenecks, delays, and automation paths

Error Flows - Summary: Handle null or missing data and conditionally redirect based on activity or project state. - Conditional redirect to 'ProcessCre' action on specific activity or project conditions - Avoid null reference exceptions by checking for null or empty activities

Security Issues - Summary: Prevent injection attacks by sanitizing inputs and validating file paths. - XML injection from unvalidated XML documents

Performance Issues - Summary: Optimize excessive logging - Excessive logging with DateTime.Now.ToString causing string allocations - GroupBy) on large datasets - Repeated file existence checks and loading entire large files into memory

Maintainability Issues - Summary: Code suffers from unclear naming, magic values, incomplete code, poor error handling, and redundant queries. - Use of magic strings and numbers reducing readability, Non-descriptive variable names hindering understanding, Incomplete and truncated code causing potential errors, Inconsistent and incomplete error handling in XML and file operations, Unused variables and incomplete method calls indicating dead code, Repeated LINQ queries and complex nested operations needing refactoring

UX Impact Notes - Summary: Conditional redirects - Conditional redirects alter user workflow based on project or activity state - Error logging risks user visibility and system responsiveness - Large data processing and excessive logging cause slower response times

Test Case Ideas - conditional redirects - Conditional redirect to 'ProcessCre' based on activity counts and project state - File existence checks and file reading for existing and non-existing files - Logging functionality ensuring correct messages without sensitive data exposure

Dependencies & Called Services - Summary: Uses core data types, collections, XML handling, logging, and domain-specific models for process mapping. - Core data types: DateTime, Decimal, Int32, TimeSpan, Collections and LINQ: List, Dictionary, Enumerable, LinqExtensions, XML processing: XContainer, XElement, Mathematical operations: Math, Domain models: Activity, Actor, IActorModel, IControlModel, IFinalPlanModel, IInfraModel, IProcessModel, IProjectModel, IRiskModel, UI and visualization: Arrow, Gantt, File, String - Logging: LoggingManager - Process and project utilities: ProcessExtensions, Convert

EditBaseProcessMap

Summary: Initialize projectId using ProjID parameter or fallback to default registry value.

ActionResult ProcessController.EditBaseProcessMap(int? ProjID)

Routing

  • HTTP: GET
  • URL: /Process/EditBaseProcessMap

Cross-layer call chain - ProcessController.EditBaseProcessMap → Andromeda.Core.Services.Registry.GetPermissions - ProcessController.EditBaseProcessMap → Andromeda.Core.LoggingManager.Info - Andromeda.Core.Services.Registry.GetPermissions → Andromeda.Core.Models.ModelHelper.GetProjectDetails

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    Andromeda_Core_Models_ModelHelper_GetProjectDetails["Andromeda.Core.Models.ModelHelper.GetProjectDetails"]
    Andromeda_Core_Services_Registry_GetPermissions["Andromeda.Core.Services.Registry.GetPermissions"]
    ProcessController_EditBaseProcessMap["ProcessController.EditBaseProcessMap"]
    Andromeda_Core_Services_Registry_GetPermissions --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    ProcessController_EditBaseProcessMap --> Andromeda_Core_LoggingManager_Info
    ProcessController_EditBaseProcessMap --> Andromeda_Core_Services_Registry_GetPermissions
View Metadata
  • View: EditBaseProcessMap (Andromeda.Web\Views\Process\EditBaseProcessMap.cshtml)
Detailed Analysis

Key Flows - Summary: Initialize projectId using ProjID parameter or fallback to default registry value. - Initialize projectId from ProjID parameter, Fallback to default registry value

Error Flows - Summary: Enforce permission checks and deny access with 403 errors when unauthorized. - Check 'Make' permission for current project - Check 'Checker' or 'App' permissions for non-current projects - Log 'Access Denied' on permission failure - Throw HttpException with status 403 on unauthorized access

Security Issues - Summary: Ensure strict validation of projectId and permissions to prevent authorization bypass. - Authorization bypass risk from unvalidated projectId - Inconsistent permission checks using string literals

Performance Issues - Summary: No performance issues identified in EditBaseProcessMap method.

Maintainability Issues - Summary: Replace magic strings with named constants and remove unused variables. - Use named constants for permission types instead of magic strings, Remove or complete unused and incomplete variable declarations

UX Impact Notes - Summary: Restricts unauthorized access and provides necessary data for process map display. - Display 'Access Denied' error for unauthorized users, Populate ViewData with process map data for rendering

Test Case Ideas - access denial logging - Ensure unused variable 'd' causes no side effects or performance issues - Load project data with valid ProjID - Log 'Access Denied' messages on access failure

Dependencies & Called Services - Summary: Uses external libraries and interfaces for process modeling, logging, and registry management. - Enumerable for collection operations, IProcessModel interface for process abstraction, Registry for configuration or service lookup - LoggingManager for logging activities

ProcessFlowSimulation

Summary: Process project data to validate activities, enrich details, generate schedules, and calculate actor workloads.

ActionResult ProcessController.ProcessFlowSimulation(int? id)

Routing

  • HTTP: GET
  • URL: /Process/ProcessFlowSimulation

Cross-layer call chain - ProcessController.ProcessFlowSimulation → Andromeda.Core.Entities.Gantt.TeamCountByHourly - ProcessController.ProcessFlowSimulation → Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone - ProcessController.ProcessFlowSimulation → Andromeda.Core.Entities.Activity.Clone - ProcessController.ProcessFlowSimulation → Andromeda.Core.Entities.Arrow.Clone - ProcessController.ProcessFlowSimulation → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.ProcessFlowSimulation → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.ProcessFlowSimulation → Andromeda.Core.Entities.Gantt.ActivityDelay - Andromeda.Core.Entities.Gantt.TeamCountByHourly → Andromeda.Core.Entities.Sched.StartTimeHourMin - Andromeda.Core.Entities.Gantt.TeamCountByHourly → Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - Andromeda.Core.Entities.Gantt.ActivityDelay → Andromeda.Core.Services.TimeRange.ContainsValue

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_Gantt_ActivityDelay["Andromeda.Core.Entities.Gantt.ActivityDelay"]
    Andromeda_Core_Entities_Gantt_TeamCountByHourly["Andromeda.Core.Entities.Gantt.TeamCountByHourly"]
    Andromeda_Core_Entities_Sched_StartTimeHourMin["Andromeda.Core.Entities.Sched.StartTimeHourMin"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_TimeRange_ContainsValue["Andromeda.Core.Services.TimeRange.ContainsValue"]
    ProcessController_ProcessFlowSimulation["ProcessController.ProcessFlowSimulation"]
    Andromeda_Core_Entities_Gantt_ActivityDelay --> Andromeda_Core_Services_TimeRange_ContainsValue
    Andromeda_Core_Entities_Gantt_TeamCountByHourly --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    Andromeda_Core_Entities_Gantt_TeamCountByHourly --> Andromeda_Core_Entities_Sched_StartTimeHourMin
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Gantt_ActivityDelay
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Entities_Gantt_TeamCountByHourly
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_ProcessFlowSimulation --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: ProcessFlowSimulation (Andromeda.Web\Views\Process\ProcessFlowSimulation.cshtml)
  • Model: IList<Andromeda.Core.Entities.EnrichActivityModel>
Detailed Analysis

Key Flows - Summary: Process project data to validate activities - Calculate work slots and hours per actor based on attendance and working hours - Create Gantt schedule data and calculate team counts per hour - Retrieve project data including XML, actors, products, activity properties, and activities, Enrich activities with detailed properties and outputs, Compile enriched activities into a list, Initialize and process actor schedules ordered by index, Clone activities and arrows, calculate delays and peak units - Validate existence of activities and redirect if none found

Error Flows - Summary: Handle empty collections and null references to prevent errors and ensure correct flow. - Check for null DelaysData and schedData to prevent null reference exceptions during metrics calculation - Fix incomplete conditional statements and method calls to avoid compilation errors - Redirect if activities collection is empty to stop processing

Security Issues - Summary: No security issues found in the analyzed code sections. - No explicit security vulnerabilities detected

Performance Issues - Summary: Excessive database calls and inefficient collection operations degrade performance. - Multiple database or model calls in one method, FirstOrDefault and Any methods inside loops causing repeated queries, Multiple ToList() calls and FindByID() usage in loops, Ordering large collections impacting performance, High iteration count loops with complex bodies, Memory-intensive ToArray() on large collections, First() in LINQ Select causing multiple enumerations

Maintainability Issues - refactor complex logic - Define all event handlers explicitly - Refactor numerous assignments to activityDetails for clarity

UX Impact Notes - Summary: Redirects and data handling directly affect user navigation and schedule display. - Redirect on no activities disrupts navigation flow - Returning null impacts user experience if unhandled

Test Case Ideas - Summary: Validate activity processing - and conditional logic handling. - Calculate work slots and hours including edge cases with office close time - Create and use Gantt schedule data and TeamCountByHourly method - Handle string operations with keys containing '.' and conditional string comparisons - Filter and group schedule analysis data for empty and large datasets - Retrieve and assign compensatory activities - Process empty and large activity and actor collections - Redirect when no activities present - Validate activity counts with valid project IDs

Dependencies & Called Services - Summary: Uses models, collections, and utilities for process flow simulation. - Activity model, Actor model, Arrow representation, DateTime handling, Enumerable collections, Gantt chart utilities, IActorModel interface, IControlModel interface, IProcessModel interface, IRiskModel interface, Int32 type, List collection, Math utilities, String handling, TimeSpan type - ProcessExtensions methods

GetControActvities

Summary: Retrieve all control activities, enrich each with related data, and return the enriched collection.

IList<EnrichActivityModel> ProcessController.GetControActvities(IList<ActivityProduct> products, IList<ActivityProperty> properties)

Routing

  • HTTP: GET
  • URL: /Process/GetControActvities
Detailed Analysis

Key Flows - and return the enriched collection. - Return enriched activity models collection

Error Flows - Summary: Handle null references and prevent overflow in GetControActvities method. - NullReferenceException from null activity or activityDetails, NullReferenceException from calling ToString() on null AvgHandlingTime, OverflowException from converting ActorId to Int64

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

Performance Issues - Summary: Method iterates large collections multiple times, causing performance degradation. - Iteration over large 'allActivitiesOf' collection, Multiple Where() and ToList() calls on large properties and products collections

Maintainability Issues - Summary: Remove unused variables and replace magic strings to improve code clarity and maintainability. - Unused variables 'activityDeta' and 'ils' indicating dead or incomplete code, Abruptly ending code snippet reducing readability, Magic strings like 'No Deadline' and '00.00:00:00' used without explanation

UX Impact Notes - Summary: Incorrect data in EnrichActivityModel causes wrong activity display in UI. - Incorrect data population in EnrichActivityModel, Wrong activity information display in UI

Test Case Ideas - Summary: Verify GetAllControlActivities call, data enrichment, output collection, default values, and performance. - Return empty list when no activities found - Assign default AvgHandlingTime when zero - Assign and use string '00.00:00:00' correctly

Dependencies & Called Services - Summary: Uses collections and data types for risk model activity processing. - Enumerable conversion, ICollection usage, IRiskModel interface, String handling, TimeSpan management

CreateProject

Summary: CreateProject verifies project uniqueness, creates the project, and uploads a template if required.

ActionResult ProcessController.CreateProject(FormCollection collection, HttpPostedFileBase file, int? isQuickUpload)

Routing

  • HTTP: POST
  • URL: /Process/CreateProject

Cross-layer call chain - ProcessController.CreateProject → Andromeda.Core.DataManager.ExecuteScalar - ProcessController.CreateProject → Andromeda.Core.DataManager.Execute - ProcessController.CreateProject → Andromeda.Core.Entities.Membership.GetAllUsers - ProcessController.CreateProject → Insorce.Models.UserProfile.GetUserProfile - ProcessController.CreateProject → Andromeda.Core.Entities.Project.GetTags - ProcessController.CreateProject → Andromeda.Core.Utility.Encrypt.DecryptString - ProcessController.CreateProject → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_DataManager_ExecuteScalar["Andromeda.Core.DataManager.ExecuteScalar"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    ProcessController_CreateProject["ProcessController.CreateProject"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CreateProject --> Andromeda_Core_DataManager_Execute
    ProcessController_CreateProject --> Andromeda_Core_DataManager_ExecuteScalar
    ProcessController_CreateProject --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_CreateProject --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_CreateProject --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_CreateProject --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CreateProject --> Insorce_Models_UserProfile_GetUserProfile
View Metadata
  • View: CreateProject (Andromeda.Web\Views\Process\CreateProject.cshtml)
  • Model: IList<Andromeda.Validation.VisioError>
Detailed Analysis

Key Flows - Summary: CreateProject verifies project uniqueness - creates the project - Check project name uniqueness and return error if duplicate - Create project via ProcessMapModel.CreateProject with parameters - Upload template Excel and update project registry if template flag set

Error Flows - Summary: Handle project name conflicts and invalid tokens with error messages and prevent creation. - Detect existing project name and return error without creating project - Validate project token and set error message on invalid token

Security Issues - Summary: CreateProject lacks input validation - Missing validation and sanitization of user input, Storing user IDs and names in ViewData risks unauthorized access, Decrypting project token without error handling

Performance Issues - Summary: Avoid ToList() on large collections to prevent performance degradation. - Use of ToList() on large collections

Maintainability Issues - Summary: Replace magic strings and unclear constants with named constants to improve code clarity and maintainability. - Use of magic strings reduces flexibility and readability, Incomplete or malformed code segments hinder understanding, Unclear property names and error messages reduce clarity, Lack of explanation for constants decreases code transparency, Unused or unclear variable declarations cause confusion, Hardcoded strings and numbers require named constants

UX Impact Notes - Summary: Provide clear error messages and consistent feedback to improve user workflow and clarity. - Conditional redirects affect user navigation

Test Case Ideas - and existence checks. - Check project existence with valid and invalid names - Create project with valid parameters and optional template IDs - Handle data input template flag variations - Retrieve project details from form, Filter and project organization members and roles, Upload template Excel files

Dependencies & Called Services - Summary: CreateProject uses data conversion - Data conversion utilities, Encryption services, Enumerable collections, Actor model interface, Project model interface, List collections, Membership management, Registry access, String manipulation - Process model interface, Process handling

ValidateAndSaveDiaram

Summary: Decode and validate process map data, handle errors, update statuses, and save configuration with conditional checks.

JsonResult ProcessController.ValidateAndSaveDiaram()

Routing

  • HTTP: POST
  • URL: /Process/ValidateAndSaveDiaram

Cross-layer call chain - ProcessController.ValidateAndSaveDiaram → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone - ProcessController.ValidateAndSaveDiaram → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone - ProcessController.ValidateAndSaveDiaram → Andromeda.Validation.ProcessMapValidation.Validate - ProcessController.ValidateAndSaveDiaram → Andromeda.Validation.ProcessMapValidation.ValidateOutProcessActivities

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    Andromeda_Validation_ProcessMapValidation_ValidateOutProcessActivities["Andromeda.Validation.ProcessMapValidation.ValidateOutProcessActivities"]
    ProcessController_ValidateAndSaveDiaram["ProcessController.ValidateAndSaveDiaram"]
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Validation_ProcessMapValidation_Validate
    ProcessController_ValidateAndSaveDiaram --> Andromeda_Validation_ProcessMapValidation_ValidateOutProcessActivities
Detailed Analysis

Key Flows - Summary: Decode and validate process map data - handle errors - update statuses - and save configuration with conditional checks. - Clone and validate process map entities - Return error response on validation failure - Invoke project change checks if multi-process detection enabled - Save updated process map and configuration details - Update review status on inconsistent counts

Error Flows - Summary: Handle JSON deserialization - Return JSON error response on validation failures

Security Issues - Summary: Prevent JSON deserialization vulnerabilities by validating input before decoding. - JSON deserialization vulnerability from unvalidated System.Web.Helpers.Json.Decode

Performance Issues - Summary: Excessive conversions, multiple ToList() calls, and nested LINQ degrade performance. - Repeated Convert.ToInt32 and Convert.ToDouble calls without error handling, Multiple ToList() calls causing repeated enumerations and memory allocations, LINQ Count() and Any() on large collections impacting performance, Nested LINQ queries causing overhead in filtering activities and shapes

Maintainability Issues - Summary: The method suffers from poor readability, unclear code, and high complexity. - Use of magic strings and numbers reduces readability and maintainability, Incomplete and truncated code causes clarity and compilation issues, Anonymous types in Select statements hinder code understanding, Non-descriptive and misspelled variable names, Tight coupling with multiple models and external dependencies increases complexity, Commented-out code and empty blocks indicate incomplete or abandoned code

UX Impact Notes - Summary: Provide detailed error messages that require user corrections and affect workflow. - Error messages for invalid team assignments and deleted activities - Conditional review status updates marking diagrams as rejected

Test Case Ideas - Summary: Validate input - process map logic - Process map and configuration update and save operations - Consistency checks for counts of activities - Conditional logic based on Constants.IsDetectMultipleProcess flag

Dependencies & Called Services - Summary: Uses data conversion, collections, process and risk models, and project change detection services. - Data conversion utilities, Dictionary and List collections, EdgeInfo and ShapeInfo data structures, IActorModel interface, IDetectProjectChanges service, IProcessModel interface, IRiskModel interface, Enumerable utilities, Int32 and String types - Process and ProcessMapValidation components

ValidateProcessMap

Summary: ValidateProcessMap extracts form data, processes map details, checks Visio errors, and returns success status.

JsonResult ProcessController.ValidateProcessMap()

Routing

  • HTTP: POST
  • URL: /Process/ValidateProcessMap
Detailed Analysis

Key Flows - Summary: ValidateProcessMap extracts form data - checks Visio errors - and returns success status. - Check Visio errors exceed threshold in MapDetails - Return JSON with success status if no errors

Error Flows - Summary: ValidateProcessMap handles null form data and excessive Visio errors by returning error responses. - Null form data keys cause null reference exceptions, Excessive Visio errors trigger JSON error response

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

Performance Issues - Summary: Avoid ToList() in Visio error mapping to prevent high memory use with large data. - Use of ToList() causes high memory allocation for large Visio error datasets

Maintainability Issues - Summary: Improve code clarity by replacing magic strings, completing conditionals, clarifying variable names, and avoiding anonymous types. - Replace unexplained magic strings with named constants, Complete conditional statements with explicit comparisons, Avoid anonymous types for error details to enhance readability, Use descriptive variable names instead of ambiguous ones like 't'

UX Impact Notes - Summary: Return JSON with detailed errors and success status to guide user flow. - Detailed error information in JSON for specific UI messages, Success status in JSON to indicate validation result and guide flow

Test Case Ideas - Summary: Validate process map with various input data and verify correct JSON responses. - Valid form data validation, Visio error count conditional behavior, JSON error object correctness, JSON success object correctness, Handling different success status values

Dependencies & Called Services - Summary: Use Enumerable to convert and process collections. - Enumerable usage, Collection conversion, Collection processing

ProcessMapDetails

Summary: Decode JSON inputs into objects, validate map data, and handle errors if saving is required.

ValidateData ProcessController.ProcessMapDetails(string SwimLaneData, string ShapeData, string EdgeData, bool SaveFile)

Routing

  • URL: /Process/ProcessMapDetails

Cross-layer call chain - ProcessController.ProcessMapDetails → Andromeda.Validation.ProcessMapValidation.Validate - ProcessController.ProcessMapDetails → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone - ProcessController.ProcessMapDetails → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    ProcessController_ProcessMapDetails["ProcessController.ProcessMapDetails"]
    ProcessController_ProcessMapDetails --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ProcessMapDetails --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ProcessMapDetails --> Andromeda_Validation_ProcessMapValidation_Validate
Detailed Analysis

Key Flows - validate map data - and handle errors if saving is required. - Create SwimlaneInfo objects with mapped properties and type conversions - Create ShapeInfo objects with property conversions and conditional flags - Create EdgeInfo objects with converted source and target IDs - Populate ValidateData with swimlanes - Invoke CreateOrUpdateErrorsVisio for error handling when saving - Validate cloned shapes and edges and store validation errors

Error Flows - Summary: ProcessMapDetails lacks exception handling for JSON deserialization and type conversions. - Exceptions during JSON deserialization from invalid input, Type conversion errors from malformed input data, No explicit exception handling causing error propagation

Security Issues - Summary: ProcessMapDetails risks JSON deserialization attacks from unvalidated input. - JSON deserialization vulnerability, Lack of input validation before JSON decoding

Performance Issues - Summary: Repeated JSON decoding, type conversions, and ToList() calls degrade performance. - Repeated System.Web.Helpers.Json.Decode calls, Repeated Convert.ToInt32 and Convert.ToDouble conversions inside loops, Use of ToList() causing extra memory allocation and copying

Maintainability Issues - Summary: The method's role is unclear and uses undocumented magic property names, reducing maintainability. - Method marked as NonAction despite significant processing, Use of undocumented magic property names like 's.id', 's.ActorID', 'e.src', 'e.tar'

Test Case Ideas - Summary: Verify correct processing, object creation, validation, and conditional error saving. - ProcessMapValidation.Validate detects validation errors - SaveFile flag controls CreateOrUpdateErrorsVisio call - ValidateData contains expected swimlanes

Dependencies & Called Services - Summary: ProcessMapDetails uses data conversion, collection handling, validation, and shape processing services. - Data conversion service, Edge information handling, Enumerable collection processing, List data structure usage, Map validation, Shape information processing - Process management

GetImportedChanges

Summary: The method processes POST data, checks for Visio errors, updates MapDetails, and returns error status as JSON.

JsonResult ProcessController.GetImportedChanges(string sessionId)

Routing

  • HTTP: POST
  • URL: /Process/GetImportedChanges
Detailed Analysis

Key Flows - checks for Visio errors - updates MapDetails - and returns error status as JSON. - Check if MapDetails.LstVisioError is empty to detect Visio errors - set MapDetails.Pids from session - Return JsonResult with isErrors boolean indicating Visio errors

Error Flows - Summary: Return JSON with isErrors true if MapDetails.LstVisioError contains errors. - Check MapDetails.LstVisioError for errors - Return JSON response with isErrors true on errors

Security Issues - Summary: The method exposes CSRF risk by missing anti-forgery token validation. - Missing ValidateAntiForgeryToken attribute

Maintainability Issues - Summary: Remove magic strings and define all methods to improve code clarity and maintainability. - Undefined method y() obscures logic and hinders maintenance

UX Impact Notes - Summary: Indicates Visio errors in JSON response to adjust UI flows and error messages. - 'isErrors' property signals Visio errors, UI adapts error messaging and flow based on 'isErrors'

Test Case Ideas - Summary: Validate input handling - Handle missing or malformed 'swimlanes' - Set MapDetails.Pids from Session['Pids'] when condition y() is true

Dependencies & Called Services - Summary: Uses Enumerable for collection processing and Process for system operations. - Enumerable for collection processing - Process for system operations

ReValidateAndImport

Summary: Process form data without validation errors, call TraverseAndSave if not reimport, then redirect to ValidateProject.

ActionResult ProcessController.ReValidateAndImport()

Routing

  • HTTP: POST
  • URL: /Process/ReValidateAndImport
Detailed Analysis

Key Flows - then redirect to ValidateProject. - Call TraverseAndSave if not a reimport - Process form data without validation errors - Redirect to ValidateProject

Error Flows - Summary: Return 'FixValidation' view on validation errors with detailed error information. - Return 'FixValidation' view when validation errors exist - Incomplete error handling suggests potential unhandled exceptions

Security Issues - Summary: Unvalidated form data risks security vulnerabilities in ProcessMapDetails. - Unvalidated form data from Request.Form

Performance Issues - Summary: Optimize string comparisons for boolean flags to improve performance. - Multiple string comparisons for boolean flags, Inefficient determination of isXml and isReimport

Maintainability Issues - Summary: Simplify conditionals, fix naming errors, reduce parameter count, and correct syntax for maintainability. - Complex conditional statements reduce readability, Method name 'getProceeMapPageData' contains a typo, Variable names do not follow C# naming conventions, Incomplete or malformed code snippets cause syntax errors - UpdateProcessMap method has excessive parameters

UX Impact Notes - Summary: The method provides clear user feedback on errors and updates the interface after processing. - Redirect to 'EnrichProcessMap' after reimport - Redirect to 'ValidateProject' after success to update UI state - Return 'FixValidation' view for user error correction - Return 'FixValidationErr' view to display validation errors

Test Case Ideas - and redirections. - Extract and assign map details correctly - Return FixValidation view on validation errors - Call UpdateProcessMap when isReimport is true - Set isSuccessful based on TraverseAndSave result - Return control to caller as expected - Handle various error types and error values - Handle empty and non-empty LstVisioError lists - Handle syntax errors and incomplete code - Redirect correctly after reimport - Redirect to ValidateProject when isSuccessful is true

Dependencies & Called Services - Summary: Uses IProcessModel to process and import string data. - IProcessModel interface, String data input - Process handling

ProjectNameExists

Summary: The method checks if a project exists and returns a JSON with a message and existence status.

JsonResult ProcessController.ProjectNameExists(string ProjectName, string Token)

Routing

  • HTTP: GET
  • URL: /Process/ProjectNameExists
Detailed Analysis

Key Flows - Summary: The method checks if a project exists and returns a JSON with a message and existence status. - Check project existence - Return JSON with message and boolean status

Security Issues - Summary: Use of unsanitized user credentials risks security vulnerabilities. - Use of unsanitized UserName and Token, Lack of validation before token verification

Maintainability Issues - Summary: Improve variable naming and reduce tight coupling for better maintainability. - Incomplete or truncated variable name 'Toke', Tightly coupled with ProcessMapModel and Registry classes, Poorly descriptive variable name 'Exist'

UX Impact Notes - Summary: JSON response impacts UI updates and user flow messaging. - JSON response affects UI updates

Test Case Ideas - Summary: Verify ProjectNameExists returns correct JsonResult based on project existence and license status. - Return type JsonResult

Dependencies & Called Services - Summary: Checks project name existence using process model and string input. - IProcessModel dependency, String input parameter

CreateProject

Summary: CreateProject verifies project uniqueness, creates the project, and uploads a template if required.

ActionResult ProcessController.CreateProject(FormCollection collection, HttpPostedFileBase file, int? isQuickUpload)

Routing

  • HTTP: POST
  • URL: /Process/CreateProject

Cross-layer call chain - ProcessController.CreateProject → Andromeda.Core.DataManager.ExecuteScalar - ProcessController.CreateProject → Andromeda.Core.DataManager.Execute - ProcessController.CreateProject → Andromeda.Core.Entities.Membership.GetAllUsers - ProcessController.CreateProject → Insorce.Models.UserProfile.GetUserProfile - ProcessController.CreateProject → Andromeda.Core.Entities.Project.GetTags - ProcessController.CreateProject → Andromeda.Core.Utility.Encrypt.DecryptString - ProcessController.CreateProject → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_DataManager_ExecuteScalar["Andromeda.Core.DataManager.ExecuteScalar"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    ProcessController_CreateProject["ProcessController.CreateProject"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CreateProject --> Andromeda_Core_DataManager_Execute
    ProcessController_CreateProject --> Andromeda_Core_DataManager_ExecuteScalar
    ProcessController_CreateProject --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_CreateProject --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_CreateProject --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_CreateProject --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CreateProject --> Insorce_Models_UserProfile_GetUserProfile
View Metadata
  • View: CreateProject (Andromeda.Web\Views\Process\CreateProject.cshtml)
  • Model: IList<Andromeda.Validation.VisioError>
Detailed Analysis

Key Flows - Summary: CreateProject verifies project uniqueness - creates the project - Check project name uniqueness and return error if duplicate - Create project via ProcessMapModel.CreateProject with parameters - Upload template Excel and update project registry if template flag set

Error Flows - Summary: Handle project name conflicts and invalid tokens with error messages and prevent creation. - Detect existing project name and return error without creating project - Validate project token and set error message on invalid token

Security Issues - Summary: CreateProject lacks input validation - Missing validation and sanitization of user input, Storing user IDs and names in ViewData risks unauthorized access, Decrypting project token without error handling

Performance Issues - Summary: Avoid ToList() on large collections to prevent performance degradation. - Use of ToList() on large collections

Maintainability Issues - Summary: Replace magic strings and unclear constants with named constants to improve code clarity and maintainability. - Use of magic strings reduces flexibility and readability, Incomplete or malformed code segments hinder understanding, Unclear property names and error messages reduce clarity, Lack of explanation for constants decreases code transparency, Unused or unclear variable declarations cause confusion, Hardcoded strings and numbers require named constants

UX Impact Notes - Summary: Provide clear error messages and consistent feedback to improve user workflow and clarity. - Conditional redirects affect user navigation

Test Case Ideas - and existence checks. - Check project existence with valid and invalid names - Create project with valid parameters and optional template IDs - Handle data input template flag variations - Retrieve project details from form, Filter and project organization members and roles, Upload template Excel files

Dependencies & Called Services - Summary: CreateProject uses data conversion - Data conversion utilities, Encryption services, Enumerable collections, Actor model interface, Project model interface, List collections, Membership management, Registry access, String manipulation - Process model interface, Process handling

ProcessCreation

Summary: ProcessCreation retrieves project data, sets review flags, and returns a view or redirects based on conditions.

ActionResult ProcessController.ProcessCreation()

Routing

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

Key Flows - sets review flags - and returns a view or redirects based on conditions. - Redirect to ReviewProcessMap if activities empty - and 'reimport' query set - Iterate node collections to set review flags - Return populated view

Error Flows - Summary: Handle early exit on invalid submodule status and redirect on specific activity and file conditions. - Early exit on null or unapproved submodule status - Redirect to ReviewProcessMap based on activities list

Security Issues - Summary: No security issues found; method is not sensitive. - No explicit security vulnerabilities, Method not marked sensitive

Performance Issues - Summary: Excessive database calls and repeated FirstOrDefault usage degrade performance. - Multiple database or model calls reduce performance, Repeated FirstOrDefault calls inside loops degrade performance on large collections

Maintainability Issues - Summary: Refactor code to improve readability, decouple components, and replace magic strings. - Direct ViewData setting lacks robust data binding

UX Impact Notes - Summary: The method controls user flow with redirects - 'reimport' query parameter triggers re-import or redirect - Redirects to ReviewProcessMap page under specific conditions

Test Case Ideas - flag settings - Handle empty activities list with existing file - Handle approved and non-approved submodule statuses - Process 'reimport' query string parameter values - Filter and process compensatory activities before ViewData assignment - Iteratively retrieve review status and set flags for FTR - Set boolean flags correctly under various conditions

Dependencies & Called Services - Summary: ProcessCreation uses core collections, file handling, and multiple model interfaces. - Core collections (Enumerable, List, String), File handling, Model interfaces (IActorModel, IControlModel, IInfraModel, IProcessModel, IProjectModel, IRiskModel)

CreateProject_Old

Summary: Extract project details, validate uniqueness, handle file uploads, create project, generate reports, and redirect to enrichment view.

ActionResult ProcessController.CreateProject_Old(FormCollection collection, HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/CreateProject_Old

Cross-layer call chain - ProcessController.CreateProject_Old → Andromeda.Core.Entities.Membership.GetAllUsers - ProcessController.CreateProject_Old → Insorce.Models.UserProfile.GetUserProfile - ProcessController.CreateProject_Old → Andromeda.Core.Utility.Compress.UnzipFolder - ProcessController.CreateProject_Old → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Utility_Compress_UnzipFolder["Andromeda.Core.Utility.Compress.UnzipFolder"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    ProcessController_CreateProject_Old["ProcessController.CreateProject_Old"]
    ProcessController_CreateProject_Old --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_CreateProject_Old --> Andromeda_Core_LoggingManager_Error
    ProcessController_CreateProject_Old --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_CreateProject_Old --> Insorce_Models_UserProfile_GetUserProfile
Detailed Analysis

Key Flows - validate uniqueness - handle file uploads - create project - and redirect to enrichment view. - Check for existing project name to prevent duplicates - Create project with notification settings - Extract project details from request, Generate migration reports or project outcomes - Handle file uploads with type-specific processing - Redirect to EnrichProcessMap view with ProjectId

Error Flows - Summary: Handle errors by setting messages - and returning error views. - Set error and return view if Excel file has no sheets - Set errors and redirect if Visio validation or BPMN file is invalid - log errors - and return error views on exceptions

Security Issues - Summary: Unvalidated user input risks SQL injection and directory traversal attacks. - Unvalidated user input

Performance Issues - Summary: Optimize file search, avoid unnecessary collection loading, and reduce redundant volume recalculations. - Inefficient recursive file search with Directory.GetFiles and Directory.GetFile, Unnecessary ToList() causing full collection loading into memory, Redundant or repeated calls to RecalculateVolumes impacting performance

Maintainability Issues - Summary: Refactor code to improve clarity, readability, and reduce errors. - Repeated ViewBag assignments need refactoring

UX Impact Notes - Summary: Inform users of duplicate projects and guide workflow with clear redirects and error handling. - Inform users of duplicate project names to prevent duplicates, Guide users to enrich process map after successful project creation, Fix incomplete or malformed error messages and view names to avoid confusion and runtime errors, Ensure reliable and timely file processing to maintain user experience - Redirect users based on validation outcomes to appropriate views

Test Case Ideas - and returned views. - Correct view returns for all branches and errors

Dependencies & Called Services - Summary: Uses file handling, logging, membership, process control, and data structures. - File compression, Directory management, Enumerable collections, HTTP file handling, Actor and process models, List data structure, Membership services, File path operations, String manipulation - Logging management - Process control

ExcelProject

Summary: The method processes .csv or .xlsx files to extract headers, map them to destinations, and return structured column and sheet data.

Tuple<List<AllSheetsColumns>, List<NewSheet>> ProcessController.ExcelProject(string filepath)

Routing

  • URL: /Process/ExcelProject

Cross-layer call chain - ProcessController.ExcelProject → Andromeda.Core.Services.ExcelGenerator.ReadAllSheets - ProcessController.ExcelProject → Andromeda.Core.Services.ExcelGenerator.GetCellValue

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_ExcelGenerator_GetCellValue["Andromeda.Core.Services.ExcelGenerator.GetCellValue"]
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    ProcessController_ExcelProject["ProcessController.ExcelProject"]
    ProcessController_ExcelProject --> Andromeda_Core_Services_ExcelGenerator_GetCellValue
    ProcessController_ExcelProject --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
Detailed Analysis

Key Flows - and return structured column and sheet data. - Check file extension to determine processing logic - Create AllSheetsColumns and NewSheet lists from .csv headers - Create AllSheetsColumns objects for each .xlsx header cell - Return tuple of AllSheetsColumns list and NewSheet list

Error Flows - Summary: The method returns null on filter failures and lacks exception handling - Return null when filtered sheets count is zero - Potential NullReferenceExceptions from missing null checks on rows or cells

Security Issues - Summary: Prevent unauthorized file access and improve file extension validation. - File path injection risk from unvalidated input filepaths

Performance Issues - Summary: Optimize memory usage and avoid inefficient LINQ and object creation in large Excel files. - Reading entire files into memory degrades performance with large files, Inefficient use of LINQ methods on large collections, Repeated creation of AllSheetsColumns objects inside loops, Slow complex property chains and Descendants() calls on large OpenXML documents

Maintainability Issues - Summary: Code readability and maintainability suffer from unclear naming, magic strings, and redundant code. - Redundant variable assignments

UX Impact Notes - Summary: Returning null without handling degrades user experience despite no direct UI impact. - Unclear null return handling

Test Case Ideas - Summary: Validate file handling - large datasets

Dependencies & Called Services - Summary: Utilizes collections, file handling, and OpenXML classes for Excel document generation. - Enumerable for collection operations, ExcelGenerator for Excel file creation, File and Path for file system access, IActorModel for actor pattern implementation, List for data storage, OpenXmlElement and OpenXmlPartContainer for OpenXML document structure, SpreadsheetDocument for Excel document manipulation, StreamReader for reading streams, String for text handling

ProjectMapping

Summary: Ensure target directory exists, save uploaded file, process it, and return JSON data.

JsonResult ProcessController.ProjectMapping(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/ProjectMapping
View Metadata
  • View: ProjectMapping (Andromeda.Web\Views\Process\ProjectMapping.cshtml)
Detailed Analysis

Key Flows - and return JSON data. - Process file with ExcelProject method - Verify or create target directory - Return processed data as JSON response

Error Flows - Summary: Create missing directories before saving files without explicit error handling. - Create directory if missing before file save - Lack of explicit exception handling during file operations

Security Issues - Summary: Storing sensitive data insecurely and unsanitized path construction create security risks. - Insecure storage of sensitive data in registry, Path traversal vulnerability from unsanitized file path construction

Performance Issues - Summary: ExcelProject method consumes excessive resources on large files. - High resource usage in ExcelProject method with large files

Maintainability Issues - Summary: Hardcoded folder path and incomplete code reduce maintainability and clarity. - Hardcoded '\temp\' folder path, Incomplete variable declarations and code snippets

UX Impact Notes - Summary: Dynamically changing response format affects client handling and user experience. - Dynamic response format based on request content types, Impact on client-side handling, Influence on user experience

Test Case Ideas - Summary: Verify project ID retrieval, directory handling, file saving, data extraction, and security against path traversal. - Create directory if absent - Handle existing and non-existing target directories - Return expected data from ExcelProject method for valid files

Dependencies & Called Services - Summary: Uses system and web utilities for file handling, path management, and process control. - Directory for file system operations, HttpPostedFileBase for handling uploaded files, Path for file path manipulations, String for text operations - Process for managing system processes

ReadDataFromFile

Summary: No overall behaviour summary returned

JsonResult ProcessController.ReadDataFromFile()

Routing

  • HTTP: POST
  • URL: /Process/ReadDataFromFile

Cross-layer call chain - ProcessController.ReadDataFromFile → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - ProcessController.ReadDataFromFile → Andromeda.Core.Services.ExcelGenerator.CellReferenceToIndex - ProcessController.ReadDataFromFile → Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace - ProcessController.ReadDataFromFile → Andromeda.Core.LoggingManager.Info - ProcessController.ReadDataFromFile → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars - ProcessController.ReadDataFromFile → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    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_Services_ExcelGenerator_CellReferenceToIndex["Andromeda.Core.Services.ExcelGenerator.CellReferenceToIndex"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    ProcessController_ReadDataFromFile["ProcessController.ReadDataFromFile"]
    ProcessController_ReadDataFromFile --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_ReadDataFromFile --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace
    ProcessController_ReadDataFromFile --> Andromeda_Core_LoggingManager_Error
    ProcessController_ReadDataFromFile --> Andromeda_Core_LoggingManager_Info
    ProcessController_ReadDataFromFile --> Andromeda_Core_Services_ExcelGenerator_CellReferenceToIndex
    ProcessController_ReadDataFromFile --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
Detailed Analysis

Dependencies & Called Services - Summary: Reads and processes file data using parsing, logging, and data conversion services. - File path handling, Text field parsing, Data conversion to numeric types, Enumerable and LINQ operations, List and array manipulations, Asynchronous task handling, Time interval calculations, Excel file generation, Wizard model interface usage - Logging management - Process management

CreateXMLToDrawProcessMap

Summary: Decode JSON data to build process map components, create swimlanes and shapes, then save and set products.

ActionResult ProcessController.CreateXMLToDrawProcessMap()

Routing

  • HTTP: POST
  • URL: /Process/CreateXMLToDrawProcessMap
Detailed Analysis

Key Flows - create swimlanes and shapes - then save and set products. - Check and save mapping headers if missing - Create AllSheetsColumns instances - Create ShapeInfo objects for activities with positions - Extract distinct actors and create SwimlaneInfo objects - then set products - Handle decision shapes and set products

Error Flows - Summary: The method risks runtime errors from invalid JSON, null objects, empty collections, and incomplete code. - Access errors from unchecked empty collections such as SwimLaneList or ShapeList

Security Issues - Summary: Fix JSON deserialization, SQL injection, and unauthorized file deletion vulnerabilities. - JSON deserialization vulnerability from unvalidated System.Web.Helpers.Json.Decode input

Performance Issues - Summary: Optimize JSON decoding, collection queries, string operations, and manage collection growth for performance. - Slow JSON decoding with System.Web.Helpers.Json.Decode on large inputs, Inefficient collection queries using Where, Any, FirstOrDefault inside loops, Repeated string operations without caching in loops, Unbounded growth of collections like ArrowList causing performance issues

Maintainability Issues - Summary: The method suffers from unclear naming, magic literals, incomplete code, and poor readability. - Missing explicit return statements

UX Impact Notes - Summary: Invalid inputs and performance issues disrupt process map creation and navigation. - Performance issues cause delays with large datasets - Redirect after file deletion alters navigation flow

Test Case Ideas - conditional logic - Check file existence - deletion logic - and RedirectToAction calls - Create and assign properties to ShapeInfo objects for 'Start' - Handle missing or malformed JSON data - Invoke SetProduct method conditionally on TraverseAndSave success - Assess performance with large datasets - Validate conditional calls to SaveMappingHeader based on header counts

Dependencies & Called Services - Summary: Uses core collections and interfaces to build XML for process mapping. - Enumerable for collection operations, File for file handling, IActorModel interface for actor data, IControlModel interface for control data, IProcessModel interface for process data, Int32 for integer values, List for list collections, String for text handling, Convert for data type conversions

Reimport

Summary: Process valid '.vsdx' or '.vsdm' files by saving, optionally unzipping, validating Visio content, and returning changes.

JsonResult ProcessController.Reimport(HttpPostedFileBase file, bool? IsDuplicateActorMerge)

Routing

  • HTTP: POST
  • URL: /Process/Reimport

Cross-layer call chain - ProcessController.Reimport → Andromeda.Core.Utility.Compress.UnzipFolder

Call Chain Diagram

flowchart TD
    Andromeda_Core_Utility_Compress_UnzipFolder["Andromeda.Core.Utility.Compress.UnzipFolder"]
    ProcessController_Reimport["ProcessController.Reimport"]
    ProcessController_Reimport --> Andromeda_Core_Utility_Compress_UnzipFolder
Detailed Analysis

Key Flows - and returning changes. - Handle '.vsdx' or '.vsdm' file upload - Return process map changes - Validate Visio content

Error Flows - Summary: Handle exceptions from invalid ProjectId conversion and fix syntax errors to prevent runtime and compilation failures. - Exceptions from Convert.ToInt32 on unvalidated ProjectId input

Security Issues - Summary: Prevent path traversal by sanitizing user-controlled folder and file paths. - Path traversal vulnerability, Unsanitized user-controlled folder paths

Performance Issues - Summary: Repeated string.Replace calls on the same file path reduce performance. - Repeated string.Replace on identical file path, Inefficient extension replacement

Maintainability Issues - Summary: Magic strings and syntax errors reduce clarity; complex call chains hinder comprehension. - Use of magic strings reduces code clarity and maintainability, Incomplete code lines and syntax errors hinder readability and maintenance, Complex method call chains reduce code comprehensibility

UX Impact Notes - Summary: File saving delays and processing errors degrade user experience. - Delays during file saving and Visio file validation, File processing errors from invalid or corrupted files

Test Case Ideas - Summary: Verify parameter defaults, file handling, directory management, and Visio file processing. - Check directory existence for existing and missing paths - Create directories based on 'ts' function result - Default IsDuplicateActorMerge parameter to true, Retrieve project ID from request form and registry fallback, Initialize folder path from configuration, Save files to constructed file paths, Compile method after syntax error fixes - Handle other file extensions and invoke SaveAs - Handle edge cases with empty folder or file names - Process '.vsdx' file uploads correctly - Validate Visio files and call GetProcessMapChanges

Dependencies & Called Services - Summary: Reimport method uses file handling, processing, and data conversion services. - File compression, Data conversion, Directory management, HTTP file handling, File path operations, String manipulation - Process modeling, Process control

GetProcessMapChanges

Summary: Validate input, retrieve and compare project data to identify changes, duplicates, and errors in process maps.

JsonResult ProcessController.GetProcessMapChanges(ValidateData dataxml, int ProjID)

Routing

  • URL: /Process/GetProcessMapChanges
Detailed Analysis

Key Flows - Summary: Validate input - Calculate deleted activities and actors and generate Visio errors for cross-project shapes and actors - Handle deleted risk activities and group activity and risk group IDs for processing - Retrieve activities, child project IDs, and mapping details for given ProjID, Filter mapping details to separate actors and activities and extract IDs, Compare input data with database to identify new, deleted, and changed shapes and actors, Retrieve database actors and input swimlanes to detect duplicates or renamed swimlanes - Validate input XML for duplicate actors and return error JSON if found

Error Flows - Summary: Return JSON or plain text errors for duplicate actors - Duplicate actor error returns JSON indicating duplicated teams - Project ID mismatch error returns JSON indicating process-project mismatch - Visio errors return JSON table or plain text based on AcceptTypes - Processing errors return JSON or plain text error messages based on AcceptTypes

Security Issues - Summary: Prevent SQL injection and XSS by avoiding unsafe string concatenation in Visio errors table construction. - SQL injection risk from string concatenation, XSS vulnerability in Visio errors table

Performance Issues - Summary: Excessive database calls and inefficient LINQ usage degrade performance. - Multiple database calls impact performance, Inefficient LINQ methods on large collections, Excessive use of ToList causes memory overhead, Nested Any and Where calls inside loops reduce efficiency

Maintainability Issues - complex logic - Use of magic strings and numbers without named constants, Non-descriptive and typo-containing variable names, Complex, nested conditional statements, Incomplete, truncated, or malformed code snippets and comments, Unused variables indicating code quality issues, Error-prone string concatenation for HTML error messages

UX Impact Notes - Summary: The method's error handling and redirects affect user workflow and clarity. - JSON responses with redirect flags cause client-side redirection impacting UX

Test Case Ideas - Summary: Test GetProcessMapChanges for data validation, filtering, processing, and response correctness. - Check dataxml.isActorDuplicate true and false cases - Return correct JSON or plain text based on AcceptTypes - Assign session dataxml and handle dataxml.LstVisioError presence - Handle imported process mismatching project ID - Handle deleted shapes and activities including CheckDeletedActivities - Process new and deleted actors, shapes, and activities in JSON response - Validate method with valid parameters - Validate performance and correctness of LINQ and collection operations

Dependencies & Called Services - Summary: Uses data structures and models for processing and risk evaluation. - Dictionary for key-value data storage, Enumerable for collection manipulation, List for ordered data storage, IActorModel for actor representation, IProcessModel for process representation, IRiskModel for risk assessment, Math for calculations, String for text manipulation, Int32 for integer operations, Convert for type conversions - Process for system process handling

ImportProcessMapChanges

Summary: ImportProcessMapChanges updates a process map and copied activities for a given project.

ValidateData ProcessController.ImportProcessMapChanges(int ProjID, ValidateData dataxml)

Routing

  • URL: /Process/ImportProcessMapChanges
Detailed Analysis

Key Flows - Summary: ImportProcessMapChanges updates a process map and copied activities for a given project. - Receive project ID and ValidateData with process map details - Call UpdateProcessMap with project ID and process map components - Return result from UpdateProcessMap - Update copied activities if copied shapes exist

Maintainability Issues - Summary: Incomplete code hinders understanding and maintenance of UpdateCopiedActivities and method return behavior. - Incomplete UpdateCopiedActivities call impedes code clarity - Truncated method ending obscures return behavior

Test Case Ideas - Summary: Verify UpdateProcessMap call - return value - Call UpdateProcessMap with correct project ID and ValidateData - Return expected result from UpdateProcessMap - Call UpdateCopiedActivities with correct parameters when CopiedShapes has elements - Handle empty CopiedShapes collection

Dependencies & Called Services - Summary: Uses collections and process model interfaces for process map changes. - Enumerable for collection operations, IProcessModel interface for process abstraction - Process entity for process representation

ReImportDiagramConfirm

Summary: ReImportDiagramConfirm validates session data, handles Visio errors, processes map changes, updates status, logs actions, and returns appropriate responses.

JsonResult ProcessController.ReImportDiagramConfirm()

Routing

  • URL: /Process/ReImportDiagramConfirm

Cross-layer call chain - ProcessController.ReImportDiagramConfirm → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_ReImportDiagramConfirm["ProcessController.ReImportDiagramConfirm"]
    ProcessController_ReImportDiagramConfirm --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: ReImportDiagramConfirm validates session data - handles Visio errors - updates status - logs actions - and returns appropriate responses. - Check for Visio errors in ValidateData - Log the operation - Retrieve project ID and ValidateData from session - Return success response - Set ViewBag and redirect to ValidationErrors on Visio errors - Update reviewed status

Error Flows - Summary: Unchecked parameters cause NullReferenceExceptions and malformed code causes errors. - NullReferenceExceptions from unchecked parameters in CheckPathsTouchingEachOther

Security Issues - Summary: Incomplete or malformed code fragments risk code injection or corruption. - Code injection risk from malformed code fragments, Code corruption risk from incomplete code

Maintainability Issues - Summary: Code uses unexplained magic strings, contains corrupted fragments, long complex lines, and a probable typo. - Unexplained magic strings 'ProjectId' and 'dataxml', Corrupted or incomplete code fragments, Long lines with multiple method calls reducing readability, Typo in variable name 'ojectStage' instead of 'objectStage'

UX Impact Notes - Summary: Redirect users based on validation - and log error visibility. - Display error messages to users affecting user experience - Redirect users to ValidationErrors page on validation failure - Redirect users to project changes page if project stage is blocked - Redirect users to ProcessCreation or generic process page based on project status

Test Case Ideas - status updates - and redirects. - ViewBag property settings on validation errors - JSON response redirect URL correctness - ImportProcessMapChanges call with correct project ID and dataxml update - Conditional logic with Constants.IsDetectMu values - Reviewed status updates and error message logging - Redirect conditions based on project status and ID - Redirect property correctness and navigation

Dependencies & Called Services - Summary: ReImportDiagramConfirm uses services for conversion, date handling, project change detection, model processing, logging, and process management. - Conversion service, DateTime handling, Project change detection, Model processing - Logging management - Process management

UpdateCopiedActivities

Summary: UpdateCopiedActivities duplicates project activities and arrows, updates properties, maintains relationships, and recalculates volumes.

void ProcessController.UpdateCopiedActivities(Dictionary<ShapeInfo, List<ShapeInfo>> CopiedShapes, int ProjID)

Routing

  • URL: /Process/UpdateCopiedActivities
Detailed Analysis

Key Flows - Summary: UpdateCopiedActivities duplicates project activities and arrows - updates properties - Copy properties and update business properties via control model - Retrieve and filter project arrows based on updated activities - Recalculate volumes after activity and arrow updates - Update arrow properties and maintain predecessor-successor links

Error Flows - Summary: Handle null references and ensure complete code to prevent unexpected errors. - Null reference exceptions from 'dup.Key' or 'dupRec' during type checks - Incomplete code causing unhandled cases or missing return statements

Security Issues - Summary: No security issues identified in UpdateCopiedActivities method. - No explicit security vulnerabilities found

Performance Issues - Summary: Multiple LINQ queries and nested iterations cause high memory use and slow performance. - Multiple LINQ queries with 'Where', 'Any', and 'ToList' inside loops causing repeated enumerations, Use of 'Any' inside 'Where' clauses and nested loops leading to inefficient large collection iterations, Repeated LINQ operations and complex lambdas increasing memory allocations, Unoptimized iteration over large collections like activities, arrows, and duplicates causing slowdowns

Maintainability Issues - Summary: The method's unclear naming, magic strings, tight coupling, and misleading annotation reduce maintainability. - Avoid [NonAction] annotation on methods with business logic

Test Case Ideas - arrow updates - Handle decision-type activities and copy decision outputs - Handle empty collections for copied activities - Handle scenarios with no duplicates found - Filter duplicates accurately across varied datasets - Invoke CopyAllPropertiesOfActivity and SetBusiness on duplicates - Retrieve and filter arrow details based on updated activities - Assess performance with large datasets - Update arrow properties correctly for relevant arrows

Dependencies & Called Services - Summary: Uses collections and interfaces to manage and process activity data. - IControlModel interface for control logic - IProcessModel interface for process logic - Process for system process management

ReImportDiagramNo

Summary: The method clears the 'dataxml' session variable and returns a success JSON response.

ActionResult ProcessController.ReImportDiagramNo()

Routing

  • URL: /Process/ReImportDiagramNo
Detailed Analysis

Key Flows - Summary: The method clears the 'dataxml' session variable and returns a success JSON response. - Return JSON response with success status

Maintainability Issues - Summary: The method lacks implementation, causing potential confusion and errors. - Method declared without implementation, Risk of confusion and errors

UX Impact Notes - Summary: Indicate operation success to client via JSON boolean true. - JSON response with boolean true indicates success

Test Case Ideas - Summary: Verify ReImportDiagramNo returns valid ActionResult - and returns true JSON. - Return valid ActionResult - Return JSON with boolean true

MapValidationErrors

Summary: Initialize view properties and process session data to display validation errors in a specific view.

ActionResult ProcessController.MapValidationErrors()

Routing

  • HTTP: GET
  • URL: /Process/MapValidationErrors
Detailed Analysis

Key Flows - Summary: Initialize view properties and process session data to display validation errors in a specific view. - Set ViewData with processed data - Return 'FixValidationErrors' view with validation errors

Error Flows - Summary: Handle missing or invalid session data by returning an empty process map and error view. - Check if session variable 'dataxml' is null or invalid - Set empty 'ProcessMap' in ViewData - Return 'FixValida' view to display validation errors without data

Maintainability Issues - Summary: Remove magic strings and clarify method naming for better maintainability. - Method name does not clearly reflect returned view

UX Impact Notes - Summary: Redirect users to appropriate views based on validation errors and data presence. - Initialize ViewBag properties for project details display - Redirect to 'FixValidationErrors' view when errors and data exist

Test Case Ideas - and correct view return with errors. - Access and set ViewData properly - Return FixValidationErrors view with validation errors

Dependencies & Called Services - Summary: MapValidationErrors depends on the Process service. - Process service dependency

ValidationErrors

Summary: The method processes valid 'dataxml' session data, sets ViewData, and returns the 'FixValidationErrors' view.

ActionResult ProcessController.ValidationErrors()

Routing

  • HTTP: GET
  • URL: /Process/ValidationErrors
Detailed Analysis

Key Flows - sets ViewData - and returns the 'FixValidationErrors' view. - Process data with getProceeMapPageData - Set ViewData with processed data - Return 'FixValidationErrors' view with data

Error Flows - Summary: Handle null session variables and fix syntax errors to prevent runtime exceptions. - Null reference risk from missing 'dataxml' session variable, Syntax errors and incomplete conditionals causing runtime failures

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

Performance Issues - Summary: Calling getProceeMapPageData with session data may degrade performance if computation is heavy. - Expensive getProceeMapPageData computation, Session data usage during request

Maintainability Issues - Summary: Refactor to remove magic strings, reduce Session coupling, and improve ViewData clarity. - Magic strings for view names causing errors and refactoring issues, Tight coupling with Session object hindering testing and flexibility, Anonymous objects and empty arrays in ViewData reducing readability and maintainability

UX Impact Notes - Summary: Displays validation errors or correction forms based on session data validity. - Display validation errors through appropriate views, Show correction forms when session data is invalid, Ensure proper handling of validation errors to maintain UX

Test Case Ideas - Summary: Validate method returns correct ActionResult and initializes ViewBag with session-dependent data. - Handle conditional logic for session 'dataxml' states - Return valid ActionResult - Return 'FixValidationErrors' view with expected data

Dependencies & Called Services - Summary: ValidationErrors depends on the Process service. - Process service dependency

getProceeMapPageData

Summary: No key flows are defined for the getProceeMapPageData method.

object ProcessController.getProceeMapPageData(List<SwimlaneInfo> swimlanList, List<ShapeInfo> shapeList, List<EdgeInfo> edgeList)

Routing

  • URL: /Process/getProceeMapPageData

Cross-layer call chain - ProcessController.getProceeMapPageData → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    ProcessController_getProceeMapPageData["ProcessController.getProceeMapPageData"]
    ProcessController_getProceeMapPageData --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
Detailed Analysis

Key Flows - Summary: No key flows are defined for the getProceeMapPageData method.

Error Flows - Summary: The method lacks explicit error handling and exception management. - Absence of error handling, No exception management

Performance Issues - Summary: Avoid multiple enumerations by minimizing repeated ToList() and ToDictionary() calls. - Multiple ToList() calls causing repeated enumerations, Multiple ToDictionary() calls causing repeated enumerations, Performance impact from repeated list enumerations

Maintainability Issues - Summary: Returning anonymous types reduces code clarity and complicates integration. - Use anonymous types for returned object

Test Case Ideas - Summary: Verify method accessibility and handling of empty input lists. - Method inaccessibility due to NonAction attribute, Handling of empty input lists

Dependencies & Called Services - Summary: Uses LINQ and type conversion utilities for data processing. - Enumerable for LINQ operations, Int32 for type conversion, LinqExtensions for extended LINQ methods, Convert for data type conversion

Validation

Summary: The method validates a project with optional parameters, filters errors based on conditions, updates statuses, and returns results.

PartialViewResult ProcessController.Validation(int? IsEnrich, int? ShowWarnings, int? ChildId)

Routing

  • HTTP: GET
  • URL: /Process/Validation
View Metadata
  • View: Validation (Andromeda.Web\Views\Process\Validation.cshtml)
  • Model: IList<Andromeda.Validation.VisioError>
Detailed Analysis

Key Flows - Summary: The method validates a project with optional parameters - updates statuses - and returns results. - Set validation source and perform validation via CheckBeforeOptimise - Populate view data and return PartialViewResult with validation results - Update impact statuses when errors exist

Error Flows - Summary: Update project impact status based on specific validation errors and filter relevant error details. - Return JSON object if no errors with details exist - Update project impact status for ErrorType.Error validation errors

Security Issues - Summary: No security issues identified in the analysis.

Performance Issues - Summary: Avoid inefficient LINQ operations that cause memory overhead and slow performance on large datasets. - Sum and Count operations degrade performance on large error detail sets

Maintainability Issues - Summary: Refactor code to improve readability, reduce coupling, and eliminate redundant calls. - Redundant calls to SetCompleteImpactStatus suggest bugs or unnecessary code

UX Impact Notes - Summary: The method controls validation message display and filtering, directly affecting user feedback. - Assign validation errors and warnings to ViewData and ViewBag - Return PartialViewResult with filtered validation errors - Incomplete returns risk unexpected user experience issues

Test Case Ideas - Summary: Validate error filtering - ID assignments - status updates - Correct ProjId assignment based on ChildId - Performance and correctness with large error sets - Correct impact status updates for ErrorType.Error - Proper PartialViewResult return with filtered errors

Dependencies & Called Services - Summary: Uses enumerable collections of actor and impact models for validation. - Enumerable collections, IActorModel interface, IImpactModel interface

InputValidation

Summary: InputValidation processes multiple case types but many implementations are incomplete or erroneous.

PartialViewResult ProcessController.InputValidation(string screenRelated)

Routing

  • HTTP: GET
  • URL: /Process/InputValidation
Detailed Analysis

Key Flows - Summary: InputValidation processes multiple case types but many implementations are incomplete or erroneous. - Handle 'PRODUCT' case - Handle 'VOLUME' case - Handle 'AHT' case - Handle 'DOE' case - Handle 'DEADLINE' case - Handle 'TOD' case - Handle 'FORMSBRS' case - Handle 'TEAM' case - Handle 'TEAMSALARY' case - Handle 'CONTROLS' case - Handle 'INFRA' case - Handle 'PERIODIC' case - Incomplete or error-prone case implementations

Error Flows - Summary: Fix incomplete code and add null checks to prevent exceptions and assignment failures. - Missing null checks on properties leading to null reference exceptions - Syntax errors causing improper 'relatedTo' assignments

Security Issues - Summary: No security issues found; method handles no sensitive data. - No sensitive data handling, Method not marked sensitive, No explicit security vulnerabilities

Performance Issues - Summary: Summing large VisioError collections to count warnings degrades performance. - Inefficient Sum method on large VisioError collections, Performance impact counting warning errors

Maintainability Issues - Summary: Code contains syntax errors, unclear statements, dead code, and uses magic strings instead of constants. - Syntax errors and incomplete code reduce readability, Use enums or constants instead of magic strings, Unclear 'me;' statement confuses maintainers, Dead or unused property accesses indicate incomplete code

UX Impact Notes - Summary: Displays validation warning count to inform users in the UI. - Calculate warning error count - Store warning count in ViewBag for UI display

Test Case Ideas - Summary: Validate method calls - and variable assignments. - Check behavior when 'relatedTo' remains unassigned due to missing switch cases - Validate ViewData and ViewBag population - Verify 'CheckBeforeOptimise' call with correct parameters

Dependencies & Called Services - Summary: Uses Enumerable for collections, IActorModel for actor data, and String for text handling. - Enumerable for collection operations, IActorModel for actor data representation, String for text processing

ValidateProduct

Summary: ValidateProduct retrieves project data, validates the activity product root, and returns validation errors.

JsonResult ProcessController.ValidateProduct()

Routing

  • HTTP: GET
  • URL: /Process/ValidateProduct

Cross-layer call chain - ProcessController.ValidateProduct → Andromeda.Core.DataManager.GetDataList - ProcessController.ValidateProduct → Andromeda.Core.Services.ProcessExtensions.FindByID

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_ValidateProduct["ProcessController.ValidateProduct"]
    ProcessController_ValidateProduct --> Andromeda_Core_DataManager_GetDataList
    ProcessController_ValidateProduct --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - Summary: ValidateProduct retrieves project data - validates the activity product root - and returns validation errors. - Return JSON with validation errors - Validate activity product root with collected data

Error Flows - Summary: Include root product validation errors in JSON response to inform client. - Root product validation errors included in JSON response

Performance Issues - Summary: Using FindByID inside a loop causes inefficient lookups and degrades performance. - FindByID method inside loop, Inefficient lookups during arrow filtering

Maintainability Issues - Summary: The method's tight coupling with multiple models complicates maintenance and testing. - Tight coupling with ProcessMapModel, controlModel, actorModel, Complicated maintenance and testing due to dependencies

UX Impact Notes - Summary: Return JSON errors to provide detailed - JSON error messages, Detailed validation feedback, Improved user experience

Test Case Ideas - Summary: ValidateProduct handles HTTP GET - Handle HTTP GET requests - Process valid project IDs without errors - Report validation errors in JSON response

Dependencies & Called Services - Summary: Uses collections and interfaces for actor, control, and process models. - Enumerable for collection operations, IActorModel interface, IControlModel interface, IProcessModel interface, List collection - ProcessExtensions utilities

saveDiagram

Summary: Process and update the project diagram from XML data, handle deletions, save changes, and respond with success.

JsonResult ProcessController.saveDiagram()

Routing

  • HTTP: POST
  • URL: /Process/saveDiagram

Cross-layer call chain - ProcessController.saveDiagram → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars - ProcessController.saveDiagram → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_saveDiagram["ProcessController.saveDiagram"]
    ProcessController_saveDiagram --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_saveDiagram --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Process and update the project diagram from XML data - handle deletions - Check and process deleted shapes with CheckDeletedActivities - Delete temporary XML file - Return JSON success response - Update process map and save configuration if no errors

Error Flows - Summary: Handle invalid ProjectID - and exceptions with logged JSON failures. - CheckDeletedActivities errors return JSON failure with validation details - and return JSON failure response

Security Issues - Summary: Unvalidated inputs risk XML injection - Unvalidated Request.Form access - Unvalidated file paths in deletion

Performance Issues - Summary: Loading large XML files and unoptimized collection operations degrade performance. - Loading entire XML file into memory - Unoptimized Select operation on large delshapeinfos collection, File deletion delays due to non-existent or locked files

Maintainability Issues - Summary: The method uses hardcoded values and incomplete code, reducing clarity and maintainability. - Use of magic numbers and strings reduces code clarity, Incomplete and fragmented code hinders understanding and maintenance, Lack of context and incomplete lines cause compilation errors, Hardcoded values in method calls reduce flexibility

UX Impact Notes - Summary: The method provides JSON feedback on validation errors but lacks clear error messages on exceptions. - Exception handling returns failure JSON without clear error details

Test Case Ideas - Summary: Validate saveDiagram handles POST requests - Accept only POST HTTP requests, Parse valid XML and populate SwimLaneList, ShapeList, ArrowList, deletion lists, Avoid issues from magic numbers and strings - Delete temporary XML file and handle missing file cases - Handle CheckDeletedActivities error and success responses - Update process map and save configuration after validation

Dependencies & Called Services - Summary: Uses XML processing, file I/O, logging, and LINQ for diagram saving. - Logging via LoggingManager - Process management with IProcessModel and Process - XML processing with XContainer and XElement, File input/output operations, LINQ operations with Enumerable and LinqExtensions, Stream reading with StreamReader and TextReader, String manipulation

CheckDeletedActivities

Summary: Retrieve activities, check for deletions, collect error messages, and return them as a string.

string ProcessController.CheckDeletedActivities(int ProjectID, List<int> delActivityIds, IList<Activity> activities, IList<ActivityGroup> activityGroups)

Routing

  • URL: /Process/CheckDeletedActivities
Detailed Analysis

Key Flows - check for deletions - and return them as a string. - Invoke ProcessMapModel.CheckDeletedActivities with collected data and inputs - Return accumulated error messages as a string

Error Flows - Summary: CheckDeletedActivities risks failures from null inputs - Null or invalid activities parameter causes unreliable retrieval from actor model, Syntax errors and incomplete conditionals cause compilation or runtime failures, Error message appending triggered by certain CtrlMessages elements, Incomplete or corrupted code leads to unexpected execution errors

Security Issues - Summary: Fix assignment in conditional to prevent unintended security behavior. - Assignment in conditional statement causing unintended behavior

Performance Issues - Summary: Avoid unhandled external calls and inefficient collection checks to improve performance. - Uncached external calls to GetObjectiveActivityRiskControl and GetCompensatoryActivities, Lack of error handling in external method calls, Inefficient use of Any() on large CtrlMessages collection

Maintainability Issues - Summary: Simplify method signature and fix incomplete code to improve maintainability and readability. - Complex method signature with multiple optional parameters, Incomplete and syntactically incorrect code causing compilation errors, Poorly descriptive variable names reducing code clarity, Corrupted code snippets hindering debugging and clarity

UX Impact Notes - Summary: The method appends error messages for deleted activities, affecting user error communication. - Returning error messages as strings impacts user communication

Test Case Ideas - Summary: Verify CheckDeletedActivities returns correct activities - handles deleted states - Handle empty and non-matching CtrlMessages collections - Handle and log different types of deleted activities - Return correct objective activity risk control for project ID - Return correct compensatory activities for project ID - Ensure CheckDeletedActivities called with correct parameters - Return correct error message strings and handle error scenarios - Validate 'getActivities' returns expected activities and assigns 'activities' correctly

Dependencies & Called Services - Summary: Uses multiple model interfaces and standard collections for activity deletion checks. - Enumerable for collection operations, IActorModel for actor data, IControlModel for control data, IProcessModel for process data, IRiskModel for risk data, String for identifier handling

SaveProductFactor

Summary: Save a new product factor from form data and return the matching product factor as JSON.

JsonResult ProcessController.SaveProductFactor()

Routing

  • HTTP: POST
  • URL: /Process/SaveProductFactor
Detailed Analysis

Key Flows - Summary: Save a new product factor from form data and return the matching product factor as JSON. - Return first matching product factor as JSON

Error Flows - Summary: Handle invalid or missing form data to prevent exceptions and incorrect behavior. - Lack of validation for invalid or missing form data, Potential exceptions from malformed or incomplete form data

Security Issues - Summary: Direct use of Request.Form data risks SQL injection and XSS attacks. - Lack of input validation, No input sanitization, SQL injection vulnerability, Cross-site scripting (XSS) vulnerability

Performance Issues - Summary: Using FirstOrDefault() on large product factors slows performance. - Use of FirstOrDefault() on large product factors collection

Maintainability Issues - Summary: The method's tight coupling hinders testing and dependency replacement. - Tight coupling with controlModel and Registry classes, Difficult to test or replace dependencies

UX Impact Notes - Summary: Returning JSON requires proper client-side handling to ensure good user experience. - Return JSON object

Test Case Ideas - Summary: Verify SaveProductFactor handles POST requests - and returns correct factors. - Return correct product factors for current project

Dependencies & Called Services - Summary: Uses data conversion and control model enumeration services. - Data conversion service, Enumerable collection processing, Control model interface

DeleteProduct

Summary: DeleteProduct processes a POST request with ProductID, deletes the product, and updates related activity volume and review status.

void ProcessController.DeleteProduct()

Routing

  • HTTP: POST
  • URL: /Process/DeleteProduct

Cross-layer call chain - ProcessController.DeleteProduct → 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"]
    ProcessController_DeleteProduct["ProcessController.DeleteProduct"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_DeleteProduct --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - and updates related activity volume and review status. - Delete product - Receive POST request with ProductID, Convert ProductID to integer - Update product activity volume - Update product reviewed status

Security Issues - Summary: Validate and sanitize ProductID to prevent SQL injection. - SQL injection risk from unsanitized ProductID, Lack of input validation on ProductID

Performance Issues - Summary: Avoid redundant Convert.ToInt32 calls to improve DeleteProduct performance. - Redundant Convert.ToInt32 calls on ProductID

Maintainability Issues - Summary: Magic strings reduce code readability and maintainability. - Use of magic strings like 'ProductID' and 'Product'

Test Case Ideas - and updates product status correctly. - Delete product with valid ProductID - Trigger DeleteProduct on HTTP POST request - Update product activity volume after deletion - Update product reviewed status after deletion

Dependencies & Called Services - Summary: DeleteProduct uses Convert, IControlModel, and IProcessModel services. - Convert service, IControlModel interface, IProcessModel interface

EditProductName

Summary: EditProductName updates product details and logs name changes if detected.

void ProcessController.EditProductName()

Routing

  • HTTP: POST
  • URL: /Process/EditProductName

Cross-layer call chain - ProcessController.EditProductName → 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"]
    ProcessController_EditProductName["ProcessController.EditProductName"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_EditProductName --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: EditProductName updates product details and logs name changes if detected. - Log name change via actorModel.InsertStandardizationHistory if OldName differs from current Name - Retrieve ProductID, ProductName, NewProductNoOfTimes, NewProductParent from POST data, Convert ProductID to integer and call controlModel.editproductname

Error Flows - Summary: Handle null references and invalid form data in EditProductName method. - Null reference risk from missing Request.Form or OldName, Lack of exception handling for invalid form data and conversion errors

Security Issues - Summary: Validate and sanitize user input to prevent SQL injection and data corruption. - Lack of input validation, Risk of SQL injection, Potential data corruption

Maintainability Issues - Summary: Replace magic strings with constants and fix incomplete, unclear code for better maintainability. - Use constants or enums instead of magic strings for form field names, Fix incomplete conditional statements and unclear code fragments

Test Case Ideas - Summary: Verify EditProductName calls and InsertStandardizationHistory parameter correctness. - Call EditProductName with correct integer ProductID, Ensure InsertStandardizationHistory is called with correct parameters - Handle cases where OldName equals or differs from Name

Dependencies & Called Services - Summary: EditProductName uses Convert and interfaces IActorModel and IControlModel. - Convert utility, IActorModel interface, IControlModel interface

AddNewActor

Summary: AddNewActor processes POST data to create a new actor and returns the new team details in JSON.

JsonResult ProcessController.AddNewActor()

Routing

  • HTTP: POST
  • URL: /Process/AddNewActor
Detailed Analysis

Key Flows - Summary: AddNewActor processes POST data to create a new actor and returns the new team details in JSON. - Return JSON with new team ID

Error Flows - Summary: The method lacks error handling, risking exceptions from invalid or missing form data. - No explicit error handling, Exceptions from invalid or missing form data, Potential failures during data conversion or downstream calls

Security Issues - Summary: Validate and sanitize form data to prevent SQL injection and data corruption. - Risk of SQL injection from unvalidated form data

Performance Issues - Summary: No performance issues identified in AddNewActor method.

Maintainability Issues - Summary: Replace magic numbers with named constants for supervision status to improve maintainability. - Use named constants instead of magic numbers for supervision status

UX Impact Notes - Summary: Returning JSON results affects user flow and requires proper client handling. - Returning JSON result - Potential negative user experience if client mishandles response

Test Case Ideas - Summary: Verify AddNewActor creates actor - sets producer - and returns correct JSON on POST. - Create new actor and assign producer for activity - Return JSON with new team ID

Dependencies & Called Services - Summary: AddNewActor converts models using IControlModel and IProcessModel. - Convert models, Use IControlModel, Use IProcessModel

UpdateActivityActor

Summary: UpdateActivityActor processes a POST request to update activity actor association and returns JSON.

JsonResult ProcessController.UpdateActivityActor()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivityActor
Detailed Analysis

Key Flows - Summary: UpdateActivityActor processes a POST request to update activity actor association and returns JSON. - Call control model's setproducer with extracted IDs - Return JSON result to client

Error Flows - Summary: The method lacks error handling, risking exceptions from invalid or missing form data. - No explicit error handling, Exceptions from invalid or missing form data, Potential failures during data conversion or downstream calls

Security Issues - Summary: Validate and sanitize user input to prevent SQL injection and data tampering. - Risk of SQL injection from unvalidated input

Maintainability Issues - Summary: Replace unexplained magic strings with named constants to improve maintainability. - Use named constants instead of magic strings 'ActorID' and 'ActivityID', Improve code clarity by explaining identifier usage

Test Case Ideas - Summary: Verify UpdateActivityActor handles POST requests - and returns correct JSON. - Invoke UpdateActivityActor on HTTP POST request - Return correct JSON response - Process valid ActorID and ActivityID inputs

Dependencies & Called Services - Summary: UpdateActivityActor uses IControlModel for data conversion. - IControlModel dependency, Data conversion via IControlModel

EditProcessData

Summary: Fetch project data, filter activities, aggregate DOE and product probabilities, and assign results to ViewBag.

ActionResult ProcessController.EditProcessData()

Routing

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

Key Flows - and assign results to ViewBag. - Fetch all activities for current project; redirect if none - Aggregate DOE and product probability data; assign to activities and ViewBag

Error Flows - Summary: Redirect based on activity presence and filtering conditions. - Redirect if no activities found for current project - Redirect to ProcessCreation page if activity filters apply

Performance Issues - Summary: Multiple inefficient database queries and LINQ operations degrade performance. - Excessive use of ToList() loading full datasets into memory

Maintainability Issues - Summary: Fix typos, replace magic strings with constants, standardize naming, and simplify complex expressions. - Typo in variable assignment using 'fact' instead of 'factors'

UX Impact Notes - Summary: Redirects to other actions disrupt user flow and degrade user experience. - Redirects interrupt user flow - Redirects degrade user experience

Test Case Ideas - and correct redirection in EditProcessData. - Fetch and assign product factors to ViewBag - Redirect when no activities found - Redirect to ProcessCreation page under filter conditions - Return correct activities list for project

Dependencies & Called Services - Summary: Uses data conversion and model interfaces for processing. - Data conversion utilities, Enumerable collections, IControlModel interface, IRiskModel interface, String operations

SaveProductParentFactors

Summary: The method updates product parent factors, processes activities and decisions, saves configurations, and logs errors.

JsonResult ProcessController.SaveProductParentFactors()

Routing

  • HTTP: POST
  • URL: /Process/SaveProductParentFactors

Cross-layer call chain - ProcessController.SaveProductParentFactors → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_SaveProductParentFactors["ProcessController.SaveProductParentFactors"]
    ProcessController_SaveProductParentFactors --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: The method updates product parent factors - and logs errors. - Create and update Activity objects with IDs and volumes - Create ActivityProduct objects - update collections - and call SetProduct - Fetch existing product factors by ProjectId - Initialize UpdateParentID flag from form - Iteratively update root factors and manage parent-child relationships - Save configuration and update project reviewed status - Log error message on save failure - Update product factors' ParentFactor

Error Flows - add null checks - and handle exceptions properly. - Missing null checks on objects risk NullReferenceExceptions - Commented-out or incomplete code causes logical errors

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

Performance Issues - Summary: Optimize JSON decoding, LINQ usage, and collection modifications to improve performance. - Excessive System.Web.Helpers.Json.Decode calls on large data, Inefficient LINQ FirstOrDefault and filtering inside loops, Performance degradation from repeated AddRange and item removals in loops

Maintainability Issues - Summary: Fix syntax errors, unclear names, and separate concerns to improve maintainability. - Syntax errors and undefined variables reduce reliability, Incomplete code fragments hinder understanding, Unclear, non-descriptive variable names reduce readability, Magic strings and numbers lack constants or enums, Commented-out code and unused variables add clutter, Mixed data decoding, processing, and updating in one method, Unclear method calls without context reduce understandability

UX Impact Notes - Summary: Handle JSON decoding and error logging failures to prevent poor user experience. - Error logging and management failures

Test Case Ideas - product factor updates - Match and update product factors by ID - and remove updated products - Call SetProduct and UpdateProductFactors with correct parameters - Save configuration details and update review status - Update activity volumes in control model - Validate JSON response

Dependencies & Called Services - Summary: Utilizes data conversion, collections, logging, and model interfaces for processing. - DateTime conversion, Enumerable and List collections, ICollection interface, IControlModel and IProcessModel interfaces, String manipulation - LoggingManager for logging

RecalculateVolumes

Summary: RecalculateVolumes calls UpdateVolumes using a valid ProjectId.

void ProcessController.RecalculateVolumes(int? ProjectId)

Routing

  • HTTP: POST
  • URL: /Process/RecalculateVolumes
Detailed Analysis

Key Flows - Summary: RecalculateVolumes calls UpdateVolumes using a valid ProjectId. - Call UpdateVolumes with ProjectId - Validate ProjectId

Maintainability Issues - Summary: Improve variable naming and fix typo to enhance code clarity and prevent errors. - Non-descriptive variable name 'CurProjId', Typo in variable name 'CurProjI' causing potential errors

Test Case Ideas - Summary: Verify RecalculateVolumes triggers on POST and calls UpdateVolumes with valid ProjectId. - Call UpdateVolumes with correct ProjectId

Dependencies & Called Services - Summary: RecalculateVolumes depends on the Process service. - Process service dependency

UpdateVolumes

Summary: Update activity volumes by ensuring actor counts meet minimum FTE requirements.

Delooper ProcessController.UpdateVolumes(int CurProjId)

Routing

  • URL: /Process/UpdateVolumes

Cross-layer call chain - ProcessController.UpdateVolumes → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.UpdateVolumes → Andromeda.Core.Services.Algorithms.Delooper.ChangeVolume - ProcessController.UpdateVolumes → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_ChangeVolume["Andromeda.Core.Services.Algorithms.Delooper.ChangeVolume"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_UpdateVolumes["ProcessController.UpdateVolumes"]
    ProcessController_UpdateVolumes --> Andromeda_Core_LoggingManager_Error
    ProcessController_UpdateVolumes --> Andromeda_Core_Services_Algorithms_Delooper_ChangeVolume
    ProcessController_UpdateVolumes --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - Summary: Update activity volumes by ensuring actor counts meet minimum FTE requirements. - Retrieve project actors and minimum FTE values, Adjust actor counts below minimum FTE - Update activity volumes via control model

Error Flows - Summary: Catch and log all exceptions during volume updates without user notification. - Catch and log exceptions during actor count setting - Broad catch block logs all method execution errors

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

Performance Issues - Summary: Loops repeatedly call FindByID and Any, causing performance degradation. - Repeated Any checks for actor IDs inside loop - Potential overhead from excessive loop iterations and SetActorCount calls

Maintainability Issues - Summary: Excessive method calls and unclear code reduce readability and maintainability. - Excessive method calls reduce readability, Incomplete code snippets hinder understanding, Use of magic indices without context reduces clarity

UX Impact Notes - Summary: Error handling in UpdateVolumes affects user flow if errors are not surfaced. - Lack of direct user experience impact, Error handling affects user flow if errors are hidden

Test Case Ideas - Summary: Validate UpdateVolumes with various teamMinFTE scenarios and correct actor count updates. - Correct actor count updates for different teamMinFTE values

Dependencies & Called Services - Summary: UpdateVolumes uses models - Enumerable for collection operations, IActorModel for actor data, IControlModel for control data, IProcessModel for process data, List for data storage - LoggingManager for logging - ProcessExtensions for process utilities

DownloadVisio

Summary: DownloadVisio generates VSDX files when 'Type' is not 'vdx' and filters selected PropertyConditions for Visio generation.

JsonResult ProcessController.DownloadVisio()

Routing

  • HTTP: POST
  • URL: /Process/DownloadVisio

Cross-layer call chain - ProcessController.DownloadVisio → Andromeda.Core.Utility.VdxGenerate.ExportVDX - ProcessController.DownloadVisio → Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX - Andromeda.Core.Utility.VdxGenerate.ExportVDX → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars - Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX["Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    Andromeda_Core_Utility_VdxGenerate_ExportVDX["Andromeda.Core.Utility.VdxGenerate.ExportVDX"]
    ProcessController_DownloadVisio["ProcessController.DownloadVisio"]
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX --> Andromeda_Core_Utility_Compress_CreateZip
    Andromeda_Core_Utility_VdxGenerate_ExportVDX --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_DownloadVisio --> Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX
    ProcessController_DownloadVisio --> Andromeda_Core_Utility_VdxGenerate_ExportVDX
Detailed Analysis

Key Flows - Summary: DownloadVisio generates VSDX files when 'Type' is not 'vdx' and filters selected PropertyConditions for Visio generation. - Instantiate VSDXGenerate and export VSDX file if 'Type' is not 'vdx', Filter DataProperties for PropertyConditions with IsSelecte flag true

Error Flows - Summary: Handle invalid integer conversion and incomplete input to prevent exceptions and incorrect processing. - Lack of validation for integer conversion causing exceptions or incorrect processing, Unclear behavior on incomplete or malformed input handling

Security Issues - Summary: Validate request parameters to prevent SQL injection and data tampering. - SQL injection risk from unvalidated integer conversion

Performance Issues - Summary: Multiple enumerations and filtering on large collections degrade performance. - Multiple enumerations from ToList() and Where() in loops, Filtering large PropertyConditions collections with Where()

Maintainability Issues - Summary: Improve code clarity and readability by fixing naming, avoiding magic numbers, and simplifying namespaces. - Avoid magic numbers in IsErrorXML assignment

Test Case Ideas - Summary: Verify DownloadVisio handles inputs - and returns proper enums. - Handle incomplete or malformed input gracefully - Process valid input correctly - Return correct ProcessMapMode enum values under different conditions

Dependencies & Called Services - Summary: Uses conversion and generation services for VSDX and VDX formats. - Convert service, VSDXGenerate service, VdxGenerate service

GetRootActivities

Summary: Filter activities with single source and target arrows, merge arrow properties, and return updated lists.

Tuple<List<Activity>, List<Arrow>> ProcessController.GetRootActivities(List<Activity> allInprocessActivities, List<Arrow> allArrows, IList<ProductFactor> productFactors)

Routing

  • URL: /Process/GetRootActivities
Detailed Analysis

Key Flows - and return updated lists. - Return tuple of final activities and arrows lists - Update arrow Number and Probability based on product factors and source volume

Error Flows - Summary: Handle null references and conversion errors during activity processing. - Null reference exceptions from null incoming or outgoing arrows, Conversion exceptions from Convert.ToDouble on calculated probabilities

Performance Issues - Summary: Repeated collection scans and conversions degrade performance in large datasets. - Multiple Count operations on allArrows during filtering, Inefficient FirstOrDefault usage on large collections, Repeated First() and Any() calls on allInprocessActivities within loops, Excessive ToList() calls causing memory and copying overhead

Maintainability Issues - Summary: Complex conditions, unclear variable names, magic strings, and commented-out code reduce maintainability. - Complex filtering conditions reduce readability, Unclear variable names like 'inComingArrow' and 'outGoingArrow', Use of magic strings like 'CONSTANT' and 'ProductName', Commented-out code complicates maintenance

Test Case Ideas - updates arrows - and returns expected results. - Create new Arrow objects with valid arrows - Return expected lists of activities and arrows - Handle empty activity list gracefully - Handle empty arrow collections correctly - Update arrow properties 'Number' and 'Probability' accurately

Dependencies & Called Services - Summary: Uses standard .NET collections and conversion utilities. - Convert utility, Enumerable operations, Int32 type, List collection, String type

GetClusterFlowActivities

Summary: Process activities and arrows to group activities by cluster and arrows by product and cluster pairs.

Tuple<List<Activity>, List<Arrow>> ProcessController.GetClusterFlowActivities(List<Activity> allInprocessActivities, List<Arrow> allArrows, IList<ProductFactor> productFactors)

Routing

  • URL: /Process/GetClusterFlowActivities

Cross-layer call chain - ProcessController.GetClusterFlowActivities → Andromeda.Core.Entities.Activity.Clone - ProcessController.GetClusterFlowActivities → Andromeda.Core.Entities.Arrow.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    ProcessController_GetClusterFlowActivities["ProcessController.GetClusterFlowActivities"]
    ProcessController_GetClusterFlowActivities --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_GetClusterFlowActivities --> Andromeda_Core_Entities_Arrow_Clone
Detailed Analysis

Key Flows - Summary: Process activities and arrows to group activities by cluster and arrows by product and cluster pairs. - Return tuple of clustered activities and grouped arrows - Process input activities and arrows to identify inter-cluster arrows

Performance Issues - Summary: Multiple LINQ operations degrade performance on large datasets. - Performance degradation on large datasets

Maintainability Issues - Summary: The method uses unclear variable names, anonymous types, and tuples, reducing maintainability. - Returning multiple values with Tuple decreases readability

Test Case Ideas - and returned tuple structure. - Return tuple with ClusterActivities and arrow

Dependencies & Called Services - Summary: Uses Activity, Arrow, and Enumerable for cluster flow activity processing. - Activity dependency, Arrow library, Enumerable utilities

GetDecisionVolumes

Summary: Filter and process activities and arrows to update properties, calculate volumes, and remove marked items.

Tuple<List<Activity>, List<Arrow>> ProcessController.GetDecisionVolumes(List<Activity> allInprocessActivities, List<Arrow> allArrows, IList<ProductFactor> productFactors, IList<ActivityProduct> DecisionOupputs)

Routing

  • URL: /Process/GetDecisionVolumes

Cross-layer call chain - ProcessController.GetDecisionVolumes → Andromeda.Core.Entities.Arrow.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    ProcessController_GetDecisionVolumes["ProcessController.GetDecisionVolumes"]
    ProcessController_GetDecisionVolumes --> Andromeda_Core_Entities_Arrow_Clone
Detailed Analysis

Key Flows - Summary: Filter and process activities and arrows to update properties - Calculate volume percentages and cumulative efforts for decision-type predecessors - Create new arrows by combining properties and efforts from incoming and outgoing arrows - Clone and update arrow properties using product factors and predecessor activities - Return updated activities and arrows lists

Error Flows - Summary: Handle null references and prevent division by zero in GetDecisionVolumes. - Null reference exceptions from forced null checks

Security Issues - Summary: No security issues found in the analyzed code. - No explicit security vulnerabilities detected

Performance Issues - Summary: Optimize string comparisons and collection operations to reduce memory and CPU overhead. - Inefficient use of ToUpper() for string comparison instead of case-insensitive methods, Memory overhead from creating new lists inside loops, Multiple iterations and allocations from repeated LINQ calls on large collections, Performance impact from repeated string ToLower() and Trim() calls without caching, Multiple collection iterations caused by Any() inside Where() clauses, Frequent removals from large collections causing performance degradation

Maintainability Issues - Summary: Replace magic strings and complex logic with clear constants and simplify code structure. - Use constants or enums instead of magic strings, Simplify complex conditional statements and calculations, Avoid anonymous types in GroupBy clauses for clarity, Remove commented out or incomplete code fragments

Test Case Ideas - Summary: Test filtering, creation, grouping, calculation, deletion, and performance of decision volume data. - Calculate volume percentages and cumulative efforts for predecessor activities of type 'Decision' and others - Create arrow objects with correct properties and effort calculations - Filter activities by type including 'ACTIVITY' and others, Filter arrows by successor and predecessor IDs, Group and filter arrows by predecessor, successor, and decision input with varied data, Remove activities and arrows marked for deletion, Evaluate performance with large collections focusing on LINQ and list operations

Dependencies & Called Services - Summary: Uses data conversion and collection libraries for processing decision volumes. - Arrow data processing, Data conversion utilities, Enumerable collections, Integer operations, List collections, String manipulations

DownloadFileFromPath

Summary: DownloadFileFromPath validates the file parameter, returns the file with correct MIME type and custom name, or handles errors with 404 or a 'File Not Found' response.

ActionResult ProcessController.DownloadFileFromPath(string file, string extension, string viewName)

Routing

  • HTTP: GET
  • URL: /Process/DownloadFileFromPath

Cross-layer call chain - ProcessController.DownloadFileFromPath → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    ProcessController_DownloadFileFromPath["ProcessController.DownloadFileFromPath"]
    ProcessController_DownloadFileFromPath --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
Detailed Analysis

Key Flows - Summary: DownloadFileFromPath validates the file parameter - returns the file with correct MIME type and custom name - or handles errors with 404 or a 'File Not Found' response. - Return file with MIME type and custom name if valid parameter and file exists - Return 404 if file parameter contains directory traversal characters - Return 'File Not Found' XML file if file does not exist

Error Flows - Summary: Handle invalid file paths - Missing file returns 'File Not Found' message

Security Issues - Summary: Incomplete code and improper encoding cause security and reliability risks. - Incomplete code fragments cause unexpected behavior and security risks, ASCII encoding limits character support in error messages, causing encoding issues

Performance Issues - Summary: ASCII encoding limits character support and may degrade performance with non-ASCII messages. - Use ASCII encoding for error messages, Limit character support affecting performance

Maintainability Issues - Summary: Hardcoded paths, magic strings, and incomplete code reduce maintainability and clarity. - Hardcoded temporary directory path, Incomplete and fragmented code with syntax errors, Use of unexplained magic strings, Empty statements and incomplete code fragments

UX Impact Notes - Summary: Users receive clear error responses and dynamic file names during file download. - Nonexistent files return 'File Not Found' message with 'text/xml' type

Test Case Ideas - Summary: Verify file return - Return valid ActionResult for valid file path and extension - Return correct file with appropriate MIME type and file name for existing files - Return 'File Not Found' message with correct content type and file name for missing files - Assign MIME type correctly for 'vsdm' and 'vsdx' extensions - Return correct content type and file name based on project name presence in registry - Validate Contains check for different file extensions

Dependencies & Called Services - Summary: Uses file handling, string processing, and collection utilities for downloading files. - File handling, String processing, Enumerable collections, Encoding utilities, LINQ extensions

DownloadBPMN

Summary: DownloadBPMN retrieves project data, generates BPMN XML, and converts it to ASCII bytes.

FileStreamResult ProcessController.DownloadBPMN()

Routing

  • HTTP: GET
  • URL: /Process/DownloadBPMN

Cross-layer call chain - ProcessController.DownloadBPMN → Andromeda.Core.Services.BPMN.BPMNGenerate.ExportBPMN - ProcessController.DownloadBPMN → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars - Andromeda.Core.Services.BPMN.BPMNGenerate.ExportBPMN → Andromeda.Validation.ProcessMapValidation.RemoveConnectorsAndDuplicate - Andromeda.Core.Services.BPMN.BPMNGenerate.ExportBPMN → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone - Andromeda.Core.Services.BPMN.BPMNGenerate.ExportBPMN → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN["Andromeda.Core.Services.BPMN.BPMNGenerate.ExportBPMN"]
    Andromeda_Validation_ProcessMapValidation_RemoveConnectorsAndDuplicate["Andromeda.Validation.ProcessMapValidation.RemoveConnectorsAndDuplicate"]
    ProcessController_DownloadBPMN["ProcessController.DownloadBPMN"]
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN --> Andromeda_Validation_ProcessMapValidation_RemoveConnectorsAndDuplicate
    ProcessController_DownloadBPMN --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_DownloadBPMN --> Andromeda_Core_Services_BPMN_BPMNGenerate_ExportBPMN
Detailed Analysis

Key Flows - Summary: DownloadBPMN retrieves project data, generates BPMN XML, and converts it to ASCII bytes. - Retrieve current project ID and control activities, Generate BPMN XML from project data and controls, Convert BPMN XML string to ASCII byte array

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

Performance Issues - Summary: Using ASCII encoding risks data loss when converting BPMN XML to bytes. - ASCII encoding for BPMN XML conversion, Potential data loss or corruption due to encoding

Maintainability Issues - Summary: Using unexplained magic string 'Insorce' as default filename reduces code clarity. - Unexplained magic string 'Insorce' as default filename

UX Impact Notes - Summary: File name generation based on project name can degrade user experience. - File name depends on project name, Non-descriptive or long project names harm UX, Invalid characters in project name affect file naming

Test Case Ideas - Summary: Verify DownloadBPMN handles GET requests and returns valid BPMN XML with correct MIME type. - Return correct BPMN MIME type - Handle HTTP GET request correctly

Dependencies & Called Services - Summary: Uses BPMN generation, encoding, control and process models, LINQ extensions, and string utilities. - BPMN generation, Data encoding, Control model interface, LINQ extensions, String utilities - Process model interface

GetProjectXML

Summary: GetProjectXML returns the XML file for a valid ProjectID by constructing the correct file path.

FilePathResult ProcessController.GetProjectXML(int? ProjectID, string time)

Routing

  • HTTP: GET
  • URL: /Process/GetProjectXML
Detailed Analysis

Key Flows - Summary: GetProjectXML returns the XML file for a valid ProjectID by constructing the correct file path. - Return XML file for download

Error Flows - Summary: No error flows are defined for GetProjectXML.

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

Performance Issues - Summary: File system access slows performance with large files or slow disks. - File system access impact, Performance degradation with large files, Performance degradation with slow disks

Maintainability Issues - Summary: Hardcoded file path construction reduces flexibility and maintainability. - Hardcoded file path construction, Reduced flexibility and maintainability

UX Impact Notes - Summary: Provide error handling and user feedback for XML file download failures. - Lack of error handling for missing or inaccessible XML file, No user feedback on download failure

Test Case Ideas - Summary: Verify GetProjectXML handles HTTP GET - Handle HTTP GET requests - Ignore time parameter impact on output, Ensure end-to-end file download functionality - Process valid ProjectID values

Dependencies & Called Services - Summary: No external services are called by GetProjectXML.

GetErrorProjectXML

Summary: GetErrorProjectXML returns the XML file for a valid SessionID.

FilePathResult ProcessController.GetErrorProjectXML(string SessionID, string time)

Routing

  • HTTP: GET
  • URL: /Process/GetErrorProjectXML
Detailed Analysis

Key Flows - Summary: GetErrorProjectXML returns the XML file for a valid SessionID. - Return XML as FilePathResult

Error Flows - Summary: Handle missing file errors by throwing exceptions or returning error responses. - FileNotFoundException on missing file, Error response to user on missing file

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

Performance Issues - Summary: No performance issues identified in GetErrorProjectXML method.

Maintainability Issues - Summary: Hardcoded folder path reduces flexibility and complicates environment-specific changes. - Hardcoded folder path from configuration, Reduced flexibility for environment changes

UX Impact Notes - Summary: Missing XML files cause unhandled exceptions - Unhandled exceptions from missing XML files

Test Case Ideas - Summary: Verify GetErrorProjectXML handles HTTP GET requests securely and returns files correctly. - Handle HTTP GET requests - Return file for valid SessionID and existing file

GetControlsAppliedActivities

Summary: Retrieve activities by ProjectID, convert each category to comma-separated strings, and return all concatenated with pipes.

string ProcessController.GetControlsAppliedActivities(int? ProjectID, string time)

Routing

  • HTTP: GET
  • URL: /Process/GetControlsAppliedActivities
Detailed Analysis

Key Flows - and return all concatenated with pipes. - Check each activity category for presence of activities - Concatenate category strings with pipe separators and return

Error Flows - Summary: The method risks null reference exceptions and runtime errors due to incomplete code and missing null checks. - Missing null check for ProjectID - Incomplete conditional and return statements causing runtime errors

Performance Issues - degrading performance on large datasets. - Performance degradation with large datasets

Maintainability Issues - Summary: Incomplete code and dense method chaining reduce clarity and maintainability. - Unfinished conditional and return statements

UX Impact Notes - Summary: Aggregates activity data for user display, UX depends on downstream usage. - Aggregated control activity information, User display depends on downstream processing

Test Case Ideas - Summary: Test performance impact of multiple enumerations on large datasets. - Performance testing with large datasets

Dependencies & Called Services - Summary: Uses enumerable collection of control models and integer identifiers. - Enumerable collection, IControlModel interface, Int32 identifiers

DownloadActivityDetails

Summary: Retrieve and filter project activity details, aggregate specific properties, then encode and return as downloadable CSV.

FileContentResult ProcessController.DownloadActivityDetails()

Routing

  • URL: /Process/DownloadActivityDetails
Detailed Analysis

Key Flows - then encode and return as downloadable CSV. - Return CSV as FileContentResult for download

Security Issues - Summary: Sanitize inputs to prevent SQL and CSV injection and protect sensitive project ID data. - SQL injection risk from unsanitized concatenated strings, CSV injection risk from unsanitized concatenated strings, Exposure of sensitive data via unsanitized Registry.CurrentProjectId

Performance Issues - Summary: Optimize repeated enumerations, string comparisons, and encoding for better performance. - Repeated filtering calls causing multiple enumerations, String.Equals without StringComparison parameter, Inefficient Aggregate usage on large collections, Multiple Replace calls on large strings, Inefficient UTF8Encoding.GetBytes for large files

Maintainability Issues - Summary: Refactor string operations, replace magic strings with constants, clarify conditionals, and document lambdas. - Excessive string concatenation and chaining reduce readability, Magic strings like 'DOE', 'FORM', 'BusinessRule' lack named constants, Unclear or incomplete conditional statements hinder understanding, Lambda expressions for string concatenation lack naming and documentation

UX Impact Notes - Summary: Ensure CSV formatting and encoding optimize user experience during file download. - Specific CSV headers and formatting requirements, Proper CSV content sanitization to prevent spreadsheet issues, Efficient file encoding and size management for smooth downloads

Test Case Ideas - Summary: Verify filtering, property aggregation, string handling, CSV encoding, and performance in DownloadActivityDetails. - Maintain performance with large datasets - Handle string concatenation and escape special characters

Dependencies & Called Services - Summary: Uses standard collections, data types, and control and risk models for activity details. - Standard data types (Int32, String, TimeSpan), Collections (List, Enumerable), Control model interface (IControlModel), Risk model interface (IRiskModel), Encoding utilities

UploadActivityDetails

Summary: UploadActivityDetails detects duplicate activity IDs and returns them in a JSON response.

JsonResult ProcessController.UploadActivityDetails(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadActivityDetails

Cross-layer call chain - ProcessController.UploadActivityDetails → Andromeda.Core.Services.CsvHelper.ReadHeader - ProcessController.UploadActivityDetails → Andromeda.Core.Services.CsvHelper.readRecords - ProcessController.UploadActivityDetails → Andromeda.Core.Services.CsvHelper.ReadallErrors

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_CsvHelper_ReadHeader["Andromeda.Core.Services.CsvHelper.ReadHeader"]
    Andromeda_Core_Services_CsvHelper_ReadallErrors["Andromeda.Core.Services.CsvHelper.ReadallErrors"]
    Andromeda_Core_Services_CsvHelper_readRecords["Andromeda.Core.Services.CsvHelper.readRecords"]
    ProcessController_UploadActivityDetails["ProcessController.UploadActivityDetails"]
    ProcessController_UploadActivityDetails --> Andromeda_Core_Services_CsvHelper_ReadHeader
    ProcessController_UploadActivityDetails --> Andromeda_Core_Services_CsvHelper_ReadallErrors
    ProcessController_UploadActivityDetails --> Andromeda_Core_Services_CsvHelper_readRecords
Detailed Analysis

Key Flows - Summary: UploadActivityDetails detects duplicate activity IDs and returns them in a JSON response. - Return JSON response with duplicate IDs

Error Flows - Summary: UploadActivityDetails returns JSON errors for invalid files - CSV reading errors returned with sorted error details

Security Issues - Summary: Validate uploaded files by content and MIME type to prevent file upload attacks. - File upload validation relies solely on '.csv' extension, Lack of content and MIME type verification enables file upload attacks, Malformed code fragments risk syntax errors and unexpected behavior in production

Performance Issues - Summary: Loading and processing large CSV files and datasets degrade performance. - Loading entire CSV file into memory - Retrieving all project activities and properties, Sorting and processing large error detail collections

Maintainability Issues - Summary: Replace magic strings and fix typos to improve code clarity and maintainability. - Replace magic strings with named constants, Fix typos and malformed code to prevent errors, Simplify complex ternary and nested conditions, Avoid rigid serializer to enhance flexibility

UX Impact Notes - Summary: Restricting file types and detailed JSON errors guide users but risk exposing sensitive info. - Restrict file uploads to .csv only, Provide JSON error responses for invalid file, size, duplicates, activity ID, and products, Fix malformed response content types to prevent UX issues, Balance detailed error messages with sensitive information exposure risk

Test Case Ideas - Summary: Test UploadActivityDetails for CSV handling, error detection, session storage, and JSON responses. - Handle CSV reading errors with detailed error responses - Process valid CSV activity records - Store updated activity records in session - Return valid JsonResult objects in all cases

Dependencies & Called Services - Summary: Uses data conversion, serialization, file handling, and model interfaces for processing activity details. - Data conversion with CsvHelper, Enumerable collections processing, Model interfaces: IControlModel, IProcessModel, IRiskModel, Integer operations, JSON serialization with JavaScriptSerializer, File path handling, String manipulation - Process management

UpdateActivityRecords

Summary: UpdateActivityRecords matches and updates valid activity records based on detailed property comparisons and logs changes.

IList<ActivityActorArrow> ProcessController.UpdateActivityRecords(IList<ActivityActorArrow> AllActivities, IList<ActivityActorArrow> ValidActivityRecords, IList<ActivityProperty> Properties)

Routing

  • URL: /Process/UpdateActivityRecords
Detailed Analysis

Key Flows - Summary: UpdateActivityRecords matches and updates valid activity records based on detailed property comparisons and logs changes. - Initialize list for updated activity records - Add updated record to result list - Log each updated record using dd method - Update activity name on mismatch or required update

Error Flows - Summary: Prevent null reference errors by enforcing thorough null and whitespace checks. - Null and whitespace checks before string operations - Incomplete null checks risk runtime errors

Security Issues - Summary: Prevent SQL injection by sanitizing Splitter and input strings. - SQL injection risk from unsanitized input strings used in splitting

Performance Issues - Summary: Optimize string array creation and avoid repeated FirstOrDefault calls in loops. - Repeated string array creation on each method call, Multiple expensive FirstOrDefault queries inside loops

Maintainability Issues - Summary: Use clear constants, meaningful variable names, and add documentation for maintainability. - 'Return '

UX Impact Notes - Summary: Incorrect activity record updates can cause data inaccuracies affecting user display. - Incorrect updates cause data inaccuracies

Test Case Ideas - filtering logic - Ensure FirstOrDefault returns correct matches and handles no matches - Validate method behavior with diverse input parameters - Validate complex conditional comparisons involving averages

Dependencies & Called Services - Summary: Uses collections and interfaces to process and manage activity records with time and string data. - IProcessModel interface for processing logic

GetUpdatedActivityRecords

Summary: GetUpdatedActivityRecords filters and updates activity records based on fileType, comparing properties and applying business rules before returning updated records.

IList<ActivityActorArrow> ProcessController.GetUpdatedActivityRecords(string fileType, IList<ActivityActorArrow> AllActivities, IList<ActivityActorArrow> ValidActivityRecords, IList<ActivityProperty> Properties)

Routing

  • URL: /Process/GetUpdatedActivityRecords
Detailed Analysis

Key Flows - Summary: GetUpdatedActivityRecords filters and updates activity records based on fileType - comparing properties and applying business rules before returning updated records. - Calculate and compare average handling times to update activity names - Initialize empty list for updated activity records - Compare Cluster and NoOfSqFeets properties to determine activity name updates - Add updated records to ActivitiesUpdate collection for return

Error Flows - Summary: Handle null references and avoid incomplete code to prevent errors. - Early return when matching database record is null - Null checks for objects like act

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

Performance Issues - Summary: Optimize loops to avoid repeated searches, costly string operations, and excessive memory use. - Repeated FirstOrDefault calls inside loops causing inefficient searches, Repeated string Trim and Replace operations inside loops degrading performance, Nested LINQ Any calls causing slow performance on large collections, Excessive use of ToArray and ToList increasing memory usage, Inefficient use of continue statements inside loops

Maintainability Issues - complex logic - Use of magic strings without constants, Non-descriptive variable names reducing readability, Incomplete code fragments hindering understanding, Complex nested conditional and LINQ statements, Lack of comments and unclear time span variable names, Unclear purpose of some method calls

UX Impact Notes - Summary: Incomplete or incorrect activity data and form updates degrade user experience. - Incomplete or missing activity data from early returns on null database records - Incorrect or missing form updates due to property mismatches

Test Case Ideas - Summary: Verify GetUpdatedActivityRecords handles diverse inputs and updates activities correctly. - Add updated activities correctly to ActivitiesUpdate collection - Return expected updated activity records across input scenarios - Handle various fileType values including case variations and invalid entries - Process business rules with empty, whitespace, and newline-containing strings - Update ActivityName based on changes in Cluster - Validate time span calculations with different AvgHandlingTime and Avg values

Dependencies & Called Services - Summary: Uses collections and process-related types for managing and processing activity records. - Enum for defining constants, Enumerable for collection iteration, ICollection for collection abstraction, List for storing activity records, IProcessModel for process abstraction, String for text data, TimeSpan for time intervals - Process for managing system processes

UpdateAHT

Summary: UpdateAHT retrieves activity records, updates bulk AHT values, saves config changes, and returns a success JSON response.

JsonResult ProcessController.UpdateAHT()

Routing

  • HTTP: POST
  • URL: /Process/UpdateAHT
Detailed Analysis

Key Flows - Summary: UpdateAHT retrieves activity records - updates bulk AHT values - and returns a success JSON response. - Retrieve updated activity records from session - Return JSON success response with content type per Accept header - Update bulk AHT values via ProcessMapModel

Security Issues - Summary: The method uses session data without validation or sanitization, risking security breaches. - Use of session data without validation, Lack of session data sanitization

Performance Issues - Summary: LINQ Select and ToList usage causes inefficiency with large activity lists. - Inefficient LINQ Select and ToList on large datasets

Maintainability Issues - Summary: Replace magic string with constant or enum for maintainability. - Use constant or enum for 'application/json' string

UX Impact Notes - Summary: Returns JSON with 'type' as 'success' - JSON response with 'type' property, Potential impact on client-side user flow

Test Case Ideas - Summary: Verify UpdateAHT invocation - correct AHT update - Invoke UpdateAHT on HTTP POST request - Return JSON with correct 'type' property - Set response content type for 'application/json' Accept header - Update AHT for activity list correctly

Dependencies & Called Services - and time intervals for service updates. - Enumerable collections, TimeSpan for durations - Process model interface

UpdateActivityDetails

Summary: Retrieve valid session activities, update activity details, and save configuration for the current project.

JsonResult ProcessController.UpdateActivityDetails()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivityDetails

Cross-layer call chain - ProcessController.UpdateActivityDetails → Andromeda.Core.DataManager.GetDataList - ProcessController.UpdateActivityDetails → Andromeda.Core.DataManager.Execute - ProcessController.UpdateActivityDetails → Andromeda.Core.LoggingManager.Error - 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_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_UpdateActivityDetails["ProcessController.UpdateActivityDetails"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_UpdateActivityDetails --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateActivityDetails --> Andromeda_Core_DataManager_GetDataList
    ProcessController_UpdateActivityDetails --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - update activity details - Retrieve valid activities from session, Save configuration details with current project ID - Update activity details via ProcessMapModel

Error Flows - Summary: Return JSON error response on update failure with correct content type. - Return JSON with 'SaveFail' type and failure message on update failure

Security Issues - Summary: Storing and retrieving sensitive data from session risks data exposure. - Insecure storage of sensitive data in session, Risk of sensitive data exposure during retrieval

Performance Issues - Summary: Retrieving and processing large session data degrades performance. - Large session data retrieval, Inefficient session data processing

Maintainability Issues - Summary: Reduce tight coupling and replace magic strings with constants for clarity. - Incomplete content type setting code reduces clarity

UX Impact Notes - Summary: Users receive clear feedback when activity update fails. - Failure feedback with 'SaveFail' message

Test Case Ideas - Summary: Verify method calls, parameter correctness, response content type, and InsertStatus handling. - Call UpdateActivityDetails with correct parameters - Set correct content type in all responses - Handle InsertStatus as whitespace and verify success response

Dependencies & Called Services - Summary: Uses IProcessModel interface and String type for activity detail updates. - IProcessModel interface dependency, String type usage

DownloadProjectRecovery

Summary: DownloadProjectRecovery has no defined key flows.

FilePathResult ProcessController.DownloadProjectRecovery()

Routing

  • URL: /Process/DownloadProjectRecovery
Detailed Analysis

Key Flows - Summary: DownloadProjectRecovery has no defined key flows.

UX Impact Notes - Summary: Provides downloadable file affecting project recovery user flows. - Downloadable file output, Impact on project recovery user flows

Test Case Ideas - Summary: Verify DownloadProjectRecovery returns correct FilePathResult by calling DownloadProjectXmls with various parameters. - Handle different parameters in DownloadProjectXmls - Return valid FilePathResult

Dependencies & Called Services - Summary: DownloadProjectRecovery depends on the Process service. - Process service dependency

DownloadProjectXmls

Summary: DownloadProjectXmls exports project data to XML, optionally compresses it, cleans up, and returns the file for download.

FilePathResult ProcessController.DownloadProjectXmls(bool? WithChild, int? projId, bool? IsRecovery)

Routing

  • HTTP: GET
  • URL: /Process/DownloadProjectXmls

Cross-layer call chain - ProcessController.DownloadProjectXmls → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars - ProcessController.DownloadProjectXmls → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    ProcessController_DownloadProjectXmls["ProcessController.DownloadProjectXmls"]
    ProcessController_DownloadProjectXmls --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_DownloadProjectXmls --> Andromeda_Core_Utility_Compress_CreateZip
Detailed Analysis

Key Flows - and returns the file for download. - Return generated file as downloadable response with custom filename and MIME type

Error Flows - Summary: Handle errors in project folder access - Missing return file errors

Security Issues - Summary: Prevent directory traversal and unauthorized file system access during file operations. - Directory traversal vulnerabilities from unsanitized paths or filenames, Unauthorized file system access during directory creation and deletion

Performance Issues - Summary: Inefficient data retrieval and repeated operations degrade DownloadProjectXmls performance. - In-memory filtering of all projects inefficient for large datasets - SingleOrDefault usage on large datasets slows execution

Maintainability Issues - Summary: Fix syntax errors, replace magic numbers and hardcoded strings, and improve naming consistency. - Clear and complete method calls and variable assignments

UX Impact Notes - Summary: Prompting file save with inappropriate MIME type disrupts user workflow. - Role checking affects downloadable data

Test Case Ideas - Summary: Verify project filtering, hierarchy traversal, XML export, compression, file handling, directory management, performance, and cleanup. - File return with correct MIME type - Performance testing with large project datasets and LINQ efficiency

Dependencies & Called Services - Summary: DownloadProjectXmls uses compression, directory handling, collections, LINQ, and project/process models. - Compression utilities, Directory operations, Enumerable collections, Project model interface, LINQ extensions, List collections, String operations - Process model interface

SaveGraphic

Summary: No key flows are defined for the SaveGraphic method.

JsonResult ProcessController.SaveGraphic()

Routing

  • HTTP: POST
  • URL: /Process/SaveGraphic
Detailed Analysis

Key Flows - Summary: No key flows are defined for the SaveGraphic method.

Security Issues - Summary: The method uses unvalidated request parameters - Use of Request parameters without validation, Lack of input sanitization for GraphicName, DataProperties, ViewType, Potential injection or data manipulation attacks

Maintainability Issues - Summary: Replace magic strings with constants to improve code maintainability. - Use constants for request keys, Avoid magic strings like 'GraphicName', 'DataProperties', 'ViewType'

Test Case Ideas - Summary: Verify SaveGraphic handles POST requests - returns JsonResult - Return JsonResult from action

Dependencies & Called Services - Summary: SaveGraphic method depends on IProcessModel service. - Dependency on IProcessModel service

UpdateGraphic

Summary: Process HTTP POST data to update a customized view after validating role and namespace, but update is skipped due to early return.

JsonResult ProcessController.UpdateGraphic()

Routing

  • HTTP: POST
  • URL: /Process/UpdateGraphic
Detailed Analysis

Key Flows - Summary: Process HTTP POST data to update a customized view after validating role and namespace - but update is skipped due to early return. - Return JSON responses based on role and namespace validation - Skip update of customized view due to early return - Fetch customized views and find one matching GraphicId

Error Flows - Summary: Handle invalid GraphicId - and avoid premature return skipping updates. - Premature return skips update causing inconsistent state

Security Issues - Summary: UpdateGraphic risks injection and role check bypass due to improper input handling. - Use of unvalidated Request parameters risks SQL injection and data tampering - Case-insensitive role checks with ToLower().Contains() risk culture-specific issues and spoofing - Role name comparisons have case sensitivity flaws enabling role check bypass

Performance Issues - Summary: Complex role-check conditionals reduce readability and degrade performance. - Multiple role checks

Maintainability Issues - Summary: Refactor UpdateGraphic to remove magic strings - redundant role checks - Eliminate premature return before update operation - Simplify complex role-checking conditionals - Consolidate repeated role checks for 'operator'

UX Impact Notes - Summary: Returning JSON responses directly impacts user clarity on update status. - Returning false JSON before update completion confuses users due to missing status feedback

Test Case Ideas - DataProperties handling and response correctness in UpdateGraphic. - Check role verification with varied casing and multiple roles - Confirm UpdateCustomizeView is not invoked due to early return - Verify method returns expected values based on 'th' variable presence - Validate DataProperties input processing

Dependencies & Called Services - Summary: UpdateGraphic uses services and utilities for data conversion and membership processing. - Data conversion utilities, Enumerable collections, Membership service interface, String operations - Process model interface

DeleteGraphic

Summary: DeleteGraphic retrieves the graphic ID from the request and locates the corresponding CustomizeView.

JsonResult ProcessController.DeleteGraphic()

Routing

  • HTTP: POST
  • URL: /Process/DeleteGraphic
Detailed Analysis

Key Flows - Summary: DeleteGraphic retrieves the graphic ID from the request and locates the corresponding CustomizeView. - Retrieve graphic ID from HTTP request, Convert graphic ID to integer, Find matching CustomizeView by graphic ID

Error Flows - Summary: DeleteGraphic validates input - Invalid or missing graphic ID causes unhandled exception during integer conversion - User role check restricts deletion to operators and admins - Premature returns prevent deletion and cause inconsistent behavior

Security Issues - Summary: DeleteGraphic method risks SQL injection and flawed role-based access control. - Unvalidated Request['GraphicId'] risks SQL injection and data tampering - Role checks use string.Contains with magic strings causing incorrect authorization

Performance Issues - Summary: Using string.Contains for role checks degrades performance with large role sets. - Inefficient string.Contains usage in role checks

Maintainability Issues - and returns prematurely. - Premature return prevents deletion execution and complicates debugging

UX Impact Notes - Summary: The method lacks clear user feedback on deletion success, failure, or permission issues. - Returns JSON false on failure indicating unsuccessful deletion

Test Case Ideas - Summary: Verify DeleteGraphic returns valid JsonResult - handles roles and input robustly. - Return valid JsonResult for valid graphic ID - Find and return matching CustomizeView by graphic ID - Case-insensitive role checks

Dependencies & Called Services - Summary: DeleteGraphic uses membership and process model services with string and enumerable utilities. - IMembershipService dependency, IProcessModel dependency, String utilities, Enumerable utilities

SaveCustomExpression

Summary: SaveCustomExpression reads POST request data to create a CustomExpression instance.

JsonResult ProcessController.SaveCustomExpression()

Routing

  • HTTP: POST
  • URL: /Process/SaveCustomExpression
Detailed Analysis

Key Flows - Summary: SaveCustomExpression reads POST request data to create a CustomExpression instance. - Read POST request data, Populate CustomExpression instance

Security Issues - Summary: Direct use of Request data in database operations causes SQL injection risk. - SQL injection vulnerability, Lack of input validation or sanitization

Maintainability Issues - Summary: Tight coupling reduces flexibility and complicates testing and modifications. - Tight coupling with ProcessMapModel and Registry classes, Reduced flexibility, Complicated testing and future modifications

Test Case Ideas - Summary: Verify SaveCustomExpression handles POST requests and inserts valid expressions into the database. - Invoke SaveCustomExpression on HTTP POST, Insert valid CustomExpression into database

Dependencies & Called Services - Summary: SaveCustomExpression depends on IProcessModel service. - Dependency on IProcessModel service

GetProcessActivities

Summary: GetProcessActivities retrieves the current project ID, filters activities by volume formula, and returns simplified JSON data.

JsonResult ProcessController.GetProcessActivities()

Routing

  • HTTP: GET
  • URL: /Process/GetProcessActivities
Detailed Analysis

Key Flows - and returns simplified JSON data. - Fetch all activities for the project - Return activities as JSON

Performance Issues - Summary: GetProcessActivities risks high memory and CPU use if GetAllActivities returns many items. - High memory usage from large activity lists, Increased CPU overhead processing many activities

Maintainability Issues - Summary: Anonymous types in Select reduce code clarity and maintainability. - Use of anonymous types in Select method, Lack of explicit type definitions

Test Case Ideas - Summary: Verify GetProcessActivities handles requests - and returns correct activities. - Handle HTTP GET requests correctly - Return correct activities for given project ID - Return empty result when no activities exist for project

Dependencies & Called Services - Summary: Uses Enumerable for collection operations and IRiskModel for risk assessment. - Enumerable for collection handling, IRiskModel for risk evaluation

GetProcessProductFactors

Summary: Retrieve current project ID, fetch product factors via control model, and return JSON result.

JsonResult ProcessController.GetProcessProductFactors()

Routing

  • HTTP: GET
  • URL: /Process/GetProcessProductFactors
Detailed Analysis

Key Flows - and return JSON result. - Fetch product factors using control model - Return product factors as JSON result

Error Flows - Summary: The method lacks explicit error handling for invalid or missing project IDs. - No error handling for missing project IDs, Potential unexpected behavior or empty results due to missing validation

UX Impact Notes - Summary: The method's JSON output affects user flows involving product factor display and validation. - JSON output affects product factor validation

Test Case Ideas - Summary: Verify HTTP GET response and correct product factors for valid project ID. - Return correct product factors for valid project ID

Dependencies & Called Services - Summary: Uses IControlModel service for process product factor retrieval. - IControlModel service dependency

GetDecisionOutputs

Summary: Retrieve and filter project data to identify decision activities and construct decision paths, then return detailed JSON results.

JsonResult ProcessController.GetDecisionOutputs()

Routing

  • HTTP: GET
  • URL: /Process/GetDecisionOutputs

Cross-layer call chain - ProcessController.GetDecisionOutputs → Andromeda.Core.Entities.Activity.Clone - ProcessController.GetDecisionOutputs → Andromeda.Core.Services.ProcessExtensions.FindByID

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_GetDecisionOutputs["ProcessController.GetDecisionOutputs"]
    ProcessController_GetDecisionOutputs --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_GetDecisionOutputs --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - then return detailed JSON results. - Retrieve project data: activities, arrows, products, product factors, Filter and order base activities to identify decision activities, Identify undesired outcome activities and build decision paths using predecessor paths, Prepare JSON with decision activities, Rework and Undesired flags, and product probabilities

Error Flows - Summary: GetDecisionOutputs lacks complete code and exception handling, risking runtime errors. - Incomplete code segments causing runtime errors, Potential null reference exceptions accessing decision activities, No explicit exception handling during data retrieval or processing

Performance Issues - Summary: Inefficient data access and collection operations degrade performance on large datasets. - FindByID method inside loops causing repeated data access, Chained LINQ calls causing multiple data iterations, Contains method in loops causing O(n) complexity, Excessive ToList() calls causing high memory usage

Maintainability Issues - Summary: Refactor complex code, fix syntax errors, replace magic strings, and define all variables and methods. - Excessive method calls and object creations increase complexity, Complex lambda expressions and chained LINQ reduce readability, Incomplete and truncated code causes compilation errors, Magic strings instead of constants or enums reduce clarity, Anonymous types in JSON projection hinder understanding, Undefined variables and methods reduce code clarity

Test Case Ideas - Summary: Verify correct decision activity handling, collection operations, and accurate JSON response properties. - Calculate 'Rework' and 'Undesired' JSON properties based on activity ID presence - FirstOrDefault returns expected results and handles empty collections - Add method validates and adds decisionAct.ID correctly - Add item 'd' to 'sionactivity' and verify return value - Handle empty 'llundesired' and elements without corresponding paths

Dependencies & Called Services - Summary: Uses models and utilities for decision output processing. - Activity service, Conversion utilities, Enumerable collections, Actor model interface, Control model interface, Final plan model interface, Risk model interface, List collections, String utilities - Process extension methods

GetDeadlineActivities

Summary: Fetch deadline activities for the current project, filtering by activity ID or deadline type, and return results as JSON.

JsonResult ProcessController.GetDeadlineActivities(int? ActID)

Routing

  • HTTP: GET
  • URL: /Process/GetDeadlineActivities
Detailed Analysis

Key Flows - and return results as JSON. - Fetch all activities for current project - Return combined results as JSON

Security Issues - Summary: Prevent SQL injection by sanitizing currentProjectId and ActID parameters. - SQL injection risk from unsanitized currentProjectId, SQL injection risk from unsanitized ActID

Performance Issues - Summary: Optimize database queries and LINQ usage to improve performance with large datasets. - Multiple database queries degrade performance with large or complex data, Inefficient LINQ methods like Any and FirstOrDefault in filters

Maintainability Issues - Summary: Complex LINQ queries and anonymous objects reduce code readability and maintainability. - Use of anonymous objects for data projection, Complex LINQ queries

UX Impact Notes - Summary: Returns JSON data for displaying deadline and primary activities in web apps. - JSON output format, Supports web application display, Shows deadline and primary activities

Test Case Ideas - Summary: Verify correct HTTP GET response and accurate deadline activity retrieval under various conditions. - Performance and correctness with large datasets

Dependencies & Called Services - Summary: Uses models and data types to retrieve deadline activities. - Enumerable for collections, IActorModel for actor data, IRiskModel for risk data, String for identifiers

GetProcessWaitTypes

Summary: Retrieve project data, filter valid wait arrows, fetch related system properties, and return JSON result.

JsonResult ProcessController.GetProcessWaitTypes()

Routing

  • HTTP: GET
  • URL: /Process/GetProcessWaitTypes

Cross-layer call chain - ProcessController.GetProcessWaitTypes → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.GetProcessWaitTypes → 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"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_GetProcessWaitTypes["ProcessController.GetProcessWaitTypes"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    ProcessController_GetProcessWaitTypes --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_GetProcessWaitTypes --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - and return JSON result. - Fetch transfer modes and filter system properties by activity IDs from wait arrows - Return processed data as JSON

Performance Issues - Summary: Excessive database calls and repeated LINQ queries degrade performance on large datasets. - Multiple database calls causing performance degradation, Repeated LINQ methods causing multiple collection iterations, Multiple LINQ queries with ToList() and Distinct() causing expensive operations

Maintainability Issues - Summary: Refactor to remove magic strings, reduce complexity, and avoid anonymous types for clarity. - Use of magic strings reduces maintainability and risks errors on value changes, High complexity from nested conditionals and multiple method calls impairs readability, Anonymous types for complex data structures decrease code clarity and maintainability

UX Impact Notes - Summary: Returns JSON data to update UI with process wait type information. - UI update with process wait types

Test Case Ideas - Summary: Verify correct extraction and filtering of wait arrows, activity IDs, and transfer modes. - Return empty list when no wait arrows have non-empty TOD values - Return expected transfer modes from GetTransferModes()

Dependencies & Called Services - Summary: Uses actor and process models with collections and time utilities. - Actor model interfaces, Control model interfaces, Enumerable collections, List collections, String utilities, TimeSpan utilities - Process model interfaces, ProcessExtensions utilities

GetActivityConstraintAndBatchData

Summary: Retrieve and filter project arrow details by successor and release type, map related activities and actors, then return as JSON.

JsonResult ProcessController.GetActivityConstraintAndBatchData(int? activityId)

Routing

  • HTTP: GET
  • URL: /Process/GetActivityConstraintAndBatchData
Detailed Analysis

Key Flows - then return as JSON. - Return aggregated data as JSON

Error Flows - Summary: Prevent null reference exceptions by checking predecessor and successor activities. - Lack of null checks before accessing activity properties

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

Performance Issues - Summary: Optimize database queries and collection operations to improve method performance. - Multiple database queries in one method, Inefficient use of FirstOrDefault and Any on large collections, Excessive ToList() calls causing multiple data enumerations

Maintainability Issues - Summary: The method's tight coupling and unclear code reduce maintainability and testability. - Tight coupling with multiple models and repositories, Use of magic strings for volume formula comparisons, Use of anonymous types reducing code clarity

Test Case Ideas - Summary: Verify method returns correct data for valid IDs and handles empty or multiple collections. - Handle no matching arrows or activities - Handle empty allArrows and baseActivities collections - Handle multiple items in allArrows and baseActivities - Return correct data for valid activity ID

Dependencies & Called Services - Summary: Uses data models and collections for activity constraints and batch processing. - Enumerable for collections, IActorModel for actor data, IRiskModel for risk data, String for identifiers

GetProcessBatchActs

Summary: Retrieve project data, filter batch-related arrows and activities, map transfer modes, and return JSON results.

JsonResult ProcessController.GetProcessBatchActs()

Routing

  • HTTP: GET
  • URL: /Process/GetProcessBatchActs

Cross-layer call chain - ProcessController.GetProcessBatchActs → 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"]
    ProcessController_GetProcessBatchActs["ProcessController.GetProcessBatchActs"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    ProcessController_GetProcessBatchActs --> Andromeda_Core_Entities_Actor_GetLocation
Detailed Analysis

Key Flows - and return JSON results. - Fetch arrows, activities, actors with locations, and activity properties for project - Return JSON with batch arrows

Performance Issues - Summary: Excessive database calls and inefficient collection operations degrade performance. - Multiple database calls for arrows, activities, actors, and properties, Frequent use of FirstOrDefault and Any in batch arrow mapping, Repeated ToList and Distinct on large collections

Maintainability Issues - and has complex nested logic. - Method violates single responsibility principle by mixing data retrieval, filtering, mapping, and response construction, Non-descriptive variable names reduce code readability, Anonymous types in mapping complicate understanding and maintenance, High complexity from nested conditional expressions and multiple method calls

Test Case Ideas - Summary: Verify correct filtering, mapping, data extraction, transfer modes, empty input handling, and performance. - Assess performance with large datasets and multiple database calls - Handle empty arrow list without errors

Dependencies & Called Services - Summary: Uses multiple models and collections to process batch actions. - Actor model, Enumerable collections, IActorModel interface, IControlModel interface, IProcessModel interface, IRiskModel interface, List collection, String type

GetProcessAllAnyActs

Summary: Retrieve project data, process activities to identify predecessors, and return results as JSON.

JsonResult ProcessController.GetProcessAllAnyActs()

Routing

  • HTTP: GET
  • URL: /Process/GetProcessAllAnyActs
Detailed Analysis

Key Flows - and return results as JSON. - Fetch arrow details and all project activities via model calls - Convert processed data to list and return as JSON

Error Flows - Summary: The method lacks explicit error handling for invalid or missing project IDs. - Missing explicit error handling for invalid project ID, No exception management for absent project ID

Performance Issues - Summary: Fetching all activities without filtering causes slow performance due to large data processing. - Fetching all activities and arrow details without filtering or pagination - Use of LINQ 'Any' and 'Where' on large datasets causing slow performance

Maintainability Issues - Summary: Improve method naming and avoid anonymous types for better code clarity and maintainability. - Non-descriptive method name, Use of anonymous types in LINQ reduces clarity

UX Impact Notes - Summary: The method's JSON response size and accuracy directly affect user flow. - Large JSON response impacts user flow, Unexpected data disrupts user experience

Test Case Ideas - Summary: Verify method handles various inputs correctly and returns expected JSON efficiently. - Performance with large datasets

Dependencies & Called Services - Summary: Uses Enumerable for collections and interfaces IActorModel and IRiskModel for actor and risk data. - Enumerable for collection operations, IActorModel interface for actor data, IRiskModel interface for risk data

SaveProcessDeadLines

Summary: Receive valid JSON, decode into Activity objects, and save deadlines via ProcessMapModel.

JsonResult ProcessController.SaveProcessDeadLines()

Routing

  • HTTP: POST
  • URL: /Process/SaveProcessDeadLines

Cross-layer call chain - ProcessController.SaveProcessDeadLines → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_SaveProcessDeadLines["ProcessController.SaveProcessDeadLines"]
    ProcessController_SaveProcessDeadLines --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Receive valid JSON, decode into Activity objects, and save deadlines via ProcessMapModel. - Receive valid JSON data, Decode JSON into Activity objects, Save deadlines using ProcessMapModel.savedeadlines

Error Flows - Summary: Handle JSON deserialization errors and null references from missing form fields. - JSON deserialization failures on invalid or malformed input, Null reference exceptions from missing form fields like 'Screen' or 'Ac', Incomplete conditionals causing runtime errors or unexpected behavior

Security Issues - Summary: Direct use of unvalidated request data risks JSON deserialization and SQL injection. - JSON deserialization vulnerability from unvalidated request form data

Performance Issues - Summary: Optimize form data access and reduce logging to improve save operation performance. - Excessive logging on every save operation

Maintainability Issues - and validate form data for maintainability. - Use of magic numbers and strings reduces code clarity, Incomplete conditional statements cause errors or unexpected behavior, Lack of form data validation increases maintenance risk

UX Impact Notes - Summary: Method indirectly affects user flows through bookmarking user levels. - Indirect impact on user flows, Bookmarking user levels influence

Test Case Ideas - Summary: Test SaveProcessDeadLines with various form data to verify correct processing and method calls. - Correct parameters passed to SaveConfigurationDetails and UpdateIsReviewedStatus

Dependencies & Called Services - and logging. - DateTime utilities, Enum conversion, IProcessModel interface - LoggingManager service

SaveProcessWaitTypes

Summary: Decode JSON data, save wait types, save configuration, and return JSON response.

JsonResult ProcessController.SaveProcessWaitTypes()

Routing

  • HTTP: POST
  • URL: /Process/SaveProcessWaitTypes
Detailed Analysis

Key Flows - and return JSON response. - Return JSON response

Error Flows - Summary: Handle JSON deserialization errors and validate required inputs to prevent unhandled exceptions. - Lack of explicit exception handling causing unhandled error propagation

Security Issues - Summary: Direct use of unvalidated Request.Form JSON risks deserialization - SQL injection and XSS risks from unvalidated Request.Form data usage

Performance Issues - Summary: No performance issues identified in SaveProcessWaitTypes method.

Maintainability Issues - Summary: Improve variable naming, fix incomplete conditions, reduce class coupling, and replace magic numbers. - Non-descriptive variable names reduce code clarity, Incomplete condition causes compilation errors and unexpected behavior, Tight coupling between ProcessController, ProcessMapModel, and Registry hinders maintainability, Magic number usage reduces code readability

UX Impact Notes - Summary: Errors saving wait types degrade user experience. - Unclear UX impact from conditional checks on DataInputs and ActivityID

Test Case Ideas - conditional logic - Return correct JSON response after saving configuration - Handle missing DataInputs or ActivityID with error management

Dependencies & Called Services - Summary: Uses Enum conversion to process IProcessModel data. - Enum conversion, IProcessModel processing

SaveProcessBatchActs

Summary: Decode JSON from request, save batch acts and fixed configurations, then return JSON response.

JsonResult ProcessController.SaveProcessBatchActs()

Routing

  • HTTP: POST
  • URL: /Process/SaveProcessBatchActs
Detailed Analysis

Key Flows - then return JSON response. - Return JSON response indicating outcome

Error Flows - Summary: Handle JSON deserialization and integer conversion errors; fix incomplete conditional statement. - Incomplete conditional statement for 'DataInputs' check causing errors

Security Issues - Summary: Prevent JSON deserialization and SQL injection vulnerabilities in input handling. - JSON deserialization vulnerability in 'ReleaseData' decoding, SQL injection and data tampering risk from unsanitized 'DataInputs'

Performance Issues - Summary: Validate input before JSON deserialization to prevent performance degradation and errors. - Lack of input validation before JSON deserialization, Performance degradation risk, Error risk during deserialization

Maintainability Issues - Summary: Replace magic strings and numbers with named constants and fix incomplete conditionals. - Replace magic strings with named constants, Replace magic number with named constant, Fix incomplete conditional statement

UX Impact Notes - Summary: Returning JSON triggers client-side redirects and success messages. - JSON response triggers client-side redirects

Test Case Ideas - conditional logic - Successful JSON response returned after processing

Dependencies & Called Services - Summary: Convert IProcessModel instances during batch processing. - Convert IProcessModel

SaveProcessAllAnyActs

Summary: The method processes JSON activity data from an HTTP POST request, saves it, updates configuration, and returns a JSON result.

JsonResult ProcessController.SaveProcessAllAnyActs()

Routing

  • HTTP: POST
  • URL: /Process/SaveProcessAllAnyActs
Detailed Analysis

Key Flows - updates configuration - and returns a JSON result. - Return JSON result to client

Error Flows - Summary: The method lacks explicit error handling and exception management. - No explicit error handling, No exception management

Security Issues - Summary: Deserialization vulnerability risks arise from unvalidated JSON input decoding. - Unvalidated input in System.Web.Helpers.Json.Decode

Performance Issues - Summary: Accessing request form data without validation causes inefficient large payload handling. - Unvalidated request form data access

Maintainability Issues - Summary: Replace magic numbers and string literals with named constants to improve maintainability. - Use of magic numbers for form index, Use of string literals for event names

UX Impact Notes - Summary: Returning JSON results requires proper client-side handling to ensure good user experience. - JSON response handling, Client-side interpretation of JSON

Test Case Ideas - Summary: Verify SaveProcessAllAnyActs handles POST requests - returns results - Handle large request form data for performance and stability - Return expected JSON result after processing

Dependencies & Called Services - Summary: Uses IProcessModel to manage process-related operations. - Dependency on IProcessModel interface - Process management operations

SaveActivityBatchAllAny

Summary: Decode input JSONs, conditionally save batches and activities, then save configuration and return result.

JsonResult ProcessController.SaveActivityBatchAllAny()

Routing

  • HTTP: POST
  • URL: /Process/SaveActivityBatchAllAny
Detailed Analysis

Key Flows - then save configuration and return result. - Return JsonResult

Error Flows - Summary: Handle invalid JSON and fix incomplete conditionals to prevent errors. - Invalid or missing JSON in 'ReleaseData' and 'AllAny' fields, Incomplete conditional statements causing unpredictable behavior

Security Issues - Summary: Sanitize 'ReleaseData' and 'AllAny' fields to prevent JSON deserialization vulnerabilities. - Unsanitized 'ReleaseData' field risks JSON deserialization attacks, Unsanitized 'AllAny' field risks JSON deserialization attacks

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

Maintainability Issues - Summary: Improve naming clarity and fix incomplete code for better maintainability. - Non-descriptive variable names, Use of unclear magic strings, Incomplete and unclear conditionals, Typo and incomplete code lines, Unclear method names

UX Impact Notes - Summary: No user experience impact detected in the analyzed code. - No direct user experience impact

Test Case Ideas - Summary: Validate JSON handling - and return values in SaveActivityBatchAllAny. - Handle valid and missing JSON in 'ReleaseData' form field - Handle valid and missing JSON in 'AllAny' form field - Test conditional logic involving 'WaitTypes' and variable 'a' - Test method return values under various conditions

Dependencies & Called Services - Summary: Uses IProcessModel service for processing activities. - IProcessModel service dependency

CustomerExperience

Summary: Handles HTTP GET requests by rendering and returning a view to the client.

ActionResult ProcessController.CustomerExperience()

Routing

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

Key Flows - Summary: Handles HTTP GET requests by rendering and returning a view to the client. - Handle HTTP GET request - Render and return view

UX Impact Notes - Summary: Renders a specific view to impact user experience. - Return View

Test Case Ideas - and ActionResult return. - ActionResult return type

MergeActivities

Summary: Retrieve and filter project actors and activities, construct MergeActivity objects, and process sequence paths or redirect if no activities exist.

ActionResult ProcessController.MergeActivities(string screen)

Routing

  • HTTP: GET
  • URL: /Process/MergeActivities

Cross-layer call chain - ProcessController.MergeActivities → Andromeda.Core.Services.ProcessExtensions.FindByID

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_MergeActivities["ProcessController.MergeActivities"]
    ProcessController_MergeActivities --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: MergeActivities (Andromeda.Web\Views\Process\MergeActivities.cshtml)
  • Model: List<MergeActivity>
Detailed Analysis

Key Flows - and process sequence paths or redirect if no activities exist. - Check activity count to continue or redirect to ProcessCreation - Fetch and filter project arrows, activity properties, compensatory activities, and groups - Process sequence paths and call GetSequencePath when conditions apply - Retrieve active, non-system actors with locations and activities, Filter valid activities by decision status, handling time, actor presence, and arrow links, Construct MergeActivity objects with sequence activities and actor names

Error Flows - Summary: Redirect to ProcessCreation when no activities exist. - Redirect to ProcessCreation action if no activities present

Performance Issues - Summary: Multiple LINQ calls and collection conversions cause excessive memory use and repeated iterations. - Excessive ToList() calls causing large memory allocations, Uncached Count() calls causing repeated enumeration, Repeated LINQ Any() and First() calls inside loops causing inefficiency, ToArray() usage causing memory allocation and copying overhead, RemoveAll on large lists causing performance degradation, DefaultIfEmpty and nested Any() calls impacting performance

Maintainability Issues - Summary: The method suffers from tight coupling, unclear naming, magic values, and poor documentation. - Tight coupling with actorModel and controlModel dependencies, Use of magic strings reducing readability and increasing error risk, Use of magic numbers without named constants, Non-descriptive variable names, Anonymous types without explicit definitions, Lack of comments on complex LINQ queries and method calls, Incomplete or unclear method calls and missing variable context

UX Impact Notes - Summary: Redirects users when no activities exist and updates UI with project data. - Populate ViewData and ViewBag with project data for UI display - Redirect users to ProcessCreation if no activities exist

Test Case Ideas - conditional logic - Read and assign project XML data to ViewBag and ViewData - Map activities to product factors and assign correctly in ViewData - Ensure performance and correctness with large datasets - Handle empty actors or activities with redirection to ProcessCreation - Handle compensatory activities and filter activity groups

Dependencies & Called Services - Summary: Uses collections, models, and utility classes for processing activities. - Enumerable for collection operations, IActorModel, IControlModel, IProcessModel, IRiskModel interfaces for domain models, ICollection and List for data storage, Math for calculations, String for text manipulation, TimeSpan for time intervals - ProcessExtensions for process-related utilities

SaveMergeRules

Summary: SaveMergeRules processes a POST request with valid JSON, updates project ID, saves options, and returns JSON result.

JsonResult ProcessController.SaveMergeRules()

Routing

  • HTTP: POST
  • URL: /Process/SaveMergeRules
Detailed Analysis

Key Flows - updates project ID - and returns JSON result. - Return JsonResult response - Update project ID in options

Error Flows - Summary: Handle JSON deserialization errors to prevent exceptions or error responses. - Lack of explicit exception handling risks unhandled errors

Security Issues - Summary: No security concerns identified in SaveMergeRules method.

Maintainability Issues - Summary: Tight coupling reduces flexibility and complicates testing. - Tight coupling with System.Web.Helpers.Json for JSON deserialization, Tight coupling with ProcessMapModel for saving merge activity options

UX Impact Notes - Summary: Returns JsonResult requiring client-side handling for smooth UX. - JsonResult return type

Test Case Ideas - Summary: Verify SaveMergeRules handles POST requests - Invoke SaveMergeRules on HTTP POST, Deserialize valid JSON data, Save merge activity options for various project IDs

Dependencies & Called Services - Summary: Uses IProcessModel interface for processing within SaveMergeRules method. - IProcessModel interface dependency

MergeActivitiesValidation

Summary: Retrieve and filter project activities, map them to enriched MergeActivity objects, validate connections, build sequence paths, and return as JSON.

JsonResult ProcessController.MergeActivitiesValidation()

Routing

  • HTTP: GET
  • URL: /Process/MergeActivitiesValidation
Detailed Analysis

Key Flows - validate connections - and return as JSON. - Return sequencePaths as JSON response - Validate arrows by checking predecessor and successor counts

Performance Issues - Summary: Multiple unoptimized database calls and repeated collection enumerations degrade performance. - Uncached multiple database calls for actors, activities, and arrows, Repeated iterations using 'Any' and 'First' on actors collection, Multiple enumeration of connectedArrows during predecessor and successor counts, Inefficient use of 'FirstOrDefault' and 'Any' on large activities and arrows collections, Unoptimized filtering of large arrows collections

Maintainability Issues - Summary: Separate data retrieval from filtering and replace magic values with named constants for clarity. - Mix data retrieval and filtering logic reduces maintainability

UX Impact Notes - Summary: Returned JSON triggers client-side updates affecting user flow. - JSON response with sequencePaths, Client-side actions triggered, User flow impacted

Test Case Ideas - Summary: Validate MergeActivitiesValidation handles activities - Return correct JSON with populated sequencePaths - Handle empty actors and arrows collections - Validate complex conditions on connectedArrows and activities

Dependencies & Called Services - Summary: Uses collection interfaces and models for activity validation. - Enumerable interface, IActorModel interface, ICollection interface, IControlModel interface, List collection

MoveToSystemTeam

Summary: The method validates team shapes by actor ID and clones the first matching team shape on the page.

JsonResult ProcessController.MoveToSystemTeam()

Routing

  • HTTP: POST
  • URL: /Process/MoveToSystemTeam

Cross-layer call chain - ProcessController.MoveToSystemTeam → Andromeda.Validation.SwimlaneInfo.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Validation_SwimlaneInfo_Clone["Andromeda.Validation.SwimlaneInfo.Clone"]
    ProcessController_MoveToSystemTeam["ProcessController.MoveToSystemTeam"]
    ProcessController_MoveToSystemTeam --> Andromeda_Validation_SwimlaneInfo_Clone
Detailed Analysis

Key Flows - Summary: The method validates team shapes by actor ID and clones the first matching team shape on the page. - Clone first matching team shape on the page - Validate team shapes by actor ID

Error Flows - Summary: Handle input conversion errors and null references in team shape lookups. - Check for null when accessing teamShapesList by toActorId and PageID - Fix incomplete if statement conditions to prevent compilation and logic errors - Validate user input conversion from Request.Form to integers

Security Issues - Summary: Direct conversion of user input to integers risks SQL injection and data tampering. - Lack of input validation on Request.Form data, Risk of SQL injection, Risk of data tampering

Performance Issues - Summary: Optimize database queries and data operations to improve performance. - Slow Max function on large datasets

Maintainability Issues - Summary: Tight coupling and complex, incomplete conditions reduce code maintainability. - Tight coupling between models and controllers, Complex conditional statement for cloning team shape, Incomplete if statement condition causing errors

UX Impact Notes - Summary: Lack of input validation and error handling risks data issues harming UX. - No direct UX impact, Risk of data inconsistency, Missing input validation, Missing error handling, Potential negative UX from data issues

Test Case Ideas - Summary: Test MoveToSystemTeam for correct data handling, method calls, and performance under load. - Actor ID and position updates after move - Correct parameters in ChangeTeam and UpdateProjectXml calls - Performance and scalability with large datasets and LINQ operations

Dependencies & Called Services - Summary: Uses data conversion, collections, actor and process models, and swimlane information. - Data conversion utilities, Enumerable collections, Actor model interface, List collections, Swimlane information - Process model interface

MergeActivity

Summary: MergeActivity retrieves, filters, and merges activities, updates references and properties, maintains graph integrity, updates project XML, and records history.

JsonResult ProcessController.MergeActivity(string ActNewName, int startId, double? AHT)

Routing

  • HTTP: POST
  • URL: /Process/MergeActivity

Cross-layer call chain - ProcessController.MergeActivity → System.Web.Mvc.LargeJsonResult.JsonEncode

Call Chain Diagram

flowchart TD
    ProcessController_MergeActivity["ProcessController.MergeActivity"]
    System_Web_Mvc_LargeJsonResult_JsonEncode["System.Web.Mvc.LargeJsonResult.JsonEncode"]
    ProcessController_MergeActivity --> System_Web_Mvc_LargeJsonResult_JsonEncode
Detailed Analysis

Key Flows - updates references and properties - updates project XML - update BusinessRule and DOE - Iterate activity shapes and edges to update references and remove merged activities - Update project XML and save configuration

Error Flows - Summary: Handle syntax errors - Syntax errors causing compilation issues, Empty blocks and incomplete method calls causing runtime errors, Null reference exceptions from null collections or objects, Incomplete code affecting merge operation integrity

Security Issues - Summary: Prevent SQL injection, secure JSON encoding, and complete security validations. - Incomplete security checks from empty code blocks

Performance Issues - Summary: Excessive database queries and unoptimized collection operations degrade performance. - Multiple database queries and LINQ operations impacting performance, Repeated lookups in collections causing slowdowns, Memory issues from ToList() on large collections, Unoptimized loops over large collections

Maintainability Issues - Summary: Refactor complex code, remove magic strings, fix syntax, and reduce tight coupling for maintainability. - Complex nested LINQ queries and conditionals reduce readability, Use of magic strings decreases code clarity, Incomplete code, syntax errors, and unclear variable names hinder debugging, Empty blocks and incomplete method calls lower code quality, Tight coupling with model methods limits flexibility and reusability

UX Impact Notes - Summary: MergeActivity affects data accuracy and may reduce responsiveness during long operations. - Indirect impact on user experience via data accuracy and consistency, Potential responsiveness degradation during long-running merges

Test Case Ideas - conditional logic - Correct update of merged activity properties including business rules - Accurate filtering and merging logic with varied mergeActivityIds - Correct update of project XML and saving of configuration details post-merge - Performance testing with large datasets and multiple database calls

Dependencies & Called Services - Summary: Utilizes collections, models, math, and JSON result services for activity merging. - Enumerable utilities, Collection interfaces, Actor, Control, Process, Risk models, Large JSON result handling, Math operations, String manipulation

RemoveMilestone

Summary: Process POST request to remove a milestone, update the process map, and document the change.

JsonResult ProcessController.RemoveMilestone()

Routing

  • HTTP: POST
  • URL: /Process/RemoveMilestone

Cross-layer call chain - ProcessController.RemoveMilestone → 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"]
    ProcessController_RemoveMilestone["ProcessController.RemoveMilestone"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_RemoveMilestone --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - update the process map - Create implementation plan documenting milestone removal - Receive POST request to remove milestone, Extract activity ID and milestone name from request, Remove milestone from process map by activity ID, Persist implementation plan via downstream call

Error Flows - Summary: RemoveMilestone lacks explicit error handling for invalid or missing form data. - Potential failures during milestone removal or plan creation due to unhandled errors

Security Issues - Summary: RemoveMilestone risks SQL injection and XSS from unvalidated Request.Form data. - Unvalidated Request.Form data

Performance Issues - Summary: Creating a new ImplementationPlan object causes database call and impacts performance. - Database call to create plan

Maintainability Issues - Summary: Replace magic string 'CriticalPath' with a constant or enum for maintainability. - Magic string 'CriticalPath' usage, Lack of constant or enum for plan.Lever

UX Impact Notes - Summary: Removing a milestone disrupts user workflow and project timeline. - Disrupt user workflow, Alter project timeline, Change critical process path

Test Case Ideas - Summary: Verify RemoveMilestone handles POST requests - and creates correct implementation plans. - Create implementation plan with correct Lever - Invoke RemoveMilestone on HTTP POST, Remove milestone with valid activity ID

Dependencies & Called Services - Summary: RemoveMilestone uses Convert, IActorModel, and IProcessModel services. - Convert service, IActorModel interface, IProcessModel interface

checkDeleteActivity

Summary: Check for dependencies on an activity before allowing its deletion and return the result.

JsonResult ProcessController.checkDeleteActivity(int actId, int ObjId, string riskId, string IdType)

Routing

  • HTTP: POST
  • URL: /Process/checkDeleteActivity
Detailed Analysis

Key Flows - Summary: Check for dependencies on an activity before allowing its deletion and return the result. - Return success JsonResult if no blocking dependencies are found

Error Flows - Summary: Prevent deletion if activity links to objectives or risks and return detailed error response. - Return JsonResult with error details and related objects on failure - Check activity associations with objectives or risks

Performance Issues - Summary: Optimize database calls and collection operations to improve method performance. - Multiple database calls within a single method, Inefficient LINQ usage on large collections inside loops, Repeated string concatenation for error messages, Inefficient 'Contains' usage on large collections

Maintainability Issues - Summary: The method is complex, unclear, and contains incomplete, unused, and poorly named code. - Multiple unrelated tasks increase complexity and reduce maintainability, Unclear variable names and potential typos reduce readability, Use of magic strings without formatting reduces clarity, Declared but unused variables and unclear lambda expressions, Empty or incomplete code blocks indicate poor code quality

UX Impact Notes - Summary: The method informs users of deletion errors via JsonResult, impacting UX clarity. - Return JsonResult with deletion error messages

Test Case Ideas - Summary: Verify correct JsonResult and error handling for deletable and non-deletable activities with varied dependencies. - Handle empty collections for objectives - Handle no matching activity risks in allObjActivityRisks - Process multiple entries referencing the same activity ID - Return correct JsonResult for deletable activities without dependencies - Return error JsonResult when activities link to objectives or risks - Gracefully handle incomplete or corrupted code paths - Return control without errors in all code paths

Dependencies & Called Services - Summary: Uses collections and interfaces for control and risk model management. - IControlModel interface for control logic

CreateSimulationChild

Summary: Create a simulation child project, copy necessary files, and redirect or respond based on parameters.

ActionResult ProcessController.CreateSimulationChild(string screen, int? ActivityID)

Routing

  • HTTP: GET
  • URL: /Process/CreateSimulationChild

Cross-layer call chain - ProcessController.CreateSimulationChild → Andromeda.Core.DataManager.Execute - ProcessController.CreateSimulationChild → Andromeda.Core.DataManager.GetDataSet - ProcessController.CreateSimulationChild → Andromeda.Core.LoggingManager.Error - ProcessController.CreateSimulationChild → Andromeda.Core.Extensions.LinqExtensions.ReplaceAtOnce - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters - Andromeda.Core.DataManager.GetDataSet → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.GetDataSet → Andromeda.Core.Database.helper.SqlParameters

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_Execute["Andromeda.Core.DataManager.Execute"]
    Andromeda_Core_DataManager_GetDataSet["Andromeda.Core.DataManager.GetDataSet"]
    Andromeda_Core_Database_helper_SqlParameters["Andromeda.Core.Database.helper.SqlParameters"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceAtOnce["Andromeda.Core.Extensions.LinqExtensions.ReplaceAtOnce"]
    Andromeda_Core_LoggingManager_Debug["Andromeda.Core.LoggingManager.Debug"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_CreateSimulationChild["ProcessController.CreateSimulationChild"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_DataManager_GetDataSet --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_GetDataSet --> Andromeda_Core_LoggingManager_Debug
    ProcessController_CreateSimulationChild --> Andromeda_Core_DataManager_Execute
    ProcessController_CreateSimulationChild --> Andromeda_Core_DataManager_GetDataSet
    ProcessController_CreateSimulationChild --> Andromeda_Core_Extensions_LinqExtensions_ReplaceAtOnce
    ProcessController_CreateSimulationChild --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Create a simulation child project - and redirect or respond based on parameters. - Create simulation child project with project metadata - Redirect to SimulateProcess action if ActivityID is provided - Redirect to SimulateProcess action otherwise - Return JSON with child ID if specific string equals 'UnderControlled'

Error Flows - Summary: Reject invalid childId and return HttpNotFound for invalid projects. - Return HttpNotFound for invalid or empty projects

Security Issues - Summary: Prevent path traversal by validating 'ProjectFolder' path concatenation. - Path traversal vulnerability in 'ProjectFolder' path construction, Syntax errors causing unexpected behavior and security risks

Performance Issues - Summary: Avoid infinite loops and optimize file copying for large projects. - Infinite loop risk from unchanged simulation projects collection during ProjectId conflict check

Maintainability Issues - Summary: Code uses unclear magic values, contains typos, incomplete fragments, and long lines reducing maintainability. - Use of magic numbers for childId and ProjectId checks

UX Impact Notes - Summary: Redirect users appropriately based on project creation and input conditions. - Redirect to error page if project creation fails - Redirect to SimulateProcess action when ActivityID is present or as fallback - Return HttpNotFound response for specific project conditions - Return JSON response with childId for 'UnderControlled' condition

Test Case Ideas - variable assignments - Check onProjectId assignment equals childId - Confirm CreateSimulationChild returns valid project and assigns project variable - Test behavior for ProjectId zero and non-zero with error logging and redirection - Verify copying of project and pattern XML files with path existence checks - Confirm AllowGet attribute is set correctly - Verify RedirectToAction calls and handle typos in action names - Handle incomplete or malformed code including syntax errors - Validate GetSimulationProjects returns expected projects - Validate JSON response when string equals 'UnderControlled'

Dependencies & Called Services - Summary: Uses collections, process modeling, logging, and string utilities. - Enumerable collections, Integer type, LINQ extensions, String utilities - Logging manager - Process model interface

SimulateProcess

Summary: SimulateProcess handles an HTTP GET request and returns EnrichProcessMap's result as an ActionResult.

ActionResult ProcessController.SimulateProcess(string screen)

Routing

  • HTTP: GET
  • URL: /Process/SimulateProcess
Detailed Analysis

Key Flows - Summary: SimulateProcess handles an HTTP GET request and returns EnrichProcessMap's result as an ActionResult. - Return EnrichProcessMap result as ActionResult

UX Impact Notes - Summary: SimulateProcess returns an ActionResult that controls user response flow. - Return ActionResult

Test Case Ideas - Summary: Verify SimulateProcess triggers on HTTP GET requests. - SimulateProcess invocation on HTTP GET request

Dependencies & Called Services - Summary: SimulateProcess depends on the Process service. - Process service dependency

DeleteSimulationChild

Summary: DeleteSimulationChild validates simulationProjId, calls DiscardSimulationChild, and returns JSON response.

ActionResult ProcessController.DeleteSimulationChild()

Routing

  • HTTP: POST
  • URL: /Process/DeleteSimulationChild
Detailed Analysis

Key Flows - Summary: DeleteSimulationChild validates simulationProjId - and returns JSON response. - Return JSON response - Validate and convert simulationProjId to integer

Error Flows - Summary: Handle null and conversion errors for simulationProjId to prevent exceptions. - Null check for simulationProjId to skip discard operation - Risk of null reference exception from incorrect null check

Security Issues - Summary: Using Request.Form data without validation risks SQL injection and data tampering. - Unvalidated Request.Form data

Maintainability Issues - Summary: Avoid magic strings and clarify Json method parameters for better maintainability. - Use of magic string 'ProjectFolder' in configuration, Lack of explicit parameters in Json method call

UX Impact Notes - Summary: The method's JSON response affects user flow based on client-side handling. - HTTP POST action triggers redirect or error message

Test Case Ideas - Summary: Verify DeleteSimulationChild returns valid ActionResult and correctly passes parameters. - Test parameter passing with various project folder configurations - Validate method returns valid ActionResult

Dependencies & Called Services - Summary: Uses Convert and IProcessModel services for simulation child deletion. - Convert service, IProcessModel interface

DeleteProjects

Summary: DeleteProjects fetches all child projects, discards simulations for each, and returns a completion status.

ActionResult ProcessController.DeleteProjects(int ProjectId)

Routing

  • HTTP: POST
  • URL: /Process/DeleteProjects
Detailed Analysis

Key Flows - and returns a completion status. - Return JSON result confirming deletion completion - Fetch all child projects and include root project ID

Security Issues - Summary: Ensure strict authorization and secure configuration access in DeleteProjects. - Insecure ConfigurationManager.AppSettings usage if not properly secured

Performance Issues - Summary: DeleteProjects method suffers from inefficient data retrieval and repetitive processing. - Inefficient data retrieval via GetAllProjectsSuperAdminData and GetAllChildProjects, Repeated calls to DiscardSimulationChild for each project ID causing slow performance

Maintainability Issues - Summary: Replace magic strings and unclear status codes with constants for better maintainability. - Replace magic strings in configuration settings with constants

UX Impact Notes - Summary: Project deletion affects user flows and triggers redirects or messages. - Authorization checks affect user permissions - User receives redirect or message after deletion

Test Case Ideas - ID updates - Return expected JSON result after deletion - Handle cases with no deleted projects - Update projectIds with root project ID

Dependencies & Called Services - Summary: Uses collections and interfaces for project and process model manipulation. - Enumerable for collection operations, IProcessModel interface, IProjectModel interface, List collection, String type

DeleteActivity

Summary: DeleteActivity removes the activity shape and related arrows, updates the process model and project XML, and logs standardization history if applicable.

JsonResult ProcessController.DeleteActivity(int actId, int ObjId, string riskId)

Routing

  • HTTP: POST
  • URL: /Process/DeleteActivity
Detailed Analysis

Key Flows - updates the process model and project XML - and logs standardization history if applicable. - Duplicate incoming and outgoing arrows during deletion, Filter and remove arrow shapes linked to activity and page ID, Remove activity shape from list and process map model, Insert record into standardization history if form field present - Fetch related activity shapes and arrow details - Update project XML to reflect deletions

Error Flows - Summary: DeleteActivity returns false if actId not found and risks runtime errors from incomplete code. - Return JSON false if activity actId not found - Incomplete deletion logic risks partial deletion

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

Performance Issues - Summary: Excessive data retrieval and list operations degrade performance on large datasets. - Multiple data retrieval calls from various models, Use of ToList() on large collections causing high memory usage, Resource-intensive loops over large arrow and arrow shape collections, Multiple enumeration of arrowShapesList during filtering, Costly RemoveAll operations with lambda on large lists

Maintainability Issues - Summary: The method violates single responsibility, uses unclear variables, and contains incomplete code. - Commented-out and incomplete code reduce clarity and maintainability, Multiple unrelated tasks violate Single Responsibility Principle, Magic numbers and unclear variable names reduce readability, Undefined or unclear variables complicate understanding, Tight coupling with ProcessMapModel hinders flexibility, Incomplete code lines cause compilation errors and maintenance issues

UX Impact Notes - Summary: Improve error messages and user notifications for missing data. - Unclear error message when activity not found, No user notification for missing or empty 'Standardization' field

Test Case Ideas - Summary: Verify DeleteActivity handles missing and found activities - Handle multiple activities with same ID - Return false if activity not found - Return correct data if activity found - Remove activity shape and update project XML correctly

Dependencies & Called Services - Summary: DeleteActivity uses collections and actor/process models for data handling. - Enumerable for collection operations, IActorModel for actor representation, IProcessModel for process representation, List for data storage

DataInputs

Summary: Retrieve and process project data, activities, and metrics; filter and associate actors, risks, and decisions; prepare data for view rendering.

ActionResult ProcessController.DataInputs()

Routing

  • HTTP: GET
  • URL: /Process/DataInputs

Cross-layer call chain - ProcessController.DataInputs → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.DataInputs → Andromeda.Core.Entities.Arrow.Clone - ProcessController.DataInputs → Andromeda.Core.Entities.Activity.Clone - ProcessController.DataInputs → Andromeda.Core.Services.Algorithms.Delooper.PopulateConnectedActivities - ProcessController.DataInputs → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - ProcessController.DataInputs → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.DataInputs → Andromeda.Core.Entities.Project.GetTags - ProcessController.DataInputs → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - ProcessController.DataInputs → Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - 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_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    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_Algorithms_Delooper_PopulateConnectedActivities["Andromeda.Core.Services.Algorithms.Delooper.PopulateConnectedActivities"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_DataInputs["ProcessController.DataInputs"]
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_DataInputs --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_DataInputs --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_DataInputs --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_PopulateConnectedActivities
    ProcessController_DataInputs --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_DataInputs --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: DataInputs (Andromeda.Web\Views\Process\DataInputs.cshtml)
  • Model: Tuple<IList<Andromeda.Core.Entities.Actor>, IList<Andromeda.Core.Entities.Activity>, List<Andromeda.Core.Entities.Arrow>>
Detailed Analysis

Key Flows - Summary: Retrieve and process project data, activities, and metrics; filter and associate actors, risks, and decisions; prepare data for view rendering. - undesired outcomes; assign to ViewData - Redirect to 'ProcessCrea' if activities count condition met - Prepare undesired and deadline paths; filter activities by deadline types; set ViewData properties

Error Flows - Summary: Redirect on zero activities and ensure null checks to prevent exceptions. - Null checks for empty or null results from data retrieval methods - Null checks when retrieving team names or decision activities to avoid exceptions - Redirect to 'ProcessCrea' if activities count or value equals zero

Security Issues - Summary: No security issues identified in the analyzed data inputs. - No explicit security vulnerabilities found

Performance Issues - Summary: Inefficient data processing and repeated operations degrade performance and increase memory use. - Inefficient use of 'OrderBy' and 'ToList' on large datasets

Maintainability Issues - Summary: Incomplete code, unclear variables, magic strings, and typos reduce maintainability and clarity. - Incomplete conditional statements and code fragments, Use of magic strings instead of constants or enums, Inconsistent and unclear variable names with typos, Commented-out code and incomplete type declarations, Undefined or unclear variables, Use of anonymous types without documentation, Typo in method name 'FirstOrDefau'

UX Impact Notes - UI data assignment - and redirects directly impact user experience and flow. - Calculated metrics and paths in ViewData affect displayed data - Redirect to 'ProcessCrea' action affects user flow - Slow or failed bookmark and product data retrieval impacts UX, Product name suggestions in ViewData influence UI selection, Filtering undesired paths and rework activities shapes UI and decisions

Test Case Ideas - conditional redirects - Correct data return for project ID - Conditional redirect to 'ProcessCrea' - Calculation and assignment of process metrics to ViewData - Filtering and assignment of undesired and deadline paths to ViewData

Dependencies & Called Services - Summary: Uses core data types, collections, models, and utility classes for processing. - Core data types (Int32, String), Collections (List, Enumerable, Dictionary), Domain models (IActorModel, IControlModel, IFinalPlanModel, IProcessModel, IRiskModel, Project, Activity), Utility classes (Math, ProcessExtensions), Enums and helpers (Enum, Arrow)

BulkAHTUpdate

Summary: Decode activities and update AHT in bulk; save configuration if next stage differs from 'HT'.

JsonResult ProcessController.BulkAHTUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkAHTUpdate

Cross-layer call chain - ProcessController.BulkAHTUpdate → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_BulkAHTUpdate["ProcessController.BulkAHTUpdate"]
    ProcessController_BulkAHTUpdate --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Decode activities and update AHT in bulk; save configuration if next stage differs from 'HT'. - Decode activities from request and bulk update AHT with current project ID

Error Flows - Summary: Handle missing form data keys to prevent null reference exceptions and runtime errors. - Null reference exceptions from missing or null form data keys, Runtime errors from incomplete or truncated code segments

Security Issues - Summary: Unvalidated input risks deserialization and SQL injection vulnerabilities. - Deserialization vulnerability from unvalidated JSON in Request.Form['Activities'] - SQL injection or data tampering risk from unvalidated Request.Form['NextStage']

Performance Issues - Summary: BulkAHTUpdate suffers performance issues from unvalidated input - Missing input validation and error handling for Request.Form['Activities'], Multiple ToString() calls on large request form data, Frequent database-intensive SaveConfigurationDetails calls

Maintainability Issues - Summary: Magic strings and incomplete code reduce readability and cause potential runtime errors. - Use of magic strings reduces readability and maintainability, Incomplete or truncated code causes compilation and runtime issues, Incomplete conditional statements lead to unexpected behavior

UX Impact Notes - Summary: Conditional NextStage checks influence user flow; user interaction logging supports UX improvements. - Conditional checks on NextStage affect user flow - Logging user interactions via BookMarkDetailsUsersLevel informs UX improvements

Test Case Ideas - Summary: Verify BulkAHTUpdate handles various input scenarios and calls dependent methods correctly. - Handle missing or empty 'Activities' key - Verify UpdateIsReviewedStatus called with correct parameters - Verify LoggingManager.Error called with correct parameters

Dependencies & Called Services - Summary: BulkAHTUpdate uses utilities for data conversion - DateTime conversion, Enum handling - Logging management - Process model interface

BulkAHTUndesiredUpdate

Summary: BulkAHTUndesiredUpdate decodes JSON, groups data by undesired outcome, updates records, and returns success.

JsonResult ProcessController.BulkAHTUndesiredUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkAHTUndesiredUpdate
Detailed Analysis

Key Flows - Summary: BulkAHTUndesiredUpdate decodes JSON - updates records - and returns success. - Return successful JsonResult - Update undesired records via ProcessMapModel

Error Flows - Summary: Handle JSON deserialization errors and null or missing keys in 'nd' objects. - JSON deserialization failure on invalid input, 'nd' object null or missing keys causing runtime exceptions

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

Performance Issues - Summary: Excessive memory use and repeated method calls degrade BulkAHTUndesiredUpdate performance. - ToList() after GroupBy causes high memory usage on large datasets - Repeated ProcessMapModel.UpdateUndesired calls in loops degrade performance

Maintainability Issues - Summary: The method's tight coupling and poor naming reduce modularity and readability, complicating maintenance. - Tight coupling with ProcessMapModel reduces modularity and testability, Non-descriptive method name 't()' lowers readability and maintainability, Incomplete code snippets hinder understanding and maintenance, Method resides in a large class, increasing complexity and reducing maintainability

UX Impact Notes - Summary: Bulk update success or failure indirectly affects user experience. - Indirect UX impact from bulk update success or failure

Test Case Ideas - grouping logic - update calls - Valid JSON decoding and update operations - Accurate calls to ProcessMapModel.UpdateUndesired with proper parameters - Expected JsonResult returned for various inputs

Dependencies & Called Services - Summary: BulkAHTUndesiredUpdate depends on IProcessModel service. - Dependency on IProcessModel service

BulkAHTDOEsUpdate

Summary: Decode request data, update bulk AHTDOEs, process and update activity properties, then prepare JSON response.

JsonResult ProcessController.BulkAHTDOEsUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkAHTDOEsUpdate
Detailed Analysis

Key Flows - update bulk AHTDOEs - process and update activity properties - Bulk update activity properties using ProcessMapModel - Process DOE strings into ActivityProperty objects by splitting, trimming, deduplicating - Update bulk AHTDOEs via UpdateBulkAHT

Security Issues - Summary: Prevent JSON deserialization and SQL injection vulnerabilities in BulkAHTDOEsUpdate. - SQL injection risk from unsanitized DOE string in activity property updates

Performance Issues - Summary: BulkAHTDOEsUpdate suffers from slow data retrieval and inefficient duplicate filtering on large datasets. - Inefficient DistinctBy and ToList duplicate filtering on large datasets - High memory usage from ToList data conversion on large datasets

Maintainability Issues - Summary: Tight coupling and unclear magic numbers reduce modularity and code clarity. - Magic number (5) assigned to BusinessRuleKnowledge reduces clarity

Test Case Ideas - Summary: Verify correct decoding, processing, deduplication, and serialization of AHTDOE data. - Call UpdateBulkAHT with decoded AHTDOEs - Return correct activity properties for current project - Set BusinessRuleKnowledge field correctly during ActivityProperty creation

Dependencies & Called Services - Summary: Uses enumerable collections and interfaces for control and process models with string identifiers. - Enumerable collections, IControlModel interface, IProcessModel interface, String identifiers

SaveUpdateFormsBrs

Summary: Decode JSON properties, create ActivityProperty objects from business rules, set control model properties, and return JsonResult.

JsonResult ProcessController.SaveUpdateFormsBrs()

Routing

  • HTTP: POST
  • URL: /Process/SaveUpdateFormsBrs
Detailed Analysis

Key Flows - create ActivityProperty objects from business rules - set control model properties - and return JsonResult. - Create ActivityProperty objects from business rules - Set control model business properties using filtered list and first ActivityProperty ID - Return JsonResult to client

Error Flows - Summary: Handle null references - Null reference exception from Request.Form.Properties access, JSON deserialization failure on invalid Properties field, Runtime exceptions from invalid integer conversions, Null reference exception from empty activityProperties list access

Security Issues - Summary: Unvalidated JSON input in 'Properties' risks deserialization attacks. - Unvalidated input in 'Properties' field

Performance Issues - Summary: Iteration over large collections and multiple enumerations degrade performance. - Iteration over large 'Proper' collection, Multiple enumerations from ToList() and FirstOrDefault() on activityProperties

Maintainability Issues - Summary: Unclear variable names and incomplete code reduce code clarity and maintainability. - Unclear and non-descriptive variable names, Incomplete or unclear variable definitions, Lack of comments and incomplete code snippets

UX Impact Notes - Summary: Returns JsonResult to client - Return JsonResult to client

Test Case Ideas - Summary: Validate JsonResult output - Create and add ActivityProperty objects correctly - Ensure proper method completion and control return - Validate JsonResult output

Dependencies & Called Services - Summary: Uses collection and string utilities for data conversion and control modeling. - Enumerable utilities, ICollection interface, IControlModel interface, String operations, Data conversion methods

BulkUpdateCluster

Summary: Decode valid JSON activities, group and aggregate ActivityIds, then update clusters accordingly.

JsonResult ProcessController.BulkUpdateCluster()

Routing

  • HTTP: POST
  • URL: /Process/BulkUpdateCluster
Detailed Analysis

Key Flows - then update clusters accordingly. - Group updated activity records - Update clusters via UpdateCluster calls

Error Flows - Summary: Handle JSON decoding errors - JSON decoding errors for 'Activities' due to invalid input, Integer conversion failures from invalid or missing form data, Syntax or runtime errors from malformed 'ctivityID' references

Security Issues - Summary: Unvalidated form data risks SQL injection and data tampering. - Use of unvalidated Request.Form data in database calls

Performance Issues - Summary: Optimize memory usage and string operations to improve BulkUpdateCluster performance. - ToList() after grouping causes high memory usage on large collections, String concatenation with '+' in loops causes inefficient memory allocation, Repeated ToString() calls on form data degrade performance

Maintainability Issues - Summary: Replace magic strings with constants and remove unclear code and comments to improve maintainability. - Replace magic strings with named constants, Remove unclear method calls without context, Fix incomplete or malformed code references, Remove leftover irrelevant comments

UX Impact Notes - Summary: BulkUpdateCluster risks user errors and lacks proper invalid data notifications. - Missing user notifications or redirects on invalid form data or conversion failure

Test Case Ideas - Summary: Test BulkUpdateCluster for input variations - Empty and non-empty UpdatedActivityRecords collections - Correct aggregation of ActivityId strings in UpdateCluster call - Method returns control without errors

Dependencies & Called Services - Summary: Uses type conversion and enumeration utilities for processing models and strings. - Process model interface - Type conversion utilities, Enumeration utilities, String manipulation

BulkBusinessRulesUpdate

Summary: Decode activities, update business rule properties, save configurations, and return update status.

JsonResult ProcessController.BulkBusinessRulesUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkBusinessRulesUpdate
Detailed Analysis

Key Flows - update business rule properties - and return update status. - Filter 'BusinessRule' properties and update via ProcessMapModel - Return JsonResult confirming bulk update completion - Fetch all activity properties for the project

Error Flows - Summary: Handle exceptions from JSON deserialization - Exceptions from JSON deserialization of 'Activities' data, Exceptions from Convert.ToInt32 on invalid property levels or form values, Errors from missing or invalid 'DataInputs' form data during configuration save

Security Issues - Summary: Prevent JSON deserialization and SQL injection vulnerabilities in request processing. - JSON deserialization vulnerability in Decode method for 'Activities', SQL injection and data tampering risk from unsanitized 'DataInputs'

Performance Issues - Summary: Optimize BulkBusinessRulesUpdate to reduce memory use and avoid costly loops. - High memory use from ToList() on large property lists, Repeated properties list initialization inside loops, Expensive GetAllActivityPropertiesOfProject call for large projects, Inefficient loops over large activity and property collections

Maintainability Issues - Summary: The method suffers from unclear variables, fragmented code, magic strings, tight coupling, and syntax errors. - Tight coupling with ProcessMapModel and UpdateActivityProperties

Test Case Ideas - Summary: Verify correct processing and updating of activities and configurations with valid inputs. - Process valid JSON in 'Activities' form data - Retrieve and update activity properties by project ID - Call UpdateActivityProperties with correct parameters and filter properties

Dependencies & Called Services - Summary: Uses collection and model interfaces for data processing and conversion. - Enumerable for collection operations, IControlModel interface, IProcessModel interface, List collection, Convert utility

BulkFormsUpdate

Summary: Decode activities from the request, update their properties, save configurations, and return a completion response.

JsonResult ProcessController.BulkFormsUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkFormsUpdate
Detailed Analysis

Key Flows - update their properties - and return a completion response. - update properties via model - Return JSON result confirming bulk update completion

Error Flows - Summary: BulkFormsUpdate lacks error handling for JSON deserialization and integer conversion failures. - No exception handling for property updates or data retrieval errors

Security Issues - Summary: Unsanitized form inputs create cross-site scripting (XSS) vulnerabilities. - Unsanitized form field values from Request.Form, Cross-site scripting (XSS) vulnerability

Performance Issues - Summary: BulkFormsUpdate suffers from costly data retrieval and inefficient looping causing performance degradation. - Expensive GetAllActivityPropertiesOfProject call at start, Unnecessary list initialization inside loops, Inefficient repeated LINQ filtering in activity loop, Performance impact from nested loops updating collections

Maintainability Issues - Summary: Replace magic strings and numbers with constants, clarify variable names, and reduce tight coupling. - Replace magic strings with named constants, Replace unexplained magic numbers with named constants, Remove incomplete or unused variables, Avoid tight coupling with ProcessMapModel and its methods, Use clear, standard variable names

UX Impact Notes - Summary: Invalid or null DataInputs prevent saving configuration, causing form submission errors. - Null or invalid DataInputs block configuration saving, Lack of input validation and sanitization causes form submission errors

Test Case Ideas - Summary: Validate JSON decoding - Correct calls to UpdateActivityProperties with FORM filtering - Method returns valid JSON result indicating completion

Dependencies & Called Services - Summary: Convert collections and manipulate control and process models in bulk update. - Convert collections, Use Enumerable methods, Manipulate IControlModel instances, Manipulate IProcessModel instances, Use List collections

DownloadFormMaster

Summary: DownloadFormMaster processes project activity properties to extract, group, and filter business rules by skill levels, returning the results as a file.

FileContentResult ProcessController.DownloadFormMaster()

Routing

  • URL: /Process/DownloadFormMaster

Cross-layer call chain - ProcessController.DownloadFormMaster → Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData - ProcessController.DownloadFormMaster → Andromeda.Core.Extensions.LinqExtensions.getSkillScore

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProcessController_DownloadFormMaster["ProcessController.DownloadFormMaster"]
    ProcessController_DownloadFormMaster --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_DownloadFormMaster --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
Detailed Analysis

Key Flows - returning the results as a file. - Check for 'BusinessRule' existence and perform string concatenations - Clear business rule list and reset related strings before processing - Filter business rules by skill scores and assign to fact-based - Return processed business rules as FileContentResult

Error Flows - Summary: DownloadFormMaster handles invalid project IDs and empty data but lacks explicit exception handling. - Assume default skill score for incomplete or malformed business rule strings, Risk of unexpected behavior from parsing assumptions without validation - Handle invalid project IDs and empty data scenarios

Performance Issues - Summary: Optimize collection operations to prevent memory and performance degradation. - Use of ToList() on large collections causing memory overhead, Repeated Trim() and ToLower() calls on large lists reducing performance, Multiple enumerations from LINQ Where, Select, Max causing inefficiencies, Any() with lambda on large collections slowing performance, Split() on large strings impacting performance

Maintainability Issues - Summary: Replace magic strings and numbers with constants, improve variable names, and fix incomplete or unused code. - Replace magic strings with constants or enums, Replace magic numbers with named constants, Improve non-descriptive variable names, Fix incomplete lambda expressions and conditions, Remove unused variables and dead code, Ensure code completeness to prevent compilation/runtime errors

UX Impact Notes - Summary: File generation errors and large data processing cause user delays and poor experience. - File generation errors impact user experience, Large data processing causes delays and timeouts

Test Case Ideas - and string concatenation logic. - Handle absence of 'BusinessRule' entries - Process business rules without caret - Return valid FileContentResult - Update BusinessRuleKnowledge with max skill score

Dependencies & Called Services - Summary: Uses encoding, collections, LINQ, and domain models for processing form master data. - Encoding utilities, Enumerable collections, Control and process model interfaces, Integer data types, LINQ extensions, List collections, ProductFormBRMapping domain model, String operations

DownloadActivityBulkUpload

Summary: Process bulk upload by branching on activity 'type' to set headers and generate fields based on specific business rules and mappings.

FileContentResult ProcessController.DownloadActivityBulkUpload(string type)

Routing

  • URL: /Process/DownloadActivityBulkUpload

Cross-layer call chain - ProcessController.DownloadActivityBulkUpload → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProcessController.DownloadActivityBulkUpload → Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProcessController_DownloadActivityBulkUpload["ProcessController.DownloadActivityBulkUpload"]
    ProcessController_DownloadActivityBulkUpload --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_DownloadActivityBulkUpload --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
Detailed Analysis

Key Flows - Summary: Process bulk upload by branching on activity 'type' to set headers and generate fields based on specific business rules and mappings. - Filter and process 'ProdForm' type activity properties and mapped form data to generate bulk upload content, Initialize variables and retrieve mapped form data for 'MasterBr' type to prepare bulk upload file, Retrieve DOE-related activity properties and construct fields for 'SqFeet' type - Handle 'BR' - set headers - Process 'FormProd' type by retrieving activity properties and product form business rule mappings, construct headers and fields

Error Flows - Summary: DownloadActivityBulkUpload lacks explicit exception handling, risking failures on invalid inputs and data parsing. - Unhandled exceptions during string parsing and integer conversion of skill scores

Security Issues - Summary: The method risks CSV injection and faulty security checks due to improper input handling and string comparison errors. - CSV injection and data corruption from unsanitized user input concatenation, Lack of input validation on fields like ActorName, ActivityID, OriActName, ProductName, Incorrect string comparison methods causing faulty security behavior

Performance Issues - Summary: Optimize LINQ usage, string operations, and data retrieval to improve performance. - Inefficient LINQ methods on large datasets causing bottlenecks

Maintainability Issues - and complex logic - Complex string concatenation and replacement logic - Repetitive conditional checks needing refactoring

UX Impact Notes - Summary: Provides downloadable CSV files for bulk upload with risk of corrupted files and silent failures. - Returns FileContentResult for downloadable CSV files - Sets headers and fields defining CSV columns and data

Test Case Ideas - Summary: Test DownloadActivityBulkUpload for all type branches, data aggregation, filtering, and output correctness. - Test all 'type' values for branch coverage, Test business rule filtering with varied skill scores, Verify correct headers and fields per 'type', Test aggregation and concatenation of form and product data, Ensure case-insensitive comparisons for 'type' and properties - Validate returned FileContentResult content

Dependencies & Called Services - Summary: Uses collections, data types, and domain-specific models for bulk upload processing. - Encoding, Enumerable, IControlModel, IProcessModel, IRiskModel, Int32, LinqExtensions, List, ProductFormBRMapping, String, TimeSpan

UploadAHTFile

Summary: Uploads a valid AHT file, calls UploadBulkActivityFile with headers, and returns success JsonResult.

JsonResult ProcessController.UploadAHTFile(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadAHTFile
Detailed Analysis

Key Flows - and returns success JsonResult. - Return success JsonResult

Error Flows - Summary: Handle invalid file types and incorrect headers during file upload. - Invalid file type error, Incorrect file header error, Error handling in UploadBulkActivityFile method

UX Impact Notes - Summary: Returns JsonResult affecting user flow based on UploadBulkActivityFile implementation. - Return JsonResult

Test Case Ideas - Summary: Test UploadAHTFile method with valid and large files on HTTP POST requests. - Handle large file upload - Invoke UploadAHTFile on HTTP POST request - Process valid AHT file

Dependencies & Called Services - Summary: Calls Process service to handle uploaded AHT file. - Process service invocation

UploadBulkSqFeets

Summary: The method processes an uploaded file via POST, validates headers, and returns the processing result as JSON.

JsonResult ProcessController.UploadBulkSqFeets(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkSqFeets
Detailed Analysis

Key Flows - validates headers - and returns the processing result as JSON. - Return UploadBulkActivityFile result as JsonResult

Error Flows - Summary: Handle errors from invalid files and incorrect headers during bulk upload. - Invalid file format errors, Incorrect header errors

Test Case Ideas - Summary: Test UploadBulkSqFeets method for correct invocation and file validation. - Invoke UploadBulkSqFeets on HTTP POST request - Process valid file successfully - Validate file headers and reject incorrect ones

Dependencies & Called Services - Summary: Uses Process and String services for bulk square feet upload. - Process service - String service

UploadBulkAHT

Summary: UploadBulkAHT processes bulk AHT data uploads efficiently.

JsonResult ProcessController.UploadBulkAHT(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkAHT
Detailed Analysis

Key Flows - Summary: UploadBulkAHT processes bulk AHT data uploads efficiently.

Error Flows - Summary: Relies on UploadBulkActivityFile for error handling without internal error management. - No internal error handling, Error management delegated to UploadBulkActivityFile

Test Case Ideas - Summary: Verify UploadBulkAHT handles HTTP POST requests and validates file content correctly. - Invoke UploadBulkAHT on HTTP POST request - Process valid file successfully - Validate and reject files with incorrect headers

Dependencies & Called Services - Summary: Calls Process service for bulk AHT upload. - Process service call

UploadBulkCluster

Summary: UploadBulkCluster processes a valid file upload via HTTP POST and returns a successful JSON response.

JsonResult ProcessController.UploadBulkCluster(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkCluster
Detailed Analysis

Key Flows - Summary: UploadBulkCluster processes a valid file upload via HTTP POST and returns a successful JSON response. - Return successful JsonResult

Error Flows - Summary: Handle errors from invalid files or incorrect headers during bulk cluster upload. - Invalid file upload errors, Incorrect header errors, Error handling in UploadBulkActivityFile

Test Case Ideas - Summary: Verify UploadBulkCluster handles POST requests - and validates headers. - Invoke UploadBulkCluster on HTTP POST - Process valid file and return correct JsonResult - Validate file headers and report errors

Dependencies & Called Services - Summary: UploadBulkCluster method depends on the Process service. - Process service dependency

UploadBulkBRs

Summary: No key flows defined for UploadBulkBRs method.

JsonResult ProcessController.UploadBulkBRs(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkBRs
Detailed Analysis

Key Flows - Summary: No key flows defined for UploadBulkBRs method.

Test Case Ideas - Summary: Verify UploadBulkBRs handles HTTP POST requests and validates file content correctly. - Invoke UploadBulkBRs on HTTP POST request - Process valid file successfully - Validate file headers and reject incorrect ones

Dependencies & Called Services - Summary: UploadBulkBRs method depends on the Process service. - Process service dependency

UploadBulkBRwithSkills

Summary: Receives a file via HTTP POST, processes it with UploadBulkActivityFile, and returns a JSON result.

JsonResult ProcessController.UploadBulkBRwithSkills(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkBRwithSkills
Detailed Analysis

Key Flows - and returns a JSON result. - Return JsonResult with upload outcome

Error Flows - Summary: Handle invalid file uploads and incorrect headers during bulk skill upload. - Invalid file upload handling, Incorrect header detection

Test Case Ideas - Summary: Test UploadBulkBRwithSkills for HTTP POST handling and file header validation. - Handle HTTP POST requests - Process valid files with correct headers - Reject files with incorrect or missing headers

Dependencies & Called Services - Summary: Calls Process service to handle bulk BR upload with skills. - Process service invocation

UploadBulkFormBRMaster

Summary: The method receives a file via HTTP POST, validates headers, and processes the file.

JsonResult ProcessController.UploadBulkFormBRMaster(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkFormBRMaster
Detailed Analysis

Key Flows - validates headers - Receive file via HTTP POST, Pass file and headers to UploadBulkActivityFile for processing - Validate file headers

Test Case Ideas - Summary: Verify UploadBulkFormBRMaster handles HTTP POST requests and validates file headers. - Invoke UploadBulkFormBRMaster on HTTP POST, Reject file with incorrect or missing headers - Process valid file with all predefined headers

Dependencies & Called Services - Summary: Processes string data during bulk form upload. - Process service - String data handling

UploadFormMaster

Summary: Receive valid file, pass it with headers to UploadBulkActivityFile, return JsonResult.

JsonResult ProcessController.UploadFormMaster(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadFormMaster
Detailed Analysis

Key Flows - return JsonResult. - Return resulting JsonResult

Test Case Ideas - Summary: Verify UploadFormMaster handles POST requests and processes files correctly. - Invoke UploadFormMaster on HTTP POST, Assess performance with large file upload - Process valid file upload successfully

Dependencies & Called Services - Summary: UploadFormMaster method calls the Process service. - Call Process service

UploadBulkFormsFromMapping

Summary: The method handles an HTTP POST file upload, processes it via UploadBulkActivityFile, and returns the result as JSON.

JsonResult ProcessController.UploadBulkFormsFromMapping(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkFormsFromMapping
Detailed Analysis

Key Flows - Summary: The method handles an HTTP POST file upload - and returns the result as JSON. - Return UploadBulkActivityFile result as JsonResult

Maintainability Issues - reducing flexibility and requiring code changes for updates. - Reduced flexibility for header updates - Code changes required to update headers

UX Impact Notes - Summary: Returns JsonResult affecting client-side upload result handling and display. - JsonResult return type

Test Case Ideas - Summary: Verify UploadBulkFormsFromMapping handles HTTP POST requests and processes valid and invalid files correctly. - Invoke UploadBulkFormsFromMapping on HTTP POST - Process valid file uploads successfully - Validate and reject invalid file types

Dependencies & Called Services - Summary: Uses Process and String services for bulk form upload. - Process service - String service

UploadProductForm

Summary: UploadProductForm processes a valid CSV upload, validates and updates product data, then returns success JSON.

JsonResult ProcessController.UploadProductForm(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadProductForm
Detailed Analysis

Key Flows - validates and updates product data - then returns success JSON. - Return JSON success response - Update system with product form data - Validate product data

Error Flows - Summary: Handle invalid file extensions - Invalid or empty file extension errors, Error on added or removed products in template, Duplicate records detection with JSON response, Failures in directory creation or file saving

Security Issues - validate uploads - ensure culture-invariant checks - Configuration file tampering risk via AppSettings folder paths

Performance Issues - Summary: Inefficient collection operations and potential infinite loop degrade UploadProductForm performance. - Expensive ToList() and Distinct() calls on large datasets

Maintainability Issues - Summary: Code suffers from unclear naming, magic values, mixed responsibilities, and incomplete syntax. - Incomplete and malformed code fragments with syntax errors, Use of magic strings and numbers reducing readability, Non-descriptive variable names hindering understanding, Mixing data manipulation with response generation violating single responsibility principle, Inconsistent and unclear variable usage without context, Anonymous objects for messages complicating debugging

UX Impact Notes - Summary: Handle errors and confirmations clearly to maintain smooth user experience during product upload. - Delete confirmations protect users but interrupt flow - Unexpected errors from incomplete code degrade user experience, File saving delays or errors disrupt user flow, JSON error messages inform users about duplicates and invalid templates, Response format affects user feedback clarity, Upload completion impacts interface flow

Test Case Ideas - Summary: Validate file upload - Valid CSV file upload and processing, Error handling for missing or empty files, Temporary folder name generation for CSV files, Directory creation for new and existing folders, CSV parsing with valid and malformed files, Detection of added or removed products with error response, Detection of duplicate products in uploaded file with error response, Detection of duplicate records in forms collection with JSON response, Handling empty and non-empty UploadedForms collections, Identification and confirmation of deleted forms, Response content type negotiation based on AcceptTypes header, Proper disposal of parser and resources after processing

Dependencies & Called Services - Summary: Uses file handling, parsing, and processing utilities for product upload. - File system operations, File parsing with TextFieldParser, HTTP file upload handling, Data enumeration and collection management, String manipulation, Model processing interface - Process execution

SaveProductForm

Summary: Map products to filtered form entries and insert concatenated entries as business rule mappings.

void ProcessController.SaveProductForm(string[] ProductCol, List<string[]> FormsRow)

Routing

  • URL: /Process/SaveProductForm
Detailed Analysis

Key Flows - Summary: Map products to filtered form entries and insert concatenated entries as business rule mappings. - Create list for each product's form entries - Initialize product-to-form-data dictionary, Filter form rows where specific entries equal 'yes' after trim and lowercase, Use lambda conditions to select qualifying form entries, Add filtered entries to product lists and dictionary, Insert product form mappings with comma-separated form entries

Error Flows - Summary: Handle potential exceptions from empty collections and missing null checks. - IndexOutOfRangeException risk from looping ProductCol without length check

Performance Issues - Summary: Optimize string operations and collection processing to improve loop performance. - Any() with lambda expression slowing large dataset checks

Maintainability Issues - Summary: The method contains redundant attributes, unclear variable usage, and hard-to-read code. - Redundant [NonAction] attribute on private method, Unused or unclear variable 'Products', Incomplete and unclear code snippets, Use of magic strings and magic indices, Complex lambda expressions and long lines reducing readability

Test Case Ideas - Summary: Test SaveProductForm for conditional logic - Conditional branches with case-insensitive comparisons and lambda filters, Correct addition to collections and dictionary population, Behavior with empty and multi-value form collections

Dependencies & Called Services - Summary: Uses collections and interfaces for data handling and processing. - IProcessModel interface for processing logic

UploadFormActivity

Summary: UploadFormActivity validates and saves uploaded files, parses CSV data, and processes form-activity associations while checking for errors.

JsonResult ProcessController.UploadFormActivity(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadFormActivity
Detailed Analysis

Key Flows - Summary: UploadFormActivity validates and saves uploaded files - and processes form-activity associations while checking for errors. - Process parsed data into form-activity collections and set activity properties - Ensure target directory exists or create it - Validate file extension and handle CSV files with temporary folder path

Error Flows - Summary: Handle file validation - Invalid or missing file extension, Disallowed new forms in uploaded data, Duplicate forms in uploaded file, Null folder path or file saving failures due to path traversal or invalid names, Parsing failure from inaccessible or non-existent file

Security Issues - Summary: File upload risks include extension tampering and directory traversal vulnerabilities. - File type tampering risk from extension-only validation, Directory traversal risk from unsanitized file and folder paths

Performance Issues - Summary: Optimize file I/O, large data processing, and loop efficiency in UploadFormActivity. - Performance degradation from LINQ methods on large datasets

Maintainability Issues - and mixes logic - Complex conditional logic mixing data processing and response generation

UX Impact Notes - Summary: Error messages, file upload failures, response type variations, and unexpected closures impact user experience. - Error messages for new or duplicate forms, File upload failures from invalid names or paths, Response content type varies by AcceptTypes, Unexpected form or window closures from Close call

Test Case Ideas - Summary: Validate form data retrieval - and activity property settings. - Check and create directories as needed - Handle file uploads with valid CSV - Process first line as headers and subsequent lines as data - Detect new forms in template and return errors - Detect duplicate forms and return errors - Set activity properties correctly and call SetActivityProperties

Dependencies & Called Services - Summary: UploadFormActivity uses data structures, file handling, parsing, and model interfaces. - Data structures: Dictionary, List, Enumerable, File handling: HttpPostedFileBase, Path, Parsing: TextFieldParser, Model interfaces: IControlModel, IProcessModel, Type utilities: Convert, Enum, String

UploadFormBrs

Summary: UploadFormBrs validates and saves a CSV file, parses its content, processes and validates form and business rule data, then returns a success JSON response.

JsonResult ProcessController.UploadFormBrs(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadFormBrs
Detailed Analysis

Key Flows - Summary: UploadFormBrs validates and saves a CSV file - processes and validates form and business rule data - then returns a success JSON response. - Create target directory if missing - Return JSON success response - Process and validate form and business rule data - Validate file extension as .csv

Error Flows - Summary: Validate file extension and reject new or duplicate forms with JSON errors. - Handle syntax errors to prevent execution failures - Return JSON error for new forms not allowed by template - Return JSON error for duplicate forms in upload - Validate file extension and reject invalid or missing extensions

Security Issues - Summary: UploadFormBrs lacks input validation and sanitization, risking injection and directory traversal. - No validation or sanitization of 'hdnData' form data, Directory traversal risk from unsanitized file name in path construction, Incomplete code and syntax errors causing vulnerabilities and instability

Performance Issues - Summary: Optimize collection operations and file handling to improve UploadFormBrs performance. - Missing file existence check before saving

Maintainability Issues - Summary: The method suffers from unclear variables, magic strings, dead code, and complex expressions reducing maintainability. - Unclear variable definitions and context, Use of magic strings for paths, file types, JSON keys, and content types, Presence of dead or unused code and incomplete statements, Complex LINQ expressions with lambda functions, Hardcoded delimiters reducing flexibility, Anonymous types in JSON responses complicating code understanding

UX Impact Notes - Summary: UploadFormBrs method returns JSON feedback - Deletion confirmation prompts validate user actions

Test Case Ideas - Summary: Validate CSV upload handling - Create directory if missing before saving file - Handle empty or missing hdnData form data - Update bookmark details when FormsCol conditions are met - Reject CSV with new forms added via template and return error - Reject CSV containing duplicate forms and return error - Parse CSV headers and rows correctly across datasets - Maintain performance with large datasets and LINQ operations - Set and handle CSV delimiters correctly - Return JsonResult in all code paths - Gracefully handle incomplete or malformed CSV files

Dependencies & Called Services - Summary: Uses file handling, data parsing, collection management, and process control dependencies. - File handling utilities, Data parsing with TextFieldParser, Collection types and enumeration, HTTP file upload handling, String manipulation - Process management

SaveFormBrs

Summary: Initialize and populate form business rules dictionaries, convert them to activity properties, and insert mappings into the database.

void ProcessController.SaveFormBrs(string[] FormsCol, List<string[]> BRsRow)

Routing

  • URL: /Process/SaveFormBrs

Cross-layer call chain - ProcessController.SaveFormBrs → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_SaveFormBrs["ProcessController.SaveFormBrs"]
    ProcessController_SaveFormBrs --> Andromeda_Core_Entities_Project_GetTags
Detailed Analysis

Key Flows - Summary: Initialize and populate form business rules dictionaries, convert them to activity properties, and insert mappings into the database. - Create per-form business rules dictionary with conditional string checks - Initialize dictionary for forms and business rules from input parameters, Use trimmed, case-insensitive string comparisons to add business rules, Add non-empty business rules dictionaries to main forms dictionary, Convert business rules to ActivityProperty objects with specific BusinessRuleKnowledge values, Insert form master and product form business rule mappings into database via ProcessMapModel

Error Flows - Summary: Handle empty array access and ensure complete - IndexOutOfRangeException from unchecked empty array access

Performance Issues - Summary: Optimize loops to reduce repeated dictionary creation, string trimming, LINQ calls, and database inserts. - Repeated dictionary creation inside loops, Multiple string.Trim() calls within loops, LINQ Any() with lambda on large collections, Multiple database inserts inside loops

Maintainability Issues - Summary: Incomplete code, unclear naming, and missing comments reduce maintainability. - Incomplete and syntactically incorrect code snippets, Use of magic strings and numbers without named constants, Unclear and single-letter variable names, Lack of comments and incomplete method calls, Truncated method names and incomplete code fragments

Test Case Ideas - Summary: Verify BRules initialization, string comparisons, object creation, database operations, performance, and error handling. - ActivityProperty creation and BusinessRuleKnowledge assignment - and BRules datasets

Dependencies & Called Services - Summary: Uses collections, string handling, and project processing interfaces. - Dictionary usage, Enumerable operations, ICollection interface, IProcessModel interface, Project handling, String manipulation

UpdateActivitiesFormBrs

Summary: Process arrow mode data from the request to update predecessor and successor links.

ActionResult ProcessController.UpdateActivitiesFormBrs()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivitiesFormBrs
Detailed Analysis

Key Flows - Summary: Process arrow mode data from the request to update predecessor and successor links. - Detect arrow mode data in request, Decode arrow mode data - Update predecessor and successor relationships for each arrow mode

Error Flows - Summary: Handle invalid or incomplete JSON data to prevent deserialization and null reference errors. - Invalid or missing JSON data in request form, Incomplete or missing fields causing null reference or deserialization errors

Security Issues - Summary: Lack of input validation risks JSON deserialization vulnerabilities. - Missing input validation for JSON data, Potential JSON deserialization vulnerabilities

Performance Issues - and conversions degrade update performance. - Multiple Convert.ToInt32 calls during status updates

Maintainability Issues - Summary: Refactor magic strings and repeated calls; manage dependencies on external methods. - Use of magic strings reduces maintainability and risks errors if keys change, Repeated method calls with similar parameters require refactoring, Dependency on external methods complicates maintenance if those methods change

UX Impact Notes - Summary: Invalid JSON or missing data errors degrade user experience if unhandled. - Invalid JSON input errors, Missing data errors, Negative UX impact without error handling

Test Case Ideas - Summary: Test updating activities with various input scenarios and validate form data handling. - Access and decode 'ArrowModes' field from request form - Handle incomplete or partial request form data - Update activity properties with empty - Update arrow modes with empty

Dependencies & Called Services - Summary: UpdateActivitiesFormBrs depends on Convert - Convert service, IControlModel interface, IProcessModel interface

UpdateActivitiesFormModes

Summary: UpdateActivitiesFormModes processes form data, updates activity properties and arrow modes, manages undo data, and logs changes.

ActionResult ProcessController.UpdateActivitiesFormModes()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivitiesFormModes

Cross-layer call chain - ProcessController.UpdateActivitiesFormModes → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_UpdateActivitiesFormModes["ProcessController.UpdateActivitiesFormModes"]
    ProcessController_UpdateActivitiesFormModes --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: UpdateActivitiesFormModes processes form data - updates activity properties and arrow modes - and logs changes. - Filter activities and session data to create ActivityPropertyData objects - Decode and update arrow modes for predecessor activities - Update form data collections and set activity properties downstream - Update process map reviewed status and log errors

Error Flows - Summary: Prevent null reference exceptions by validating all required form fields before use. - Null reference risk from missing 'OldName' or 'NewName' fields, Insufficient validation of form fields before access

Security Issues - Summary: Prevent JSON deserialization and session data tampering vulnerabilities. - Unvalidated JSON deserialization from request form data

Performance Issues - Summary: Repeated LINQ calls inside loops degrade performance on large collections. - Repeated LINQ calls like ToList() and FirstOrDefault() inside loops, Multiple iterations and LINQ queries on large activity properties and arrow modes

Maintainability Issues - Summary: Refactor to remove magic strings, decouple tightly bound classes, and improve variable naming. - Use of magic strings reduces readability and maintainability, Tight coupling with specific classes and methods reduces modularity, Non-descriptive variable names hinder code clarity

UX Impact Notes - Summary: UpdateActivitiesFormModes indirectly affects user workflows via form mode changes and history insertion. - Form mode updates

Test Case Ideas - collection updates - status updates - Decode JSON data from request form, Retrieve 'FORM' activity properties for current project, Iterate over 'arrowModes' including empty and large collections - Handle large collections without performance degradation - Update form data collections and set activity properties - Update reviewed status and verify logging

Dependencies & Called Services - and logging services. - Data conversion utilities, DateTime handling, Enumerable collections, Actor model interface, Control model interface, List collections - Logging management - Process model interface

RemoveUndoForm

Summary: RemoveUndoForm deletes specified activity data from session undoFormData and updates the session.

ActionResult ProcessController.RemoveUndoForm()

Routing

  • HTTP: POST
  • URL: /Process/RemoveUndoForm
Detailed Analysis

Key Flows - Summary: RemoveUndoForm deletes specified activity data from session undoFormData and updates the session. - Check existence of undoFormData in session - Return ActionResult to complete POST request - Update session undoFormData with changes

Error Flows - Summary: RemoveUndoForm validates input and session data before removing activity to prevent errors. - Check for null 'undoFormData' session variable before removal - Validate and convert 'ID' from request form to integer - Prevent null reference exceptions with thorough null checks

Security Issues - Summary: Validate and sanitize Request.Form['ID'] to prevent SQL injection and data tampering. - Lack of validation on Request.Form['ID'], Risk of SQL injection, Risk of data tampering

Performance Issues - Summary: No performance issues identified in RemoveUndoForm method.

Maintainability Issues - Summary: Code clarity suffers from corrupted segments, magic strings, and undefined variables. - Undefined variable 'un' when resetting session variable

UX Impact Notes - Summary: Manages undo entries and updates session data to control user input restoration. - Manage undo form data to remove specific entries - Update session variable 'undoFormData' after removal

Test Case Ideas - Summary: Verify RemoveUndoForm correctly removes items and updates session with valid inputs. - Handle valid ID values in request form - Handle non-existent activity data in undoFormData - Return valid ActionResult - Update undoFormData session variable after removal

Dependencies & Called Services - Summary: Uses collection conversion and enumeration utilities. - Enumerable utilities, List collection, Convert methods

UndoFormChanges

Summary: UndoFormChanges restores previous form data for a specific activity from session and updates the session state accordingly.

ActionResult ProcessController.UndoFormChanges()

Routing

  • HTTP: POST
  • URL: /Process/UndoFormChanges
Detailed Analysis

Key Flows - Summary: UndoFormChanges restores previous form data for a specific activity from session and updates the session state accordingly. - Check existence of 'undoFormData' in session - Set activity properties via controlModel - Return ActionResult indicating outcome - Update 'undoFormData' in session

Error Flows - Summary: Handle null session data and invalid form ID to prevent runtime errors. - Null reference from missing or null 'undoFormData' session variable, Exceptions from invalid or missing 'ID' in request form, Incomplete conditionals causing unexpected behavior or runtime errors

Security Issues - Summary: Validate and sanitize Request.Form["ID"] to prevent SQL injection and data tampering. - Lack of validation on Request.Form["ID"], Risk of SQL injection, Risk of data tampering

Performance Issues - Summary: Transforming large sesData.PreviousList degrades performance. - Enumerate and transform sesData.PreviousList causing performance degradation with large lists

Maintainability Issues - Summary: Incomplete method and unclear code reduce maintainability and cause potential errors. - Unclear variable usage in return statement

UX Impact Notes - Summary: Implement UndoFormChanges to prevent errors and empty responses. - Prevent error messages, Avoid empty responses, Ensure smooth user experience

Test Case Ideas - Summary: Verify UndoFormChanges returns valid results - and handles performance. - Return valid ActionResult - Assign undoFormData session variable correctly - Revert form changes via SetActivityProperties with correct parameters

Dependencies & Called Services - Summary: UndoFormChanges uses collection conversion and control model interfaces. - Enumerable conversion, IControlModel interface, List collection

UpdateActivitiesBrs

Summary: Decode JSON activities, apply business rules, update session and activity data, insert history, and log changes.

ActionResult ProcessController.UpdateActivitiesBrs()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivitiesBrs

Cross-layer call chain - ProcessController.UpdateActivitiesBrs → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_UpdateActivitiesBrs["ProcessController.UpdateActivitiesBrs"]
    ProcessController_UpdateActivitiesBrs --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - update session and activity data - and log changes. - Decode JSON activities from request, Retrieve and apply business rules per activity, Insert standardization history from form data - Handle session data for undo functionality - Log update operation - Update activity properties and collections - Update reviewed status

Error Flows - Summary: Handle null references and invalid integer conversions to prevent runtime errors. - Null reference exceptions from missing session variables or form fields, Runtime errors from incomplete or malformed code, Exceptions from invalid Convert.ToInt32 conversions

Security Issues - Summary: Fix JSON deserialization and session data exposure vulnerabilities. - JSON deserialization vulnerability from unvalidated System.Web.Helpers.Json.Decode

Performance Issues - Summary: Optimize JSON processing and collection handling to prevent performance degradation. - High memory usage from ToList() on large collections for PreviousList and UpdatedList

Maintainability Issues - Summary: Use descriptive names and constants to improve code readability and maintainability. - Hardcoded logging messages lack named constants

UX Impact Notes - Summary: Form field handling affects user feedback and redirect flows after history insertion. - Form data handling for OldName and NewName, User feedback based on insertion success - Redirect flow dependent on standardization history insertion

Test Case Ideas - session updates - error logging - Handle presence and values of UndoBRData and UndoB session variables - Ensure method compiles and handles malformed code gracefully - Update session data properties like UpdatedList and doBRData - Update IsReviewedStatus and log error messages

Dependencies & Called Services - Summary: UpdateActivitiesBrs uses data conversion - and logging services. - Data conversion utilities, DateTime handling, Enumerable collections, Actor, Control, and Process models, List collections - Logging management

RemoveUndoBR

Summary: RemoveUndoBR retrieves an activity ID from the request, removes the matching activity from session data, updates the session, and returns an ActionResult.

ActionResult ProcessController.RemoveUndoBR()

Routing

  • HTTP: POST
  • URL: /Process/RemoveUndoBR
Detailed Analysis

Key Flows - updates the session - and returns an ActionResult. - Return ActionResult - Update session variable with modified list

Error Flows - Summary: Handle null references and input conversion errors in RemoveUndoBR method. - Null reference risk from unchecked 'UndoBRData' session variable

Security Issues - Summary: RemoveUndoBR uses unvalidated Request.Form['ID'] - Unvalidated Request.Form['ID'] usage

Performance Issues - Summary: Using 'FirstOrDefault' on large 'UndoBRData' list degrades performance. - Use of 'FirstOrDefault' on large 'UndoBRData' list

Maintainability Issues - Summary: The method has incomplete, incorrect code and uses magic strings without constants. - Incomplete and syntactically incorrect code, Use of magic strings without constants or centralized definitions, Code fragments and syntax errors preventing compilation

Test Case Ideas - Summary: Verify RemoveUndoBR handles POST requests - and updates session data correctly. - Handle HTTP POST requests with valid ActionResult - Handle UndoBRData entries without matching activity ID - Process UndoBRData entries matching activity ID - Update UndoBRData session variable after entry removal

Dependencies & Called Services - Summary: Uses collection conversion and LINQ operations for list manipulation. - Enumerable for LINQ operations, List for collection handling, Convert for type conversion

UndoBRChanges

Summary: UndoBRChanges retrieves the activity ID from the request and fetches undo data from the session.

ActionResult ProcessController.UndoBRChanges()

Routing

  • HTTP: POST
  • URL: /Process/UndoBRChanges
Detailed Analysis

Key Flows - Summary: UndoBRChanges retrieves the activity ID from the request and fetches undo data from the session. - Extract activity ID from request form, Retrieve undo data from session

Error Flows - Summary: UndoBRChanges risks null references, invalid ID parsing, and incomplete conditionals causing errors. - Null reference exception from unchecked session or UndoBRData

Security Issues - Summary: Validate and sanitize 'ID' from Request.Form to prevent injection and data tampering. - Data tampering risk from unchecked 'ID'

Performance Issues - Summary: Avoid inefficient list operations on large UndoBRData and PreviousList collections. - Inefficient use of FirstOrDefault on large UndoBRData lists, Performance degradation from ToList() on large sesData.PreviousList

Maintainability Issues - Summary: The method uses magic strings and incomplete code, reducing clarity and maintainability. - Incomplete and partial code blocks, Use of magic strings like 'ID', 'UndoBRData', and 'BusinessRule', Undefined functions and unclear variable definitions

Test Case Ideas - Summary: Verify UndoBRChanges returns valid ActionResult and handles session data correctly. - Handle missing matching activity data in Session['UndoBRData'] - Return valid ActionResult

Dependencies & Called Services - Summary: Uses collection and model conversion utilities. - Enumerable utilities, IControlModel interface, List collection, Conversion methods

InsertActProperties

Summary: Process new activity properties and update arrow modes, then return a JSON response.

ActionResult ProcessController.InsertActProperties()

Routing

  • HTTP: POST
  • URL: /Process/InsertActProperties
Detailed Analysis

Key Flows - Summary: Process new activity properties and update arrow modes - then return a JSON response. - Return JSON response - Update arrow modes for predecessor-successor pairs

Error Flows - Summary: InsertActProperties lacks error handling and risks failures from invalid input and code errors. - No explicit exception handling for data retrieval, JSON deserialization, or database operations, Failures from incomplete or invalid form data like missing propertyName or invalid JSON, Potential runtime errors from incomplete and syntactically incorrect code

Security Issues - Summary: Prevent SQL injection and JSON deserialization vulnerabilities by validating inputs. - JSON deserialization risk from unvalidated arrow mode input

Performance Issues - Summary: LINQ filtering and repeated UpdateArrowMode calls degrade performance. - Inefficient LINQ 'Any' and 'Where' filtering on large datasets - Repeated UpdateArrowMode calls inside arrow mode loop

Maintainability Issues - Summary: Magic strings and unclear variables reduce code maintainability and readability. - Use of magic strings increases error risk and maintenance difficulty, Incomplete and incorrect code fragments reduce readability, Unclear variable usage complicates understanding and maintenance

Test Case Ideas - insertion logic - arrow mode updates - Call UpdateArrowMode correctly with valid predecessor and successor values - Evaluate performance impact on large datasets with LINQ and repeated updates - Return expected JSON response after processing - Handle cases with no new properties to insert - Process presence and absence of 'ArrowModes' in form data

Dependencies & Called Services - Summary: Uses conversion and enumeration utilities with process model and string types. - Conversion utilities, Enumeration utilities, String type - Process model interface

DeleteActivityBR

Summary: Decode JSON request, delete specified activity properties, update undo data and business rule statuses, log operation, and save session data.

ActionResult ProcessController.DeleteActivityBR()

Routing

  • HTTP: POST
  • URL: /Process/DeleteActivityBR

Cross-layer call chain - ProcessController.DeleteActivityBR → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_DeleteActivityBR["ProcessController.DeleteActivityBR"]
    ProcessController_DeleteActivityBR --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - update undo data and business rule statuses - log operation - Store updated undo data in session - Log deletion operation - Update undo data - Update business rule statuses

Error Flows - Summary: Handle JSON deserialization errors and null references to prevent runtime failures. - NullReferenceException from unchecked UndoBRData or FirstOrDefault results

Security Issues - Summary: System.Web.Helpers.Json.Decode risks JSON deserialization without input validation. - JSON deserialization vulnerability, Lack of input validation on JSON.Decode

Performance Issues - Summary: Repeated calls and conversions in loops degrade performance on large datasets. - Repeated calls to GetActivityPropertiesByActivity within loops, Use of FirstOrDefault inside loops without caching, Unnecessary repeated Convert.ToInt32 conversions

Maintainability Issues - Summary: Replace magic strings and numbers with constants, improve variable names, fix code errors, and reduce tight coupling. - Use constants or enums instead of magic strings for session keys and method calls, Replace magic numbers with named constants for clarity, Improve variable names for better readability, Fix incomplete and malformed code to ensure compilation, Reduce tight coupling with ProcessMapModel to improve flexibility

Test Case Ideas - data updates - Handle valid JSON request form - Set and retrieve Session variable 'UndoBRData' - Call UpdateIsReviewedStatus with correct parameters - Log deletion events without sensitive data leakage - Update session undo data after deletion

Dependencies & Called Services - business logic - and logging. - Business logic interface - Logging service

DeleteActivityForm

Summary: Decode JSON request, delete specified activity properties, update undo data and status, and log the operation.

ActionResult ProcessController.DeleteActivityForm()

Routing

  • HTTP: POST
  • URL: /Process/DeleteActivityForm

Cross-layer call chain - ProcessController.DeleteActivityForm → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_DeleteActivityForm["ProcessController.DeleteActivityForm"]
    ProcessController_DeleteActivityForm --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - update undo data and status - and log the operation. - Decode JSON data from request, Retrieve or initialize undo form data - Delete each specified activity property - Log deletion operation - Update undo form data and reviewed status

Error Flows - Summary: DeleteActivityForm lacks explicit JSON error handling and contains incomplete code risking runtime failures. - Missing explicit JSON deserialization error handling, Incomplete code causing compilation and runtime errors

Security Issues - Summary: Prevent JSON deserialization attacks and secure session variables to avoid unauthorized access. - Secure session variables to prevent information disclosure and unauthorized access - Validate and sanitize JSON input to prevent deserialization vulnerabilities

Performance Issues - Summary: Optimize loops and data handling to reduce memory use and database calls. - Inefficient loops over large collections causing repeated database calls, Unnecessary memory allocation from ToList() usage, Repeated Int32 conversions impacting performance

Maintainability Issues - Summary: Code uses unclear names, magic strings, incomplete fragments, and tight coupling, harming maintainability. - Use of magic strings reduces readability and maintainability, Undescriptive variable names hinder code understanding, Incomplete and non-compilable code fragments complicate maintenance, Tight coupling between ProcessMapModel and controller reduces modularity

Test Case Ideas - and status update. - and update session undoFormData - Assign undoFormData correctly based on condition - Retrieve first matching form data and handle empty undoFormData - Call UpdateIsReviewedStatus with correct parameters - Delete activity property and update session list - Update undoFormData session variable after processing

Dependencies & Called Services - and logging. - Data conversion, DateTime handling, Enumerable collection processing, List operations - Logging management - Process model management

UpdateActivityBrSkill

Summary: The method processes POST data to update activity BR skill and review status, then returns a JSON result.

ActionResult ProcessController.UpdateActivityBrSkill()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivityBrSkill
Detailed Analysis

Key Flows - Summary: The method processes POST data to update activity BR skill and review status - then returns a JSON result. - Return JSON response indicating update outcome - Update activity BR skill via IProcessModel.updateactivitybrskill - Update reviewed status via IProcessModel.updateisreviewedstatus

Error Flows - Summary: Validate and convert input values to prevent exceptions and unexpected behavior. - Lack of input validation, Invalid or non-integer input values, Potential exceptions from invalid inputs

Security Issues - Summary: Direct conversion of user input to integers risks SQL injection and data tampering. - Risk of SQL injection from unvalidated input - Potential data tampering via unchecked user input

Performance Issues - Summary: Excessive Convert.ToInt32 calls degrade performance on invalid inputs. - Multiple Convert.ToInt32 calls, Performance impact on invalid integer inputs

Maintainability Issues - Summary: Remove unexplained magic numbers and strings to improve code clarity and maintainability. - Unexplained magic strings 'ID', 'BR', 'Skill', Use of magic numbers without context

UX Impact Notes - Summary: The method returns JSON that requires proper client-side handling to maintain user flow. - JSON response return

Test Case Ideas - Summary: Verify UpdateActivityBrSkill updates model correctly on valid HTTP POST requests. - Invoke UpdateActivityBrSkill on HTTP POST - Update model with valid ID

Dependencies & Called Services - Summary: Uses Convert and IProcessModel services for data transformation and process handling. - Convert service, IProcessModel interface

UploadBRsActivities

Summary: UploadBRsActivities processes an uploaded file, validates and parses CSV data, detects duplicates, and sets activity properties accordingly.

JsonResult ProcessController.UploadBRsActivities(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBRsActivities
Detailed Analysis

Key Flows - validates and parses CSV data - and sets activity properties accordingly. - Create activity properties list by assigning knowledge values from business rules - Ensure target directory exists or create it - Split hidden form field data and validate for new business rules - return error if found - return error if duplicates exist - Set activity properties on control model and invoke bookmarking if activity ID present

Error Flows - Summary: Reject new business rules in template and handle file validation and ID conversion errors. - Handle exceptions converting activity ID to integer - Reject new business rules added via template - Validate and sanitize uploaded file and form fields

Security Issues - Summary: UploadBRsActivities lacks input validation, risking file upload and path traversal attacks. - No validation or sanitization of 'hdnData' hidden form field, No validation of uploaded file parameter allowing malicious files, Path traversal vulnerability in file path construction for saving uploads

Performance Issues - Summary: Optimize CSV parsing and string operations to prevent infinite loops and improve performance. - CSV parser EndOfData property risks infinite loop if not updated

Maintainability Issues - Summary: The method uses hardcoded values, unclear variables, incomplete code, and lacks error handling. - Hardcoded strings reduce readability and flexibility; replace with named constants, Incomplete and corrupted code causes compilation errors and unexpected behavior, Non-descriptive and typo-containing variable names reduce code clarity, Hardcoded project folder paths hinder future changes, Missing error handling around file saving and parser initialization reduces robustness, Unclear and incomplete conditional statements and method calls complicate maintenance

UX Impact Notes - Summary: The method informs users of upload errors but inconsistent response types and missing validation harm UX. - Returning JSON with 'text/plain' content type disrupts client-side handling

Test Case Ideas - Summary: Validate file handling - Check and create directories as needed - Handle files with various extensions and missing names - Handle empty - Handle empty collections without errors - Process activity rows and populate properties accurately - Save files correctly and handle save errors - Detect new business rules and return errors - Detect duplicate business rules and return errors - Group and order activity properties and assign knowledge - Test performance with large datasets

Dependencies & Called Services - Summary: Uses data structures, file handling, parsing, and model interfaces for processing uploads. - Data structures: Dictionary, List, Enumerable, File handling: HttpPostedFileBase, Path, TextFieldParser, Model interfaces: IControlModel, IProcessModel, Type utilities: Convert, Enum, String

UploadBulkForm

Summary: Process HTTP POST file upload, handle it via UploadBulkActivityFile, and return JSON result.

JsonResult ProcessController.UploadBulkForm(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkForm
Detailed Analysis

Key Flows - handle it via UploadBulkActivityFile - and return JSON result. - Process file using UploadBulkActivityFile - Return JSON upload result

Test Case Ideas - Summary: Test file upload handling for valid types, empty files, and large sizes. - File upload with valid file types and correct pre-headers, File upload with empty file, File upload with large file size

Dependencies & Called Services - Summary: UploadBulkForm method calls the Process service. - Process service call

UploadBulkDOE

Summary: UploadBulkDOE processes a file upload via POST, delegates processing, and returns the result.

JsonResult ProcessController.UploadBulkDOE(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadBulkDOE
Detailed Analysis

Key Flows - and returns the result. - Return JsonResult from UploadBulkActivityFile to client

Error Flows - Summary: Handle invalid file or incorrect headers with error JsonResult. - Return error JsonResult

Test Case Ideas - Summary: Verify UploadBulkDOE handles HTTP POST requests and validates file headers. - Invoke UploadBulkDOE on HTTP POST request, Reject file with incorrect or missing headers - Process valid file with correct headers

Dependencies & Called Services - Summary: UploadBulkDOE uses Process and String services. - Process service - String service

UploadBulkActivityFile

Summary: No overall behaviour summary returned

JsonResult ProcessController.UploadBulkActivityFile(HttpPostedFileBase file, string[] PreHeaders, string fileType)

Routing

  • URL: /Process/UploadBulkActivityFile

Cross-layer call chain - ProcessController.UploadBulkActivityFile → Andromeda.Core.Services.CsvHelper.ReadHeader - ProcessController.UploadBulkActivityFile → Andromeda.Core.Services.CsvHelper.readRecords - ProcessController.UploadBulkActivityFile → Andromeda.Core.Services.CsvHelper.ReadallErrors - ProcessController.UploadBulkActivityFile → Andromeda.Core.Extensions.LinqExtensions.DistinctBy

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_DistinctBy["Andromeda.Core.Extensions.LinqExtensions.DistinctBy"]
    Andromeda_Core_Services_CsvHelper_ReadHeader["Andromeda.Core.Services.CsvHelper.ReadHeader"]
    Andromeda_Core_Services_CsvHelper_ReadallErrors["Andromeda.Core.Services.CsvHelper.ReadallErrors"]
    Andromeda_Core_Services_CsvHelper_readRecords["Andromeda.Core.Services.CsvHelper.readRecords"]
    ProcessController_UploadBulkActivityFile["ProcessController.UploadBulkActivityFile"]
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Extensions_LinqExtensions_DistinctBy
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Services_CsvHelper_ReadHeader
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Services_CsvHelper_ReadallErrors
    ProcessController_UploadBulkActivityFile --> Andromeda_Core_Services_CsvHelper_readRecords
Detailed Analysis

Dependencies & Called Services - Summary: Uses libraries and models for CSV conversion, data processing, serialization, and file handling. - CSV conversion with CsvHelper, Data processing with Enumerable and LinqExtensions, Model interfaces IControlModel, IProcessModel, IRiskModel, Serialization with JavaScriptSerializer, File and path handling with Path and Process, Basic types Int32, String, TimeSpan, Collections with List

BulkDecisionOutputsUpdate

Summary: Process and update decision activities and outputs, optionally save configuration, then return success.

JsonResult ProcessController.BulkDecisionOutputsUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkDecisionOutputsUpdate
Detailed Analysis

Key Flows - Summary: Process and update decision activities and outputs - then return success. - Check presence of 'DecisionOutput' in request - create ActivityProduct objects - Return JSON success response

Error Flows - Summary: Handle null references - Null reference from missing Request.Form or DecisionOutput, JSON deserialization errors from invalid DecisionOutput string, Format exceptions and integer overflow during integer conversions, Incomplete code causing runtime errors or unexpected behavior

Security Issues - Summary: Fix JSON deserialization vulnerability in Decode method for DecisionOutput. - JSON deserialization vulnerability in Decode method, Security risk processing DecisionOutput

Performance Issues - Summary: Deserializing large JSON and repeated conversions and method calls inside loops degrade performance. - Repeated UpdateArrowDecisionOutput and ToInt32 calls within loops

Maintainability Issues - Summary: Improve code clarity, error handling, and reduce tight coupling for better maintainability. - Tight coupling with SetProduct and SaveConfigurationDetails methods

UX Impact Notes - Summary: The method returns success status for UI updates but lacks error handling. - Return JSON success response for UI updates

Test Case Ideas - Summary: Verify JSON response, form data handling, method calls, success flag, robustness, and performance. - Handle presence and absence of 'DecisionOutput' in form data - Handle malformed or missing form data robustly - Return JsonResult for HTTP POST requests - Call UpdateArrowDecisionOutput when successors exist - Call SetProduct with correct product data - Return JSON with 'IsSuccess' true on success - Perform efficiently with large input datasets

Dependencies & Called Services - Summary: Uses conversion utilities and interfaces for control and process models. - Conversion utilities, IControlModel interface, IProcessModel interface

CopyBrsFromTree

Summary: Copy business rules from the project tree, create implementation plans, and return the plan as JSON.

JsonResult ProcessController.CopyBrsFromTree()

Routing

  • HTTP: POST
  • URL: /Process/CopyBrsFromTree
Detailed Analysis

Key Flows - create implementation plans - and return the plan as JSON. - Check for unmatched business rules to copy - Fetch activity properties filtered by business rules - Assign non-empty subtask string to plan and create implementation plan - Return JSON result with the plan or relevant data

Error Flows - Summary: Handle null references and validate request form data explicitly. - Null reference risks with plan or actorModel, Lack of explicit validation for request form data

Security Issues - Summary: Sanitize request form data to prevent SQL injection when retrieving activity IDs. - SQL injection risk from unsanitized request form data, RiskActivity and CtrlActivity ID retrieval vulnerability

Performance Issues - Summary: Multiple database queries and inefficient loops degrade performance. - Multiple database queries for activity properties and activities, String concatenation within loops when building subtask strings, Looping over large collections

Maintainability Issues - Summary: Method suffers from high complexity and unclear, incomplete code. - High complexity from multiple database queries and filtering, Unclear and incomplete code reduces clarity

UX Impact Notes - Summary: Displays constructed subtask string and generates JSON output affecting user experience. - Display constructed subtask string to user, Generate JSON result for user interface

Test Case Ideas - conditional logic - Conditional logic with 'unMat' values - Iterate unmatched business rules and set activity properties - Handle empty and non-empty chedBrs collections - Validate method's JSON return value

Dependencies & Called Services - Summary: Uses data conversion and model interfaces for processing. - Data conversion utilities, Enumerable collections, Actor model interface, Risk model interface, String operations - Process model interface

UpdateCluster

Summary: UpdateCluster processes an HTTP POST request, converts and uses control activity ID, updates the cluster, and returns a JSON result.

JsonResult ProcessController.UpdateCluster()

Routing

  • HTTP: POST
  • URL: /Process/UpdateCluster

Cross-layer call chain - ProcessController.UpdateCluster → 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"]
    ProcessController_UpdateCluster["ProcessController.UpdateCluster"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_UpdateCluster --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: UpdateCluster processes an HTTP POST request - updates the cluster - and returns a JSON result. - Call ProcessMapModel.UpdateCluster with string ID and cluster data - Return JsonResult indicating update outcome

Error Flows - Summary: UpdateCluster fails without validation or error handling on input data. - Missing or invalid control activity ID causes unhandled exception

Security Issues - Summary: UpdateCluster uses unvalidated form data - Use of unvalidated form data

Performance Issues - Summary: No performance issues identified in UpdateCluster method.

Maintainability Issues - Summary: Tight coupling between ProcessController and ProcessMapModel reduces flexibility and complicates testing. - Tight coupling between ProcessController and ProcessMapModel, Reduced flexibility, Complicated testing and future changes

UX Impact Notes - Summary: JsonResult response influences user flow based on client-side handling. - JsonResult response affects user flow, Client-side processing determines UX impact

Test Case Ideas - Summary: Verify UpdateCluster handles HTTP POST requests - validates inputs - and returns JsonResult. - Handle missing or invalid control activity ID - Handle missing or empty cluster data - Invoke UpdateCluster on HTTP POST request - Call UpdateCluster with correct parameters from request form - Return JsonResult on success

Dependencies & Called Services - Summary: UpdateCluster converts integer values using IProcessModel. - Convert integer values, Use IProcessModel interface

SaveProductVolumeDecisionVolFormula

Summary: Process form data to update product activities, recalculate volumes, save configurations, and log operations.

JsonResult ProcessController.SaveProductVolumeDecisionVolFormula()

Routing

  • HTTP: POST
  • URL: /Process/SaveProductVolumeDecisionVolFormula

Cross-layer call chain - ProcessController.SaveProductVolumeDecisionVolFormula → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.SaveProductVolumeDecisionVolFormula → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.SaveProductVolumeDecisionVolFormula → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - ProcessController.SaveProductVolumeDecisionVolFormula → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - 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_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_SaveProductVolumeDecisionVolFormula["ProcessController.SaveProductVolumeDecisionVolFormula"]
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_SaveProductVolumeDecisionVolFormula --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - Summary: Process form data to update product activities - and log operations. - Extract project and activity IDs and initialize update collections - Bulk update product activities by product ID - Recalculate volumes and update next project stage - Save configuration details and log the operation - Return success JSON response - Update volume formulas and process properties from form inputs

Error Flows - Summary: Handle null product details and prevent unhandled exceptions from invalid user input conversions. - Return JSON with IsSuccess false if product details are null

Security Issues - and JSON deserialization attacks due to unvalidated user input. - JSON deserialization vulnerabilities from unvalidated JSON fields - Typo in return statement causing potential unexpected behavior

Performance Issues - Summary: Optimize LINQ queries and database calls to improve performance on large datasets. - Multiple unoptimized database calls for volume updates and configuration saves

Maintainability Issues - Summary: The method suffers from poor naming, magic strings, complex queries, and tight class coupling. - Use of magic strings reduces readability and maintainability, Non-descriptive variable names hinder code understanding, Incomplete and commented-out code decreases clarity, Complex LINQ queries with anonymous types complicate debugging, Unnecessary ternary operators and inconsistent naming increase complexity, Tight coupling with ProcessMapModel and Registry classes limits modularity and testing

UX Impact Notes - Summary: Provide clear success/failure feedback and validate inputs to prevent errors and privacy issues. - Handle input validation to avoid exceptions - Return JSON responses with IsSuccess flags for user feedback - Ensure proper logging to protect user privacy - Validate selected product IDs and JSON inputs to prevent errors

Test Case Ideas - bulk updates - Handle empty and non-empty collections for activities and arrows - Update volume formulas and out process properties accurately - Verify bulk update logic with multiple product activity groups - Propagate updates to all specified successor activities

Dependencies & Called Services - Summary: Utilizes system types, collections, logging, math, and process-related models and extensions. - LoggingManager for logging - Process and ProcessExtensions for process handling - System types: DateTime, Enum, Int32, String, Collections: List, Enumerable, Math utilities, Interfaces: IControlModel, IProcessModel

FormsAndBRMapping

Summary: Retrieve project data, process activities and properties, then map forms to business rules.

ActionResult ProcessController.FormsAndBRMapping()

Routing

  • HTTP: GET
  • URL: /Process/FormsAndBRMapping

Cross-layer call chain - ProcessController.FormsAndBRMapping → Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData - ProcessController.FormsAndBRMapping → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProcessController.FormsAndBRMapping → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.FormsAndBRMapping → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_FormsAndBRMapping["ProcessController.FormsAndBRMapping"]
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_FormsAndBRMapping --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: FormsAndBRMapping (Andromeda.Web\Views\Process\FormsAndBRMapping.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve project data, process activities and properties, then map forms to business rules. - Create distinct lists of forms and business rules - Fetch project arrows, activity properties, product factors, and XML - Redirect to ProcessCreation if no activities found - Retrieve current project ID and activities, Filter properties for business rules, DOE, forms, and product forms, Map forms to business rules, Initialize and populate form and business rule dictionaries

Error Flows - Summary: Handle empty activities and prevent exceptions from unsafe data access. - Avoid exceptions by checking for null before using First() on mapped data - Redirect to 'ProcessCreation' if activities collection is empty or condition equals zero

Performance Issues - Summary: Inefficient collection operations and string handling degrade performance and increase memory use. - ToList) on large datasets or in loops

Maintainability Issues - Summary: The method contains unclear code, magic strings, poor naming, incomplete snippets, and redundant code reducing maintainability. - Incomplete and malformed code snippets, Use of magic strings instead of constants or enums, Non-descriptive and typo-prone variable names, Complex LINQ queries and anonymous objects without comments, Undefined or unclear methods and incomplete calls, Repeated string operations and case-insensitive comparisons without constants, Redundant code and unused variables, Lack of context and truncated code lines

UX Impact Notes - Summary: Redirects and data processing affect user workflow and UI responsiveness. - Multiple data retrievals and complex LINQ cause performance delays, Debugging calls impact performance and must be removed in production - Processed data in ViewData affects UI content and interaction - Redirect interrupts user workflow when no activities found

Test Case Ideas - Summary: Verify correct data retrieval, filtering, mapping, and robust handling of forms and business rules. - Call GetActivities with correct project ID and verify returned activities - Iterate over distinct forms and handle large collections efficiently - Ensure debugging or logging calls do not impact production behavior - Handle empty activities collection and redirect to ProcessCreation - Handle incomplete or malformed data to ensure method robustness - Process activities collections with single and multiple elements, Process strings with '^' character, including splitting and integer parsing

Dependencies & Called Services - Summary: Uses collections, data types, interfaces, and domain-specific mappings for form and process handling. - Array, Dictionary, Enum, Enumerable, List, Int32, String, IControlModel interface, IProcessModel interface, LinqExtensions, ProductFormBRMapping, Project - ProcessExtensions

FormsBRMapping

Summary: Retrieve and process project data, perform clustering, and filter business rules and activities for mapping.

ActionResult ProcessController.FormsBRMapping()

Routing

  • HTTP: GET
  • URL: /Process/FormsBRMapping

Cross-layer call chain - ProcessController.FormsBRMapping → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProcessController.FormsBRMapping → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProcessController_FormsBRMapping["ProcessController.FormsBRMapping"]
    ProcessController_FormsBRMapping --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_FormsBRMapping --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
View Metadata
  • View: FormsBRMapping (Andromeda.Web\Views\Process\FormsBRMapping.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and process project data, perform clustering, and filter business rules and activities for mapping. - Execute cluster analysis and setup K-means data

Error Flows - Summary: The method lacks explicit exception handling and contains incomplete code risking runtime errors. - Absence of explicit exception handling, Incomplete or malformed code risking runtime errors, Undefined error flows due to missing error management

Security Issues - Summary: Unsanitized user input risks SQL injection in LINQ queries. - Unsanitized user input in LINQ queries, SQL injection vulnerability

Performance Issues - Summary: Loops and collection operations cause high computational and memory overhead. - Distinct() and OrderBy() on large datasets are performance-intensive

Maintainability Issues - Summary: High complexity, unclear code, and poor naming reduce maintainability and increase bugs. - Use of bitwise AND operator instead of logical AND

UX Impact Notes - Summary: Filtered forms limit UI options; detailed ViewData collections affect UI presentation. - Filtered master forms limit UI options, Detailed ViewData collections influence UI presentation

Test Case Ideas - ViewData setup - filtering logic - Handle incomplete or malformed code without runtime errors - Setup ViewData for K-means clustering and cluster analysis - Ensure magic numbers align with business logic

Dependencies & Called Services - Summary: Uses collections, LINQ, and domain-specific models for data processing. - Array operations, Enumerable collections, List collections, LINQ extensions, String manipulation, IActorModel interface, IControlModel interface, IFinalPlanModel interface, IProcessModel interface, Project domain model

Forms

Summary: Retrieve and process project data, transform activities, manage forms, and prepare ViewData for rendering with conditional redirection.

ActionResult ProcessController.Forms()

Routing

  • HTTP: GET
  • URL: /Process/Forms

Cross-layer call chain - ProcessController.Forms → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.Forms → Andromeda.Core.Entities.Activity.TotalEffort - ProcessController.Forms → Andromeda.Core.Entities.MIPrediction.GetConfidence

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_MIPrediction_GetConfidence["Andromeda.Core.Entities.MIPrediction.GetConfidence"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_Forms["ProcessController.Forms"]
    ProcessController_Forms --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_Forms --> Andromeda_Core_Entities_MIPrediction_GetConfidence
    ProcessController_Forms --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: Forms (Andromeda.Web\Views\Process\Forms.cshtml)
Detailed Analysis

Key Flows - and prepare ViewData for rendering with conditional redirection. - Fetch and process arrows, activity properties, product factors, and form-business rule mappings - Conditionally redirect to ProcessCreation action via function y() - Populate ViewData with processed datasets for the view

Error Flows - Summary: Fix syntax errors and prevent null reference exceptions in form data handling. - Null reference exceptions from unchecked properties or mappedData

Performance Issues - Summary: Optimize data retrieval and string operations to reduce memory use and improve performance. - Use of ToList() on large result sets causes high memory allocations

Maintainability Issues - Summary: Static calls, complex queries, and unclear code reduce maintainability and testability. - Static call to Registry.CurrentProjectId hinders testing and maintenance, Syntactically incorrect and incomplete code reduces reliability, Complex LINQ queries and anonymous types increase complexity and reduce readability, Magic strings and hardcoded arrays complicate future modifications, Commented out and incomplete code indicates unfinished work, Tight coupling with ViewData and data sources reduces modularity, Unclear or incomplete variable and type declarations hinder understanding, Non-descriptive variable names reduce code clarity

UX Impact Notes - Summary: Conditional redirect and view data setup affect user navigation and display. - Conditional redirect to 'ProcessCreation' page - ViewData property setup

Test Case Ideas - conditional redirects - Handle empty activities result set - Handle incomplete or incorrect code paths to prevent compilation errors - Redirect to ProcessCreation based on y() result - Set IsAnyoneAccReviewed flag based on review data - Retrieve and assign master temporary data and current stage configuration

Dependencies & Called Services - Summary: Uses core collections, interfaces, models, and extensions for service operations. - ILoginModel

BusinessRules

Summary: Retrieve project data, process business rules and automation paths, then prepare data and flags for the view.

ActionResult ProcessController.BusinessRules()

Routing

  • HTTP: GET
  • URL: /Process/BusinessRules

Cross-layer call chain - ProcessController.BusinessRules → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.BusinessRules → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProcessController.BusinessRules → Andromeda.Core.Entities.Project.GetTags - ProcessController.BusinessRules → Andromeda.Core.Entities.MIPrediction.GetConfidence

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_MIPrediction_GetConfidence["Andromeda.Core.Entities.MIPrediction.GetConfidence"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_BusinessRules["ProcessController.BusinessRules"]
    ProcessController_BusinessRules --> Andromeda_Core_Entities_MIPrediction_GetConfidence
    ProcessController_BusinessRules --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_BusinessRules --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_BusinessRules --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: BusinessRules (Andromeda.Web\Views\Process\BusinessRules.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve project data, process business rules and automation paths, then prepare data and flags for the view. - Fetch business rules master data, forms, and product form mappings - Process activities and apply business rules logic via automation paths - Redirect to ProcessCreation if no activities found - Assign processed data to ViewData for activities - Set account review status flags and retrieve master temporary business rules data

Error Flows - Summary: Handle empty activities by redirecting and prevent null reference exceptions. - Prevent null reference exceptions from session data or constants, Avoid compilation errors from incomplete code snippets - Redirect to ProcessCreation if activities collection is empty

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

Performance Issues - Summary: Excessive LINQ calls and nested loops degrade performance on large datasets. - Multiple LINQ calls on large datasets

Maintainability Issues - Summary: Code uses unclear names, magic numbers, syntax errors, and inconsistent patterns reducing maintainability. - Use of magic numbers without named constants, Anonymous types in collections reduce clarity, Non-descriptive variable names, Commented-out code and empty blocks reduce readability, Syntax errors indicating poor code quality, Use of undefined or unclear non-standard methods, Repeated access to Registry.CurrentProject without local caching

UX Impact Notes - Summary: Redirects and data assignments affect user flow and interface visibility. - Assign activities - Conditional returns and review status flags control user interaction - Redirect to ProcessCreation when no activities found

Test Case Ideas - Summary: Verify correct data retrieval, processing, filtering, state management, and performance in BusinessRules method. - Handle session data retrieval and storage in ViewData including UndoBRData - and handle distinct business rules - Retrieve and assign project review status and related ViewData entries - Set and use flags like eAccReviewed and IsAnyoneAccReviewed - Ensure efficient handling of large datasets without performance loss

Dependencies & Called Services - Summary: Uses collections, models, extensions, and core types for business rule processing. - ILoginModel - ProcessExtensions

InsertActivityForms

Summary: Extract and convert activity form data from the POST request, then set activity properties in the control model.

JsonResult ProcessController.InsertActivityForms()

Routing

  • HTTP: POST
  • URL: /Process/InsertActivityForms
Detailed Analysis

Key Flows - then set activity properties in the control model. - Create and populate ActivityProperty objects from form collections - Set activity properties via control model's SetActivityProperties method

Error Flows - Summary: Handle invalid input and missing form data to prevent runtime exceptions. - Exceptions from unvalidated integer conversion of activity IDs and form keys

Security Issues - Summary: Lack of validation and sanitization of form data risks injection attacks. - Use of dynamic typing without input validation, Direct use of Request.Form data without sanitization, Risk of injection attacks including XSS and SQL injection

Performance Issues - Summary: Inefficient LINQ usage and repeated object creation degrade performance on large datasets. - Inefficient LINQ Select for ID string conversion, Repeated creation of ActivityProperty objects in large collections

Maintainability Issues - Summary: Magic strings and tight coupling reduce code readability, modularity, and testability. - Use of magic strings reduces readability and maintainability, Tight coupling with Registry and Andromeda.Core.Entities reduces modularity and testability, Incomplete code snippets hinder understanding and maintenance

Test Case Ideas - Summary: Validate request decoding - Populate and pass ActivityProperty objects to SetActivityProperties - Handle incomplete or malformed code statements gracefully - Process empty and large actForm collections for performance and correctness

Dependencies & Called Services - Summary: Uses data conversion and collection interfaces for processing control and process models. - Data conversion utilities, Enumeration and collection interfaces, Control model interface, String manipulation - Process model interface

InsertBusinessRulesForTags

Summary: Process request form differently based on presence of 'BRs' key.

JsonResult ProcessController.InsertBusinessRulesForTags()

Routing

  • HTTP: POST
  • URL: /Process/InsertBusinessRulesForTags
Detailed Analysis

Key Flows - Summary: Process request form differently based on presence of 'BRs' key. - Handle presence of 'BRs' key in request form

Error Flows - Summary: Handle null references and JSON deserialization errors in InsertBusinessRulesForTags. - Null reference exception from missing Request.Form or keys, JSON deserialization failure from invalid JSON in Request.Form['B'], Null reference exception from null edInUser object accessing UserN property

Security Issues - Summary: Deserializing untrusted JSON input from Request.Form['B'] causes security risk. - JSON deserialization of untrusted input, Potential remote code execution vulnerability

Performance Issues - Summary: Large collection iteration and repeated integer conversions degrade performance. - Inefficient iteration over large PreActivit collection, Repeated Convert.ToInt32 calls during activity property creation

Maintainability Issues - Summary: Improve code clarity and prevent errors by using constants, descriptive names, and complete statements. - Incomplete and truncated code reduces clarity and maintainability, Use constants instead of magic strings for keys and identifiers, Use descriptive variable names instead of vague ones like 'PreActivityForms', Complete all conditional statements to avoid compilation errors and unexpected behavior

Test Case Ideas - and conditional logic in InsertBusinessRulesForTags. - Handle presence and absence of 'BRs' key in Request.Form - Process empty and non-empty yForms collections - Return JsonResult - Validate Json call with diverse inputs

Dependencies & Called Services - Summary: Uses data conversion and collection interfaces for processing business rules. - Data conversion utilities, Enumeration handling, Collection interfaces, String manipulation - Process model interface

RenamePropeties

Summary: RenameProperties processes valid form data by iterating PropData and renaming each property via ProcessMapModel.

JsonResult ProcessController.RenamePropeties()

Routing

  • HTTP: POST
  • URL: /Process/RenamePropeties

Cross-layer call chain - ProcessController.RenamePropeties → Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData - ProcessController.RenamePropeties → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_RenamePropeties["ProcessController.RenamePropeties"]
    ProcessController_RenamePropeties --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
    ProcessController_RenamePropeties --> Andromeda_Core_Entities_Project_GetTags
Detailed Analysis

Key Flows - Summary: RenameProperties processes valid form data by iterating PropData and renaming each property via ProcessMapModel. - Receive valid form data, Iterate over PropData, Call ProcessMapModel.RenamePropertyValue for each property

Error Flows - Summary: Handle null or missing Request.Form data to prevent exceptions. - Null reference exceptions from missing 'Product', 'Form', or 'SubScreen' in Request.Form, Lack of explicit handling for invalid or missing request form data

Security Issues - Summary: Direct use of unsanitized input risks SQL injection and data tampering. - Use of Request.Form data without validation or sanitization, Unsanitized ProjectId or property values in RenamePropertyValue

Performance Issues - Summary: Multiple database queries and repeated string comparisons degrade RenameProperties performance. - Multiple database queries for project properties, master data, and tags, Repeated string comparisons using InvariantCultureIgnoreCase, Inefficient use of ToList() and GroupBy() in inactive code

Maintainability Issues - Summary: Tight coupling and unclear code reduce maintainability and increase error risk. - Tight coupling between controller and models hinders independent modification, Use named constants instead of magic strings for clarity, Remove commented-out code to improve readability, Fix incomplete and truncated code snippets, Correct misspelled variable and method names to prevent errors

UX Impact Notes - Summary: Renaming properties may indirectly affect user-facing data without changing user flows. - No direct impact on user flows, Potential indirect effects on user-facing data

Test Case Ideas - Summary: Verify RenameProperties handles input variations - Return expected JsonResult for valid request data - Conditional logic with 'ptype' equal and not equal to 'Forms' - Performance with large PropData sets

Dependencies & Called Services - Summary: RenameProperties method depends on data conversion, enumeration, control and process models, and domain entities. - Data conversion utilities, Enumeration types, Enumerable collections, Control model interfaces, Domain entity mappings, Project domain objects, String manipulation - Process model interfaces

SaveModeAndForms

Summary: Process form data to update activity properties and arrow modes, then return a JSON response.

JsonResult ProcessController.SaveModeAndForms()

Routing

  • HTTP: POST
  • URL: /Process/SaveModeAndForms
Detailed Analysis

Key Flows - Summary: Process form data to update activity properties and arrow modes - then return a JSON response. - Decode and update arrow modes from JSON form data - Set activity properties on control models - Return JSON response with key variable strings

Error Flows - Summary: Handle integer conversion and JSON deserialization errors with null checks. - Integer conversion errors for 'Predecessor' and 'Successor' form values, JSON deserialization failures from invalid or malicious input, Null reference exceptions from missing or null form values, Lack of validation before converting 'arr.Predecessor' and 'arr.Successor' to integers

Security Issues - Summary: Prevent JSON deserialization attacks from untrusted form data. - JSON deserialization vulnerability from untrusted form fields, Risk of malicious data in 'ArrowMod' and other JSON inputs

Performance Issues - Summary: Repeated integer conversions and large collection iterations degrade performance. - Repeated Convert.ToInt32 calls in loops, Large collection iterations over 'arro', 'wModes', 'ctivityForms', 'PreActivityForms', 'SucActivityForms', Performance impact from adding activity properties in large loops

Maintainability Issues - Summary: Replace magic strings with constants and fix incomplete code for better maintainability. - Replace magic strings with constants, Fix incomplete or truncated variable names and code snippets, Complete method calls to avoid compilation errors, Use explicit, type-safe conversions - Validate data types before conversions

UX Impact Notes - Summary: Invalid inputs and null references cause errors and degrade user experience. - User input validation issues with ArrowModes and form values, Null reference exceptions from missing form values

Test Case Ideas - Summary: Validate integer conversions - Handle invalid integer conversion for arr.Predecessor and arr.Successor - Correct UpdateArrowMode calls for each wModes item - Call SetActivityProperties with correct control model parameters

Dependencies & Called Services - Summary: Uses data conversion, enumeration, collections, and control and process models. - Data conversion, Enumeration handling, Collection management, Control model interface - Process model interface

InsertActivityBRules

Summary: InsertActivityBRules processes activity properties or handles empty activity forms.

JsonResult ProcessController.InsertActivityBRules()

Routing

  • HTTP: POST
  • URL: /Process/InsertActivityBRules
Detailed Analysis

Key Flows - Summary: InsertActivityBRules processes activity properties or handles empty activity forms. - Handle empty actForm collection - Process activity properties from actForm

Error Flows - Summary: Handle JSON deserialization errors and invalid integer conversions from request data. - JSON deserialization failure from invalid request form data, Exceptions from Convert.ToInt32 on invalid integer inputs, Malformed or missing Request.Form data causing unclear behavior

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

Performance Issues - Summary: Optimize string concatenation, collection iteration, and repeated conversions for better performance. - Inefficient string.Join on large activity ID collections, Performance degradation iterating large 'actForm' collections, Repeated Convert.ToInt32 calls inside loops

Maintainability Issues - Summary: Improve code clarity and testability by removing magic strings and tight coupling. - Use of magic strings reduces code clarity and maintainability, Non-descriptive variable names hinder code understanding, Lack of comments decreases readability and maintainability, Tight coupling with Registry and Request objects complicates testing and maintenance

UX Impact Notes - Summary: Bookmark handling tracks user interactions but lacks clear UX impact. - Bookmark handling via BookMarkDetailsUsersLevel, User interaction tracking

Test Case Ideas - handles empty input - and calls SetActivityProperties correctly. - Call SetActivityProperties with correct parameters - Assign 'Id' value as 'BusinessR' - Handle empty 'actForm' collection without processing - Process valid JSON data in request form

Dependencies & Called Services - Summary: Uses data conversion, collection handling, and model interfaces for processing. - Data conversion utilities, Enumeration and collection interfaces, Control and process model interfaces, String manipulation

InsertProductFormMapping

Summary: Processes POST form data and returns a JSON response.

JsonResult ProcessController.InsertProductFormMapping()

Routing

  • HTTP: POST
  • URL: /Process/InsertProductFormMapping
Detailed Analysis

Key Flows - Summary: Processes POST form data and returns a JSON response. - Return JsonResult response

Error Flows - Summary: Handle missing 'SubScreen' key and add explicit exception handling. - Lack of explicit exception handling allows runtime errors to propagate unhandled

Security Issues - Summary: Using Request.Form data without validation risks SQL injection and XSS attacks. - Unvalidated Request.Form data

Maintainability Issues - Summary: The method's tight coupling and magic string usage reduce maintainability and testability. - Tight coupling with Registry and Request objects, Use of magic string 'PRODUCT' instead of named constant

UX Impact Notes - Summary: Provides asynchronous JSON feedback on HTTP POST requests, enhancing user experience. - Asynchronous JSON response, HTTP POST request handling, Improved user feedback

Test Case Ideas - Summary: Verify InsertProductFormMapping handles POST requests and returns correct JsonResult. - Return successful JsonResult response - Handle HTTP POST requests correctly

Dependencies & Called Services - Summary: Uses Convert, Enum, and IProcessModel for data transformation and process handling. - Convert for data conversion, Enum for enumeration handling, IProcessModel for process management

ImportProcessmap

Summary: ImportProcessmap handles various file types by saving, validating, processing data, updating project status, and returning appropriate responses.

JsonResult ProcessController.ImportProcessmap(HttpPostedFileBase file, HttpPostedFileBase datafile, bool? IsDuplicateActorMerge)

Routing

  • HTTP: POST
  • URL: /Process/ImportProcessmap

Cross-layer call chain - ProcessController.ImportProcessmap → Andromeda.Core.Utility.Compress.UnzipFolder - ProcessController.ImportProcessmap → Andromeda.Core.LoggingManager.Exception - ProcessController.ImportProcessmap → Andromeda.Core.Services.Registry.setProjectDetails - ProcessController.ImportProcessmap → Andromeda.Core.Utility.Encrypt.DecryptString - ProcessController.ImportProcessmap → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Compress_UnzipFolder["Andromeda.Core.Utility.Compress.UnzipFolder"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProcessController_ImportProcessmap["ProcessController.ImportProcessmap"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_ImportProcessmap --> Andromeda_Core_LoggingManager_Error
    ProcessController_ImportProcessmap --> Andromeda_Core_LoggingManager_Exception
    ProcessController_ImportProcessmap --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_ImportProcessmap --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_ImportProcessmap --> Andromeda_Core_Utility_Encrypt_DecryptString
Detailed Analysis

Key Flows - Summary: ImportProcessmap handles various file types by saving - and returning appropriate responses. - Handle Excel data file imports by saving - validate Visio or BPMN - update project status - return success response - .json) to determine import logic

Error Flows - Summary: Return JSON errors for invalid files - Version check failure - Visio validation failure or COM errors with logging - and returned as JSON errors

Security Issues - Summary: Store sensitive data securely and validate file types beyond extensions. - Insecure storage of sensitive data in session variables, File extension spoofing due to extension-only file type validation

Performance Issues - Summary: Optimize configuration access, file operations, LINQ usage, decryption, and resource management for better performance. - Repeated ConfigurationManager.AppSettings access impacts performance

Maintainability Issues - Summary: The method suffers from inconsistent naming, duplicated code, unclear structure, and syntax errors. - Duplicated code for AcceptTypes checks and JSON responses

UX Impact Notes - Summary: The import process provides error feedback and redirects but suffers from session issues - Clear error messages for invalid files, duplicate actors, and version mismatches, Session variable mismanagement risks poor user experience, Long operations like unzipping delay responses, Error messages instruct users to contact admins, causing frustration, Inconsistent use of plain text instead of JSON for errors, Hardcoded, non-localized error messages reduce usability across locales - Redirects to specific URLs based on validation outcomes

Test Case Ideas - redirects - Session variable setting and removal - Redirect logic based on validation and AcceptTypes header

Dependencies & Called Services - Summary: ImportProcessmap uses file handling, XML processing, encryption, logging, and project model interfaces. - File handling utilities, XML processing classes, Encryption services, Project model interfaces, Data compression, Data conversion, Directory management, HTTP file upload handling, Change detection interface, Registry access, Stream reading, Enumerable collections, Primitive data types - Logging management - Process management

UpdataExcelData

Summary: The method processes Excel data to update activity details, calculate timing metrics, and perform bulk updates on handling times.

void ProcessController.UpdataExcelData(int ProjectId, string datafilePath, List<AllSheetsColumns> mappedColumns, List<ShapeInfo> shapeInfos)

Routing

  • URL: /Process/UpdataExcelData

Cross-layer call chain - ProcessController.UpdataExcelData → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - ProcessController.UpdataExcelData → Andromeda.Core.Services.ExcelGenerator.CellReferenceToIndex

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_ExcelGenerator_CellReferenceToIndex["Andromeda.Core.Services.ExcelGenerator.CellReferenceToIndex"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    ProcessController_UpdataExcelData["ProcessController.UpdataExcelData"]
    ProcessController_UpdataExcelData --> Andromeda_Core_Services_ExcelGenerator_CellReferenceToIndex
    ProcessController_UpdataExcelData --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
Detailed Analysis

Key Flows - Summary: The method processes Excel data to update activity details - and perform bulk updates on handling times. - Calculate hour differences between activities and update actor arrows with wait times and time of day - Create DataTable with columns from mappedColumns - Perform bulk updates for average handling times if changes exist - Update activity product and volume

Error Flows - Summary: Handle exceptions explicitly and validate DateTime parsing to prevent silent failures. - Silent exception handling with empty catch blocks - No logging or rethrowing of exceptions

Security Issues - Summary: InvariantCulture comparisons cause culture-sensitive security risks. - Use of StringComparison.InvariantCulture causing culture-sensitive comparison issues

Performance Issues - Summary: Optimize nested LINQ, repeated FirstOrDefault calls, and large data handling to improve performance. - ToList() and ToArray() on large datasets increase memory usage

Maintainability Issues - Summary: Fix naming errors, remove magic strings, simplify complex code, and improve error handling. - Empty catch blocks hinder debugging

UX Impact Notes - Summary: Silent exception handling hides errors, causing unexpected behavior and data corruption. - Silent exception handling, Hidden errors, Unexpected behavior, Data corruption risk, Lack of user notification

Test Case Ideas - Summary: Test data handling, filtering, matching, calculations, updates, and performance under varied conditions. - Iterating Excel rows with empty and large datasets - Bulk update calls with empty and non-empty AhtUpdates - String comparisons across cultural settings

Dependencies & Called Services - Summary: Uses data structures, Excel generation, and basic system types for processing and exporting data. - Data structures: DataColumnCollection, DataRow, DataRowCollection, DataTable, List, Excel generation: ExcelGenerator, Data processing interfaces: IProcessModel, System types: DateTime, TimeSpan, Double, String, Utility classes: Convert, Enumerable, Math

SaveTeamsInOutScope

Summary: SaveTeamsInOutScope updates teams and either saves configuration and redirects or completes without saving if 'NextStage' is missing.

JsonResult ProcessController.SaveTeamsInOutScope()

Routing

  • HTTP: POST
  • URL: /Process/SaveTeamsInOutScope
Detailed Analysis

Key Flows - Summary: SaveTeamsInOutScope updates teams and either saves configuration and redirects or completes without saving if 'NextStage' is missing. - Skip saving and redirect if 'NextStage' field is absent - Update teams

Error Flows - Summary: Handle JSON deserialization errors and validate 'NextStage' integer conversion. - Unvalidated 'NextStage' form value conversion causes runtime errors

Security Issues - Summary: Prevent JSON deserialization and SQL injection vulnerabilities from unvalidated user input. - SQL injection risk from unvalidated Request.Form['NextStage'] integer conversion

Performance Issues - Summary: GetActors method causes performance issues when retrieving large data sets. - GetActors method performance degradation with large data retrieval

Maintainability Issues - Summary: Replace magic strings with constants and complete missing method implementations. - Use constants instead of magic strings for request form keys and configuration names, Complete implementation of SaveConfigurationDetails method and ToInt32 usage

UX Impact Notes - Summary: Including 'NextStage' triggers saving configuration and redirects user to next workflow stage. - 'NextStage' triggers user redirection

Test Case Ideas - team updates - and redirection logic. - Call UpdateTeamsInOutScope with correct parameters - Redirect to next stage correctly

Dependencies & Called Services - Summary: Uses Convert and interfaces IActorModel and IProcessModel for data handling. - Convert utility, IActorModel interface, IProcessModel interface

SaveMilestoneUndesired

Summary: Update project review and milestone status, save configuration, then return JSON response.

JsonResult ProcessController.SaveMilestoneUndesired()

Routing

  • HTTP: POST
  • URL: /Process/SaveMilestoneUndesired
Detailed Analysis

Key Flows - Summary: Update project review and milestone status - then return JSON response. - Return JSON response - Update project review and milestone status

Error Flows - Summary: Handle missing or invalid form data and null values to prevent runtime errors. - Null MilestoneUndesired.IsUndesired preventing status update

Security Issues - Summary: Directly decoding and converting Request.Form data risks injection and tampering. - JSON deserialization vulnerability from unvalidated Request.Form['Data'] - SQL injection and data tampering risk from unvalidated Request.Form conversions

Performance Issues - Summary: Sequential method calls in SaveMilestoneUndesired degrade performance without optimization. - Unoptimized UpdateIsReviewedStatus - Unoptimized UpdateMilestone

Maintainability Issues - Summary: Remove magic strings, unused variables, and incomplete code to improve maintainability. - Use of magic strings reduces readability and maintainability, Hardcoded values decrease code flexibility, Incomplete code snippets cause compilation errors, Unused variables increase technical debt, Lack of input validation raises maintenance risks

UX Impact Notes - Summary: Errors saving milestone status disrupt user workflows. - Errors updating milestone status, Errors saving configuration, Disruption of user workflows

Test Case Ideas - Summary: Verify SaveMilestoneUndesired returns JsonResult and correctly updates undesired status using valid input. - Return JsonResult - Update undesired status with valid JSON data from Request.Form['Data']

Dependencies & Called Services - Summary: Uses Convert, Enum, and IProcessModel for data transformation and process handling. - Convert for data conversion, Enum for enumeration handling, IProcessModel for process management

GetSinkAndsourceVolume

Summary: Extracts data from models to calculate volumes, consolidates paths, and validates volumes with error reporting.

JsonResult ProcessController.GetSinkAndsourceVolume()

Routing

  • HTTP: GET
  • URL: /Process/GetSinkAndsourceVolume

Cross-layer call chain - ProcessController.GetSinkAndsourceVolume → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.GetSinkAndsourceVolume → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.GetSinkAndsourceVolume → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - ProcessController.GetSinkAndsourceVolume → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - 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_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_GetSinkAndsourceVolume["ProcessController.GetSinkAndsourceVolume"]
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_GetSinkAndsourceVolume --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - and validates volumes with error reporting. - Calculate root, sink, rework, and undesired volumes using aggregated data - Retrieve activities, arrows, and products from process and control models, Consolidate StartPaths by merging overlapping ends and starts, removing duplicates - Validate input and output volumes via actor model and report errors as anonymous objects

Error Flows - Summary: Handle null references - Null reference exceptions from StartPaths elements, Runtime errors from incomplete or incorrect code, Validation errors from actor model indicating volume inconsistencies

Security Issues - Summary: Incomplete code risks data exposure and lacks proper validation. - Incomplete code causing data exposure, Missing validation in empty code blocks

Performance Issues - Summary: Excessive LINQ operations and inefficient loops degrade performance on large datasets. - Excessive LINQ operations like GroupBy, Union, Select, Sum, ToList, Inefficient loops with missing increments causing infinite or excessive iterations, High memory use from ToList() and Distinct() on large collections, Repeated Max and Where calls inside loops reducing performance

Maintainability Issues - Summary: Simplify complex code, remove dead code, clarify conditions, and add comments for maintainability. - Complex code with many calculations reduces readability, Use of anonymous objects hinders understanding, Empty code blocks and unused variables indicate dead code, Unclear conditions reduce code clarity, Lack of comments impairs code comprehension

UX Impact Notes - Summary: Path consolidation and early returns affect UI display and user flow. - Early returns on zero volume activities affect user flow and displayed information

Test Case Ideas - Summary: Validate volume calculations - property updates - early returns - Early return on zero-volume activity

Dependencies & Called Services - Summary: Uses data types, collections, math functions, and process-related models and extensions. - Decimal data type, Enumerable collections, List collection, Math functions, IActorModel interface, IControlModel interface, IProcessModel interface - ProcessExtensions utilities

GetEffReworkEffort

Summary: Retrieve process data, calculate total and rework efforts, filter active actors, and return effort metrics in JSON.

JsonResult ProcessController.GetEffReworkEffort()

Routing

  • HTTP: GET
  • URL: /Process/GetEffReworkEffort

Cross-layer call chain - ProcessController.GetEffReworkEffort → Andromeda.Core.Entities.Activity.Effort - ProcessController.GetEffReworkEffort → Andromeda.Core.Entities.Activity.ReworkEffort

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Effort["Andromeda.Core.Entities.Activity.Effort"]
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    ProcessController_GetEffReworkEffort["ProcessController.GetEffReworkEffort"]
    ProcessController_GetEffReworkEffort --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetEffReworkEffort --> Andromeda_Core_Entities_Activity_ReworkEffort
Detailed Analysis

Key Flows - and return effort metrics in JSON. - Calculate total and rework efforts from activities - Return JSON with total effort

Performance Issues - Summary: Optimize database calls and LINQ operations to improve performance and reduce memory usage. - Use of ToList() on large datasets causing high memory usage - Inefficient LINQ Any() and dictionary lookups in Select() on large datasets

Maintainability Issues - Summary: Remove commented-out code, replace magic numbers, clarify anonymous types, and fix JSON property typo. - Commented-out code complicates maintenance, Magic numbers reduce code clarity, Anonymous types in LINQ hinder readability, Typo in JSON property name

UX Impact Notes - Summary: Returned effort metrics JSON affects user flows displaying project effort data. - Effort metrics JSON output, Influence on user flows displaying project effort data

Test Case Ideas - Summary: Verify correct effort calculations, actor filtering, and valid JSON output for various input scenarios. - Correct total and rework effort calculation, Handling projects with no activities or actors, Empty activity list effort calculation, Activities with zero and negative effort values, Filtering actors by IsActive status, Accurate minimum FTE calculation, Validation of transformed actor data properties, Verification of complete and valid JSON output

Dependencies & Called Services - Summary: Uses core system and domain-specific models for activity and process calculations. - Activity model, Enumerable utilities, Actor model interface, Math utilities - Process model interface

GetMinimumFTEandCycleTime

Summary: Calculate minimum FTE per actor and cycle time by processing activity data and loading schedule from CSV.

JsonResult ProcessController.GetMinimumFTEandCycleTime()

Routing

  • HTTP: GET
  • URL: /Process/GetMinimumFTEandCycleTime

Cross-layer call chain - ProcessController.GetMinimumFTEandCycleTime → Andromeda.Core.Entities.Activity.TotalEffort - ProcessController.GetMinimumFTEandCycleTime → Insorce.Helpers.Helpers.DaysConverter - Insorce.Helpers.Helpers.DaysConverter → Andromeda.Core.Extensions.LinqExtensions.DaysConverter

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Extensions_LinqExtensions_DaysConverter["Andromeda.Core.Extensions.LinqExtensions.DaysConverter"]
    Insorce_Helpers_Helpers_DaysConverter["Insorce.Helpers.Helpers.DaysConverter"]
    ProcessController_GetMinimumFTEandCycleTime["ProcessController.GetMinimumFTEandCycleTime"]
    Insorce_Helpers_Helpers_DaysConverter --> Andromeda_Core_Extensions_LinqExtensions_DaysConverter
    ProcessController_GetMinimumFTEandCycleTime --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GetMinimumFTEandCycleTime --> Insorce_Helpers_Helpers_DaysConverter
Detailed Analysis

Key Flows - Summary: Calculate minimum FTE per actor and cycle time by processing activity data and loading schedule from CSV. - update actor properties - Load schedule data from CSV based on project ID and config - Return minimum FTE and cycle time as JSON

Error Flows - and handle missing schedule data. - Handle empty or missing CSV schedule data - Null reference handling for missing team activities, Prevent division by zero in minimum FTE calculation

Security Issues - Summary: Validate file paths to prevent path traversal vulnerabilities. - Path traversal risk from unvalidated CSV file path construction using project ID and config

Performance Issues - Summary: Optimize database calls and collection operations to improve performance. - Performance impact from Any() on large schedule datasets

Maintainability Issues - Summary: Code contains unclear naming, magic values, commented-out code, and unclear method calls. - Commented-out code indicating incomplete functionality, Unclear, non-descriptive variable names, Magic numbers without named constants, Unclear method calls without context, Magic strings for file paths and config keys

UX Impact Notes - Summary: Returns JSON with minimum FTE and cycle time for project scheduling display. - JSON output with minimum FTE data, JSON output with cycle time data, Supports project scheduling display

Test Case Ideas - Summary: Verify correct data retrieval, calculations, and JSON output for valid inputs and edge cases. - Correct data return for valid project ID - Conditional logic with actor IDs - Returning expected JSON object structure

Dependencies & Called Services - Summary: Uses core system types and interfaces for activity processing and mathematical operations. - Activity handling, Enumerable data manipulation, Helper utilities, Actor and process model interfaces, Integer operations, Mathematical calculations

GetEffortReworkEffort

Summary: Retrieve project activities, calculate total and rework effort, and return results as JSON.

JsonResult ProcessController.GetEffortReworkEffort()

Routing

  • HTTP: GET
  • URL: /Process/GetEffortReworkEffort

Cross-layer call chain - ProcessController.GetEffortReworkEffort → Andromeda.Core.Entities.Activity.TotalEffort - ProcessController.GetEffortReworkEffort → Andromeda.Core.Entities.Activity.ReworkEffort

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    ProcessController_GetEffortReworkEffort["ProcessController.GetEffortReworkEffort"]
    ProcessController_GetEffortReworkEffort --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_GetEffortReworkEffort --> Andromeda_Core_Entities_Activity_TotalEffort
Detailed Analysis

Key Flows - and return results as JSON. - Fetch project activities and convert to list - Return zero effort JSON if no activities - Return effort values as JSON response

Error Flows - Summary: Fix null reference and syntax errors to ensure method compiles and handles null activities list. - Null reference exception from unchecked null activities list

Security Issues - Summary: No security issues found in the analyzed code sections.

Performance Issues - Summary: Fetching and summing large activity collections degrades performance. - Fetching and converting large activity collections to list in memory - Using LINQ Sum on large collections

Maintainability Issues - Summary: Fix syntax errors, clarify method name, and remove commented-out code. - Unclear method name reduces code clarity, Syntax error and incomplete conditional prevent compilation, Commented-out code indicates incomplete or abandoned functionality

UX Impact Notes - Summary: Users receive JSON responses with effort metrics or default zero values for UI updates. - JSON response with calculated effort values for UI updates

Test Case Ideas - Summary: Verify correct activity retrieval, effort calculations, JSON response, and conditional branches. - Correct activity retrieval by project ID, Handling empty activities list with zero-value JSON, Accurate total effort calculation, Accurate rework effort calculation, JSON response contains expected properties and values, Conditional branch handling for zero and non-zero activity counts

Dependencies & Called Services - Summary: Uses Activity for process tracking, Enumerable for collections, IProcessModel for process abstraction, and Math for calculations. - Activity for process tracking, Enumerable for collection operations, IProcessModel for process abstraction, Math for calculations

UpdateDOE

Summary: UpdateDOE checks for 'DataInputs' in the request form to trigger additional processing.

JsonResult ProcessController.UpdateDOE()

Routing

  • HTTP: POST
  • URL: /Process/UpdateDOE

Cross-layer call chain - ProcessController.UpdateDOE → Andromeda.Core.Extensions.LinqExtensions.DistinctBy

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_DistinctBy["Andromeda.Core.Extensions.LinqExtensions.DistinctBy"]
    ProcessController_UpdateDOE["ProcessController.UpdateDOE"]
    ProcessController_UpdateDOE --> Andromeda_Core_Extensions_LinqExtensions_DistinctBy
Detailed Analysis

Key Flows - Summary: UpdateDOE checks for 'DataInputs' in the request form to trigger additional processing. - Check 'DataInputs' presence in request form - Trigger additional processing based on 'DataInputs'

Error Flows - Summary: Handle invalid JSON in 'Activities' field to prevent runtime errors. - Invalid or missing JSON data handling in 'Activities' field, Incomplete or malformed code causing runtime errors

Security Issues - Summary: Direct JSON deserialization of request data risks injection attacks. - Direct JSON deserialization of request form data, Lack of input validation before deserialization

Performance Issues - Summary: Iterating and filtering large DOEList collections causes performance degradation. - Performance degradation iterating large DOEList without optimization or pagination, Costly use of DistinctBy and ToList on large collections

Maintainability Issues - Summary: Unclear variable names, unexplained magic numbers, and inconsistent syntax reduce maintainability. - Unclear and inconsistent variable names with typos, Unexplained magic number usage, Inappropriate syntax usage for language context, Incomplete and unclear variable declarations

Test Case Ideas - Summary: Verify UpdateDOE handles form data correctly - Create ActivityProperty objects with expected values - Handle missing or empty 'Activities' form data - Handle incomplete or malformed code statements - Call SetActivityProperties with correct distinct properties - Verify method return behavior and output from 'puts' call - Process presence and absence of 'DataInputs' in request form

Dependencies & Called Services - Summary: UpdateDOE uses data conversion - Data conversion utilities, Enumeration types, Enumerable collections, IControlModel interface, IProcessModel interface, LINQ extension methods, List collections, String operations

UpdateAllAnyMode

Summary: No key flows are defined for the UpdateAllAnyMode method.

JsonResult ProcessController.UpdateAllAnyMode()

Routing

  • HTTP: POST
  • URL: /Process/UpdateAllAnyMode
Detailed Analysis

Key Flows - Summary: No key flows are defined for the UpdateAllAnyMode method.

Error Flows - Summary: Handle JSON decoding errors - JSON decoding errors from invalid form data, Null reference exceptions from null Request.Form, Exceptions from invalid Convert.ToInt32 on 'StartCons'

Security Issues - Summary: UpdateAllAnyMode risks JSON deserialization - Missing CSRF protection due to commented out ValidateAntiForgeryToken attribute

Performance Issues - Summary: Excessive ToString() and Convert.ToString() calls degrade performance. - Multiple ToString() calls, Multiple Convert.ToString() calls, Minor performance overhead

Maintainability Issues - Summary: Replace magic strings with constants or enums to improve code maintainability. - Use constants or enums instead of magic strings like 'DataInputs' and 'Enrich', Incomplete code snippets reduce code clarity and maintainability

UX Impact Notes - Summary: The method's data validation and save outcome directly affect user flow and experience. - Dependence on presence and validity of form data, Impact of configuration save outcome on user experience

Test Case Ideas - Summary: Verify correct processing, method calls, and JSON response for various project IDs. - Correct calls to SaveStartConstraints and UpdateArrowMode

Dependencies & Called Services - Summary: Uses Convert, Enum, and IProcessModel for data transformation and process handling. - Convert for data conversion, Enum for enumeration handling, IProcessModel for process management

GetReworkLoopsInscopeOutscope

Summary: Retrieve project-related data, calculate metrics for in-scope and out-scope teams, and return results as JSON.

JsonResult ProcessController.GetReworkLoopsInscopeOutscope()

Routing

  • URL: /Process/GetReworkLoopsInscopeOutscope

Cross-layer call chain - ProcessController.GetReworkLoopsInscopeOutscope → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.GetReworkLoopsInscopeOutscope → Andromeda.Core.Entities.Arrow.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_GetReworkLoopsInscopeOutscope["ProcessController.GetReworkLoopsInscopeOutscope"]
    ProcessController_GetReworkLoopsInscopeOutscope --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_GetReworkLoopsInscopeOutscope --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - and return results as JSON. - Calculate milestones and undesired outcomes for in-scope and out-scope teams - Return calculated metrics as JSON

Performance Issues - Summary: Multiple LINQ queries degrade performance on large datasets. - Performance impact on large datasets

Maintainability Issues - Summary: Remove magic strings and ensure complete method implementation to improve maintainability. - Use constants instead of magic strings and hardcoded values, Provide complete method implementation to avoid compilation errors

UX Impact Notes - Summary: Returning JSON with key metrics improves dynamic project metric display. - Return JSON object with key metrics

Test Case Ideas - Summary: No test cases defined for GetReworkLoopsInscopeOutscope method.

Dependencies & Called Services - Summary: Uses collections and interfaces for process and control modeling. - Arrow library, Enumerable utilities, IActorModel interface, IControlModel interface, IProcessModel interface, List collection - ProcessExtensions utilities

GetRevisedMinFTE

Summary: Retrieve ProjectId, calculate revised minimum FTE cycle time, convert units, and return JSON response.

JsonResult ProcessController.GetRevisedMinFTE()

Routing

  • HTTP: GET
  • URL: /Process/GetRevisedMinFTE

Cross-layer call chain - ProcessController.GetRevisedMinFTE → Andromeda.Core.DataManager.ExecuteScalar - ProcessController.GetRevisedMinFTE → Insorce.Helpers.Helpers.DaysConverter - Insorce.Helpers.Helpers.DaysConverter → Andromeda.Core.Extensions.LinqExtensions.DaysConverter

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_ExecuteScalar["Andromeda.Core.DataManager.ExecuteScalar"]
    Andromeda_Core_Extensions_LinqExtensions_DaysConverter["Andromeda.Core.Extensions.LinqExtensions.DaysConverter"]
    Insorce_Helpers_Helpers_DaysConverter["Insorce.Helpers.Helpers.DaysConverter"]
    ProcessController_GetRevisedMinFTE["ProcessController.GetRevisedMinFTE"]
    Insorce_Helpers_Helpers_DaysConverter --> Andromeda_Core_Extensions_LinqExtensions_DaysConverter
    ProcessController_GetRevisedMinFTE --> Andromeda_Core_DataManager_ExecuteScalar
    ProcessController_GetRevisedMinFTE --> Insorce_Helpers_Helpers_DaysConverter
Detailed Analysis

Key Flows - and return JSON response. - Return cycle times in hours and days as JSON

UX Impact Notes - Summary: The method returns JSON requiring correct client-side parsing for smooth UX. - JSON response format, Client-side JSON parsing requirement, Maintains smooth user experience

Test Case Ideas - Summary: Verify GetRevisedMinFTE handles HTTP GET - converts and returns correct cycle times. - Handle HTTP GET request - Return correct cycle time in hours from ProcessMapModel.GetRevisedMinFTE

Dependencies & Called Services - Summary: Uses Helpers and IProcessModel services for processing. - Helpers service, IProcessModel interface

GetAllClusters

Summary: Retrieve project data, perform cluster analysis on activities by actor and team, and prepare aggregated cluster results for JSON response.

JsonResult ProcessController.GetAllClusters()

Routing

  • HTTP: GET
  • URL: /Process/GetAllClusters

Cross-layer call chain - ProcessController.GetAllClusters → Andromeda.Core.Services.KClusters.MinCluster

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_KClusters_MinCluster["Andromeda.Core.Services.KClusters.MinCluster"]
    ProcessController_GetAllClusters["ProcessController.GetAllClusters"]
    ProcessController_GetAllClusters --> Andromeda_Core_Services_KClusters_MinCluster
Detailed Analysis

Key Flows - Summary: Retrieve project data, perform cluster analysis on activities by actor and team, and prepare aggregated cluster results for JSON response. - Assign cluster ranks to activities from analysis results

Error Flows - Summary: Handle inactive or special teams and null collections to prevent errors. - Handle null or empty actors and activities collections to avoid exceptions - Return null for inactive

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

Performance Issues - Summary: Multiple inefficient database calls and collection operations degrade performance on large datasets. - Multiple lists and dictionaries created for large datasets

Maintainability Issues - Summary: Refactor GetAllClusters to improve naming, reduce magic values, and clarify complex code. - Replace magic string 'ProjectId' with named constant or enum, Decouple from specific activities collection and GroupBy implementation, Use descriptive, standard variable names instead of vague ones like 'a', 'aGrp', 'prods', Avoid anonymous types and overly complex LINQ queries for clarity, Define all variables explicitly and clarify their purpose, Complete and clarify all code snippets to provide full context

UX Impact Notes - Summary: Returning null for filtered teams harms user experience if unhandled. - Returning null for filtered teams - Potential negative user experience if unhandled

Test Case Ideas - conditional logic - Grouping correctness for varied activity sets

Dependencies & Called Services - Summary: Uses collections, math utilities, and actor/process/control models for cluster management. - Array operations, Collection conversions, Dictionary usage, Enumerable processing, Actor model interface, Control model interface, Cluster data structures, List operations, Mathematical functions - Process model interface

AHTEffortUpdate

Summary: Update AHT effort by processing form data, saving activity properties, and updating review status.

JsonResult ProcessController.AHTEffortUpdate()

Routing

  • HTTP: POST
  • URL: /Process/AHTEffortUpdate

Cross-layer call chain - ProcessController.AHTEffortUpdate → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_AHTEffortUpdate["ProcessController.AHTEffortUpdate"]
    ProcessController_AHTEffortUpdate --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Update AHT effort by processing form data - Process 'OutProcProps' form field if present - Retrieve current project ID and initialize update list - Add updated activity actor arrows to update list - Update and save out process properties for each activity - Update AHT effort reviewed status

Error Flows - Summary: Handle null references and malformed JSON in critical form fields to prevent errors. - Null reference exceptions from missing or null form fields, Invalid or malformed JSON in 'OutProcPro' field, Incomplete code causing unexpected behavior or errors

Security Issues - Summary: Prevent injection attacks by sanitizing inputs before JSON deserialization and database operations. - JSON deserialization vulnerability from unsanitized 'OutProcPro' form field, SQL injection and data tampering risks in SaveOutProcessProperties and SaveConfigurationDetails without input sanitization

Performance Issues - Summary: Excessive conversions and loops degrade performance with large data sets. - Multiple Convert.ToInt32 and Convert.ToString calls, Loops processing large activity collections

Maintainability Issues - Summary: Incomplete code, magic literals, unclear names, and deprecated methods reduce maintainability. - Incomplete or truncated code segments, Use of unexplained magic numbers, Use of magic strings instead of named constants, Non-descriptive variable names, Use of potentially deprecated methods like System.Web.Helpers.Json.Decode

UX Impact Notes - Summary: Updating bookmarks and saving configurations directly affect user navigation and workflow. - Bookmark updates affecting user navigation

Test Case Ideas - property updates - status updates - and return values. - Initialize UpdateAHTEffort list - Return expected activity ID values - Update process properties by activity type and frequency - Update UpdateAHTEffort list with new activity actor arrows - Update reviewed status correctly

Dependencies & Called Services - Summary: Uses utilities for data conversion, logging, and process management. - DateTime conversion, Enum handling, List operations - Logging management - Process model interface

ValidateExcelTemplate

Summary: ValidateExcelTemplate verifies the Excel file structure, processes and groups data into shapes and swimlanes, validates connections and controls, aggregates errors, and returns validation status.

bool ProcessController.ValidateExcelTemplate(string filepath, List<SwimlaneInfo> SwimLaneList, List<ShapeInfo> ShapeList, List<EdgeInfo> ArrowList, string ErrorMsg, List<VisioError> VisioErrors, List<string> ErrorList)

Routing

  • URL: /Process/ValidateExcelTemplate

Cross-layer call chain - ProcessController.ValidateExcelTemplate → Andromeda.Core.Services.ExcelGenerator.VerifyExcel - ProcessController.ValidateExcelTemplate → Andromeda.Core.Services.ExcelGenerator.ReadAllSheets - ProcessController.ValidateExcelTemplate → Andromeda.Core.LoggingManager.Error - ProcessController.ValidateExcelTemplate → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - ProcessController.ValidateExcelTemplate → Andromeda.Validation.ProcessMapValidation.Validate - ProcessController.ValidateExcelTemplate → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone - ProcessController.ValidateExcelTemplate → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone - Andromeda.Core.Services.ExcelGenerator.VerifyExcel → Andromeda.Core.Utility.Compress.UnzipFolder - Andromeda.Core.Services.ExcelGenerator.VerifyExcel → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    Andromeda_Core_Services_ExcelGenerator_VerifyExcel["Andromeda.Core.Services.ExcelGenerator.VerifyExcel"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    Andromeda_Core_Utility_Compress_UnzipFolder["Andromeda.Core.Utility.Compress.UnzipFolder"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    ProcessController_ValidateExcelTemplate["ProcessController.ValidateExcelTemplate"]
    Andromeda_Core_Services_ExcelGenerator_VerifyExcel --> Andromeda_Core_Utility_Compress_CreateZip
    Andromeda_Core_Services_ExcelGenerator_VerifyExcel --> Andromeda_Core_Utility_Compress_UnzipFolder
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_LoggingManager_Error
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ValidateExcelTemplate --> Andromeda_Core_Services_ExcelGenerator_VerifyExcel
    ProcessController_ValidateExcelTemplate --> Andromeda_Validation_ProcessMapValidation_Validate
Detailed Analysis

Key Flows - Summary: ValidateExcelTemplate verifies the Excel file structure - validates connections and controls - and returns validation status. - Check for mandatory sheets and return error if missing - validate control IDs and sequences - Validate shape and edge connections - Verify and update Excel file path - Return boolean indicating overall validation success

Error Flows - Summary: Validate Excel template and return errors for missing sheets - Handle null or mismatched shapes and edges to prevent exceptions - Return false and set error if mandatory sheets are missing - Set error and return if header row missing in 'Mandatory - Process Data' sheet - Return false early on failed validation conditions

Security Issues - Summary: ValidateExcelTemplate updates filepath without validation - Unvalidated filepath update from VerifyExcel method

Performance Issues - Summary: Reading entire Excel files and inefficient LINQ usage degrade performance on large datasets. - Use of ToList() causes memory inefficiency on large datasets - GroupBy() operations on large datasets reduce performance - LINQ Any() and Contains() inside loops cause slowdowns on large datasets

Maintainability Issues - Summary: Refactor ValidateExcelTemplate to improve readability and maintainability. - Multiple ref parameters reduce clarity and maintainability, Repetitive complex conditionals require refactoring, Magic strings and numbers lack named constants, Incomplete and truncated code snippets hinder understanding, Non-descriptive variable names reduce readability, Unclear and incomplete conditions decrease maintainability

UX Impact Notes - Summary: The method returns error messages for missing sheets - Error logging potentially affecting performance and user experience

Test Case Ideas - Summary: Validate Excel template processing - Handle Excel file read errors - Handle empty fields and missing header rows - Handle incomplete or malformed inputs robustly - Process empty and populated ShapeList and SwimLaneList - Verify Excel file path updates - Test performance on large datasets for filtering and LINQ - Parse and assign properties from Act array with varied lengths and values - Invoke ProcessMapValidation.Validate correctly and verify results

Dependencies & Called Services - Summary: ValidateExcelTemplate uses data conversion - Data conversion utilities (Convert, DateTime, Double, Int32, TimeSpan, String), Collection types and operations (Dictionary, List, Enumerable), Excel generation, Mathematical operations, Shape and edge information handling - Logging management - Process map validation

UploadTemplateExcel

Summary: UploadTemplateExcel processes an uploaded Excel file to extract and update process maps, actors, products, controls, and risks, then returns JSON responses.

JsonResult ProcessController.UploadTemplateExcel(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadTemplateExcel

Cross-layer call chain - ProcessController.UploadTemplateExcel → Andromeda.Core.LoggingManager.Error - ProcessController.UploadTemplateExcel → Andromeda.Core.Services.ExcelGenerator.ReadAllSheets - ProcessController.UploadTemplateExcel → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - ProcessController.UploadTemplateExcel → Andromeda.Core.Entities.Arrow.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    ProcessController_UploadTemplateExcel["ProcessController.UploadTemplateExcel"]
    ProcessController_UploadTemplateExcel --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_UploadTemplateExcel --> Andromeda_Core_LoggingManager_Error
    ProcessController_UploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_UploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
Detailed Analysis

Key Flows - Summary: UploadTemplateExcel processes an uploaded Excel file to extract and update process maps - then returns JSON responses. - Create unique temp folder and save Excel file - Group activities and update activity groups - Save new products and product factors; update product mappings - Return JSON responses based on AcceptTypes and errors - Log upload start - Update process maps - Update actors with working hours and skill costs

Error Flows - Summary: Handle and log errors during file validation - Handle null or empty data during extraction and processing - Log errors and return appropriate error messages - Return early if save directory is missing - Return error JSON on Excel template validation failure - Return error JSON on Visio or Excel data processing errors - Discard child changes and return error JSON on upload failure

Security Issues - Summary: Fix path traversal, SQL injection, and insecure process termination vulnerabilities. - Directory traversal vulnerability in folder path construction, Path traversal vulnerability combining folder path and file name, SQL injection vulnerability from unsanitized project ID, Insecure process killing mechanism

Performance Issues - Summary: Optimize LINQ usage, string operations, cloning, database calls, and loop control to improve performance. - Excessive LINQ calls on large datasets

Maintainability Issues - Summary: The method uses unclear naming, magic values, tight coupling, and lacks validation and error handling. - Use of magic strings and numbers for paths, sheet names, and indexes, Incomplete and malformed code reducing clarity, Tight coupling with multiple models and external dependencies, Anonymous types and lambdas without documentation, Non-descriptive variable names reducing readability, Commented-out and incomplete code blocks, Inconsistent or missing validation and error handling

UX Impact Notes - Summary: Users receive inconsistent error messages and may lack feedback on missing directories. - Early return without feedback if directory is missing - Error messages logged and exposed to users

Test Case Ideas - Summary: Verify upload process logging - data updates - Generate unique temporary folder and create directory - Group and update activity groups with varied inputs - Save and update products and product factors - Handle missing or malformed directory paths - Handle incomplete or malformed code paths - Log upload process start - Update actors including working hours - activity assignments - Validate JSON responses for AcceptTypes and errors

Dependencies & Called Services - Summary: Processes Excel upload using file handling, data conversion, logging, and model interfaces. - File handling with HttpPostedFileBase and Directory, Data conversion using Convert, DateTime, Decimal, Double, Int32, Collection manipulation with List, Dictionary, ICollection, Enumerable, String operations, Excel generation with ExcelGenerator, Path management, Model interfaces: IActorModel, IControlModel, IInfraModel, IProcessModel, IRiskModel, Arrow library usage - Logging via LoggingManager - Process control

FormBRMaster

Summary: Retrieve and process project activities, business rules, and forms, then prepare filtered data for view rendering.

ActionResult ProcessController.FormBRMaster()

Routing

  • HTTP: GET
  • URL: /Process/FormBRMaster

Cross-layer call chain - ProcessController.FormBRMaster → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_FormBRMaster["ProcessController.FormBRMaster"]
    ProcessController_FormBRMaster --> Andromeda_Core_Entities_Project_GetTags
View Metadata
  • View: FormBRMaster (Andromeda.Web\Views\Process\FormBRMaster.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and process project activities, business rules, and forms, then prepare filtered data for view rendering. - Retrieve project activities, form-business rule mappings, and activity properties, Extract business rules and forms by filtering activity properties, Count and group business rules and forms for display, Retrieve project tags, form master data, and business rules master data, Filter master data to exclude already processed forms and business rules, Populate ViewData with processed and filtered data for rendering

Error Flows - Summary: The method lacks explicit error handling and exception management. - Absence of error handling, No exception management, Undefined error flows

Performance Issues - Summary: Excessive database calls and LINQ operations degrade performance and slow responses. - Multiple database calls causing bottlenecks, Complex data processing impacting performance, LINQ methods on large collections reducing speed, Consecutive database queries increasing response time

Maintainability Issues - Summary: Tight coupling and magic strings reduce code clarity and maintainability. - Complex data processing logic

UX Impact Notes - Summary: Prepares and optimizes form and business rule data to ensure smooth user experience. - Group, order, and filter forms and business rules for display, Ensure data formatting correctness, Optimize processing performance to prevent UX degradation

Test Case Ideas - Summary: Verify data retrieval, extraction, counting, filtering, and ViewData population with edge case handling. - Calculate and reflect usage counts for business rules and forms in grouped lists - Handle missing or empty activities and activity properties - Handle no matching activities found with FirstOrDefault - Retrieve activities, form-business rule mappings, and activity properties by project, Extract business rules and forms from activity properties by property names, Retrieve and filter project tags, form master data, and business rules master data, Populate ViewData with business rules, forms, master forms, and master business rules

Dependencies & Called Services - Summary: Uses interfaces and types for control, processing, and project identification. - IControlModel interface for control logic - IProcessModel interface for process logic

RemoveForm

Summary: RemoveForm deletes a form from the current project, updates review status, and returns a JSON response.

JsonResult ProcessController.RemoveForm()

Routing

  • HTTP: POST
  • URL: /Process/RemoveForm

Cross-layer call chain - ProcessController.RemoveForm → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_RemoveForm["ProcessController.RemoveForm"]
    ProcessController_RemoveForm --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - updates review status - and returns a JSON response. - Return JsonResult response - Update review status with IProcessModel.updateisreviewedstatus

Error Flows - Summary: RemoveForm lacks validation and error handling for form deletion and status updates. - No error management for review status updates

Security Issues - Summary: RemoveForm method risks SQL injection and data tampering from unvalidated input. - Direct use of Request.Form without validation, Potential SQL injection vulnerability, Risk of data tampering

Performance Issues - Summary: RemoveForm method wastes resources converting ObservationTabAccordions.Forms_Moreth5Forms to integer unnecessarily. - Unnecessary integer conversion of ObservationTabAccordions.Forms_Moreth5Forms

Maintainability Issues - Summary: RemoveForm uses magic strings and numbers, harming code clarity and maintainability. - Use of magic strings like "FORM", Use of magic numbers like 5

UX Impact Notes - Summary: Removing form and updating review status indirectly affect user workflow. - Review status update

Test Case Ideas - Summary: Verify RemoveForm handles valid input - updates status - Invoke RemoveForm on POST request, Remove form with valid data, Prevent security issues from malicious input, Assess performance impact on ObservationTabAccordions.Forms_Moreth5Forms conversion - Update review status after removal

Dependencies & Called Services - and logging services. - DateTime conversion - Logging management - Process model handling, Process execution

RemoveBR

Summary: RemoveBR deletes a business rule, updates review status, and returns the operation result as JSON.

JsonResult ProcessController.RemoveBR()

Routing

  • HTTP: POST
  • URL: /Process/RemoveBR

Cross-layer call chain - ProcessController.RemoveBR → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_RemoveBR["ProcessController.RemoveBR"]
    ProcessController_RemoveBR --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - updates review status - and returns the operation result as JSON. - Delete business rule for current project - Return JSON result to client - Update reviewed status via IProcessModel

Error Flows - Summary: Log errors during deletion or status update failures. - Error logging via LoggingManager.error during deletion failures - Error logging via LoggingManager.error during status update failures

Security Issues - Summary: Direct use of Request.Form['BR'] causes SQL injection and data tampering risks. - Lack of validation on Request.Form['BR'], SQL injection vulnerability, Data tampering risk

Performance Issues - Summary: No performance issues identified.

Maintainability Issues - Summary: The method's complex call chain complicates maintenance and debugging. - Complex call chain with multiple dependencies, Difficult maintenance and debugging due to intertwined methods

UX Impact Notes - Summary: Returning JsonResult requires client to handle JSON for proper user flow. - JsonResult return type

Test Case Ideas - Summary: Verify RemoveBR method executes on HTTP POST requests. - RemoveBR method invocation, HTTP POST request handling

Dependencies & Called Services - Summary: RemoveBR depends on date conversion, process modeling, logging, and process management. - DateTime conversion - Logging management - Process modeling interface, Process handling

UpdateFORMBRMaster

Summary: UpdateFORMBRMaster decodes and deletes old forms and rules, inserts new master form data and mappings, then updates activity properties and mappings.

JsonResult ProcessController.UpdateFORMBRMaster()

Routing

  • HTTP: POST
  • URL: /Process/UpdateFORMBRMaster

Cross-layer call chain - ProcessController.UpdateFORMBRMaster → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_UpdateFORMBRMaster["ProcessController.UpdateFORMBRMaster"]
    ProcessController_UpdateFORMBRMaster --> Andromeda_Core_Entities_Project_GetTags
Detailed Analysis

Key Flows - Summary: UpdateFORMBRMaster decodes and deletes old forms and rules - then updates activity properties and mappings. - Decode and delete removed forms and business rules, Decode and insert master form data, Insert product form-business rule mappings, Retrieve and group activity properties - Update activity property mappings

Error Flows - Summary: Handle JSON deserialization errors and prevent null reference exceptions in UpdateFORMBRMaster. - JSON deserialization failures from invalid or missing request data, Null reference exceptions from undefined or misspelled objects, Runtime errors from incomplete or incorrect code snippets

Security Issues - Summary: Prevent JSON deserialization and SQL injection vulnerabilities in UpdateFORMBRMaster. - JSON deserialization risk from untrusted data using System.Web.Helpers.Json.Decode, SQL injection risk from unsanitized form strings in database insertion, Magic strings risk causing errors or injection if unmanaged

Performance Issues - Summary: Optimize JSON deserialization, batch deletions, and reduce costly collection operations. - High memory usage from ToList() and GroupBy() on large datasets

Maintainability Issues - Summary: Refactor code to improve clarity, reduce coupling, and remove incomplete or unclear elements. - Replace magic strings with constants or enums, Decouple from ProcessMapModel, Registry, and Process classes, Remove incomplete and syntactically incorrect code, Eliminate commented-out or abandoned code, Define variables with clear context and purpose

Test Case Ideas - Summary: Verify form and business rule updates - Decode removed forms and business rules from request, Call DeleteForm and DeleteBR for each item in collections, Call InsertFormMaster and InsertProductFormBRMapping with correct parameters, Invoke InsertProductFormBRMapping when removed business rules exist, Invoke DeletePropertiesFrom when no removed business rules exist, Retrieve and group activity properties, extract BusinessRule and Form properties, Complete method successfully with various inputs - Handle presence or absence of LoggedInUse property correctly

Dependencies & Called Services - Summary: Uses collections and interfaces to process projects and strings. - Enumerable collections, IProcessModel interface, Project data, String manipulation - Process handling

SaveFormBRMaster

Summary: No key flows are defined for the SaveFormBRMaster method.

JsonResult ProcessController.SaveFormBRMaster()

Routing

  • HTTP: POST
  • URL: /Process/SaveFormBRMaster
Detailed Analysis

Key Flows - Summary: No key flows are defined for the SaveFormBRMaster method.

Error Flows - Summary: Handle null form data and database insert exceptions to prevent failures. - Return false on null form data

Security Issues - Summary: Sanitize decoded form data to prevent SQL injection. - Potential SQL injection from unsanitized decoded form data

Performance Issues - Summary: No performance issues identified in SaveFormBRMaster method.

Maintainability Issues - Summary: Replace magic strings with constants to improve code readability and maintainability. - Use constants instead of magic strings, Avoid hardcoded string literals like 'FormData', 'Form', 'Brs', 'Mode'

UX Impact Notes - Summary: Returning JsonResult enables UI updates but requires client-side handling of null data. - Returning JsonResult enables client-side UI updates - Returning false as JsonResult without client handling harms UX

Test Case Ideas - Summary: Verify method returns valid JsonResult and inserts data on valid input. - Return valid JsonResult on successful processing

Dependencies & Called Services - Summary: SaveFormBRMaster depends on IProcessModel service. - IProcessModel service dependency

DeleteForm

Summary: DeleteForm calls DeleteActsProperties with ProjectId and deleteForm parameters to delete data.

void ProcessController.DeleteForm(int ProjectId, string deleteForm, bool isDelefromMaster)

Routing

  • URL: /Process/DeleteForm
Detailed Analysis

Key Flows - Summary: DeleteForm calls DeleteActsProperties with ProjectId and deleteForm parameters to delete data. - Call DeleteActsProperties with ProjectId and deleteForm, Execute deletion process

Error Flows - Summary: DeleteForm lacks explicit error handling for DeletePropertiesFromMaster failures. - No defined error recovery or logging mechanisms

Security Issues - Summary: No security issues found in DeleteForm method.

Maintainability Issues - Summary: The method's misleading attribute and incomplete code reduce readability and maintainability. - Misleading [NonAction] attribute on a method that performs deletion, Incomplete and malformed code snippets, Unclear code fragments reducing readability and complicating maintenance

Test Case Ideas - Summary: Verify DeleteForm calls correct deletion methods and handles control flow without errors. - Return control to caller without errors - Handle syntax errors or incomplete code

Dependencies & Called Services - Summary: DeleteForm uses IProcessModel service for processing. - IProcessModel service dependency

DeleteBR

Summary: DeleteBR removes business rule properties and updates related product form mappings containing the rule.

void ProcessController.DeleteBR(int ProjectId, string deleteBR)

Routing

  • URL: /Process/DeleteBR

Cross-layer call chain - ProcessController.DeleteBR → Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData["Andromeda.Core.Entities.ProductFormBRMapping.GetMappedData"]
    ProcessController_DeleteBR["ProcessController.DeleteBR"]
    ProcessController_DeleteBR --> Andromeda_Core_Entities_ProductFormBRMapping_GetMappedData
Detailed Analysis

Key Flows - Summary: DeleteBR removes business rule properties and updates related product form mappings containing the rule. - Delete business rule properties via DeleteActsProperties and DeletePropertiesFromMaster - Remove mapped values starting with deleteBR and update mappings with UpdateProductFormBRMapping

Performance Issues - Summary: String methods and ToList() usage degrade performance on large datasets. - Inefficient string.IsNullOrWhiteSpace and Contains in filtering, Excessive memory use from ToList() on large collections

Maintainability Issues - Summary: Improve naming clarity and replace magic strings to enhance maintainability. - Non-descriptive method and parameter names, Use of magic strings 'FORM' and 'BR', Typo in variable name 'removedLis', Unclear code lacking context

Test Case Ideas - Summary: Verify method calls downstream methods correctly and updates filtered data accurately. - Call downstream methods with correct parameters - Update filtered data in product form business rule mapping

Dependencies & Called Services - Summary: Uses enumerable collections, process models, product-form mappings, and string operations. - Enumerable collections, Product-form business rule mapping, String operations - Process model interface

DeleteActivityProperties

Summary: The method processes CSV files or calls SaveFormBrs for non-CSV files.

JsonResult ProcessController.DeleteActivityProperties()

Routing

  • HTTP: POST
  • URL: /Process/DeleteActivityProperties
Detailed Analysis

Key Flows - Summary: The method processes CSV files or calls SaveFormBrs for non-CSV files. - Call SaveFormBrs for non-CSV files - Process CSV file if extension is '.csv'

Error Flows - Summary: DeleteActivityProperties risks runtime errors from missing validation and null checks. - Null or empty file path causing errors in file extension checks and TextFieldParser creation

Security Issues - Summary: DeleteActivityProperties lacks input validation and exposes file path injection risks. - Missing validation and sanitization of form data and session information, Direct use of file path risks file path injection and manipulation

Performance Issues - Summary: DeleteActivityProperties suffers performance issues with large datasets and inefficient loops. - System.Web.Helpers.Json.Decode slow on large datasets - Inefficient LINQ 'Any' and 'Where' usage on large datasets

Maintainability Issues - Summary: Improve naming, remove magic strings, fix incomplete code, and clarify complex statements. - Non-standard C# variable naming reduces readability, Use named constants instead of magic strings like '.csv' and 'FORM', Incomplete and truncated code causes compilation errors, Lack of comments and unclear variable names hinder understanding, Misspelled or incomplete method calls such as 'SaveProductForm' and 'DeleteActsPropert', Long, complex LINQ statements reduce readability

UX Impact Notes - Summary: No user experience impact from backend data processing. - Backend data processing, No direct UX impact

Test Case Ideas - collection updates - Header row setting and firstLine flag update - Performance and correctness with large UploadedRecs and deletedRecds datasets - deletedRecds identification of missing records from UploadedRecs

Dependencies & Called Services - Summary: Uses collections, file parsing, and process management libraries. - Enumerable, IProcessModel, List, Path, String, TextFieldParser - Process

ReUploadTemplateExcel

Summary: Validate project ID, process uploaded Excel sheets, map data to database entities, detect changes, and validate controls with error handling.

JsonResult ProcessController.ReUploadTemplateExcel(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/ReUploadTemplateExcel

Cross-layer call chain - ProcessController.ReUploadTemplateExcel → Andromeda.Core.Services.Registry.GetPermissions - ProcessController.ReUploadTemplateExcel → Andromeda.Core.Models.ModelHelper.GetProjectDetails - ProcessController.ReUploadTemplateExcel → Andromeda.Core.Services.ExcelGenerator.ReadAllSheets - ProcessController.ReUploadTemplateExcel → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - Andromeda.Core.Services.Registry.GetPermissions → Andromeda.Core.Models.ModelHelper.GetProjectDetails - Andromeda.Core.Models.ModelHelper.GetProjectDetails → Andromeda.Core.Models.ModelHelper.GetProjectDetails - Andromeda.Core.Models.ModelHelper.GetProjectDetails → Andromeda.Core.DataManager.GetData

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    Andromeda_Core_Models_ModelHelper_GetProjectDetails["Andromeda.Core.Models.ModelHelper.GetProjectDetails"]
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    Andromeda_Core_Services_Registry_GetPermissions["Andromeda.Core.Services.Registry.GetPermissions"]
    ProcessController_ReUploadTemplateExcel["ProcessController.ReUploadTemplateExcel"]
    Andromeda_Core_Models_ModelHelper_GetProjectDetails --> Andromeda_Core_DataManager_GetData
    Andromeda_Core_Models_ModelHelper_GetProjectDetails --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    Andromeda_Core_Services_Registry_GetPermissions --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ReUploadTemplateExcel --> Andromeda_Core_Services_Registry_GetPermissions
Detailed Analysis

Key Flows - Summary: Validate project ID - and validate controls with error handling. - Check for activity name - and team changes; return error JSON if detected - Check for Visio errors and return detailed error messages - Create ShapeInfo objects from process map data rows - Read and validate mandatory Excel sheet names - Validate and convert project ID - Validate control groups

Error Flows - Summary: Validate uploaded Excel file and reject if structural or data integrity errors occur. - Reject file if name lacks project ID, Reject if mandatory sheets or headers are missing, Reject if process map data rows have missing data, Reject if new activities added without Visio or Maven edits, Reject if activities deleted, Reject if activity names or types changed, Reject if team names changed, Reject if control configuration validation fails, Reject if Visio errors detected

Security Issues - Summary: Ensure strict validation and sanitization to prevent unauthorized access and information leaks. - Directory traversal risk from unsanitized ProjectFolder setting - Information disclosure via user ID checks in permissions

Performance Issues - Summary: Repeated LINQ and string operations cause high memory use and O(n²) complexity. - High memory and GC overhead from ToList() on large datasets - Slow permission checks and swimlane updates due to Any() with lambdas on large lists

Maintainability Issues - Summary: The method suffers from unclear naming, magic values, tight coupling, and incomplete error handling. - Unused or unassigned variables and objects

UX Impact Notes - Summary: The method provides clear JSON responses that guide users and promptly report permission or file errors. - Performance delays with large data or permission checks degrade UX

Test Case Ideas - team updates - Check mandatory Excel sheets and header rows presence - Create directories and save files - handle existing directories - Detect new, deleted, renamed, or type-changed activities, Identify team name changes and control configuration errors, Ensure debug statements do not affect production behavior - Handle large Excel files and ensure performance under load

Dependencies & Called Services - Summary: Uses file handling, data conversion, Excel generation, and process management services. - File handling utilities, Data conversion and manipulation, Excel file generation, Model interfaces for actors and processes, Collection and string utilities - Process and registry management

ReadReimportExcelData

Summary: Read Excel data, validate headers, update project entities, and asynchronously process updates for performance.

JsonResult ProcessController.ReadReimportExcelData()

Routing

  • HTTP: POST
  • URL: /Process/ReadReimportExcelData

Cross-layer call chain - ProcessController.ReadReimportExcelData → Andromeda.Core.Services.ExcelGenerator.ReadAllSheets - ProcessController.ReadReimportExcelData → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - ProcessController.ReadReimportExcelData → Andromeda.Core.Services.ProcessExtensions.FindByID

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_ReadReimportExcelData["ProcessController.ReadReimportExcelData"]
    ProcessController_ReadReimportExcelData --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_ReadReimportExcelData --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_ReadReimportExcelData --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - validate headers - update project entities - and asynchronously process updates for performance. - Handle objectives and risk controls by syncing database and Excel data - Load project data including activities, actors, arrows, and properties - Process business rules, activity groups, and product factors - Extract and validate header rows from specific sheets - Return error JSON if headers are missing - Manage product assignments and control models - Use threading for asynchronous updates - Update activities with volume - Update actors with working hours and skill costs

Error Flows - Summary: Detects missing headers or data and returns JSON errors to prevent null reference exceptions. - Null or empty collections cause early return or skip to avoid exceptions

Security Issues - Summary: Unvalidated file paths and unsanitized inputs expose the system to path traversal and SQL injection. - Unvalidated file path from session risks path traversal attacks

Performance Issues - Summary: Reading large Excel files and inefficient LINQ and database queries degrade performance. - Reading all sheets from large Excel files is slow and resource-intensive, Unoptimized multiple database queries reduce performance, LINQ methods on large collections cause performance degradation, Repeated string method calls inside loops impact performance, Creating new threads for async processing affects scalability, AddRange on large collections causes high memory allocation and copying, Complex lambda expressions and nested LINQ queries reduce efficiency, Any() method inside loops and Where clauses causes O(n^2) complexity

Maintainability Issues - Summary: The method uses magic strings and numbers, has unclear naming, tight coupling, and incomplete code reducing maintainability. - Use of magic strings for sheet names, column indices, and property names, Use of unexplained hardcoded magic numbers, Unclear and non-descriptive variable names, Tight coupling with external dependencies reducing modularity and testability, Complex nested LINQ queries and lambda expressions reducing readability, Repeated code patterns lacking reuse and refactoring, Incomplete, commented-out, or truncated code sections indicating dead or unfinished code, Lack of comments hindering code understanding

UX Impact Notes - Summary: The method provides clear error messages but may slow down with large files and risks exposing internal details. - Error messages for missing headers and incomplete data aid user correction, Error format adapts to request AcceptTypes affecting display, Performance degrades with large Excel files or complex database queries, Detailed errors risk exposing internal information and reducing user trust

Test Case Ideas - Summary: Validate Excel data reading - database updates - Handle missing header rows in key sheets - Process and update product factors and compensatory activities - Verify database retrieval and updates for activities - Maintain performance with large Excel files and datasets - Update business rules and activity groups accurately - Validate string comparison and trimming with varied casing and whitespace

Dependencies & Called Services - Summary: Uses data conversion, collections, threading, and domain-specific models for Excel data processing. - Data conversion utilities (Convert, DateTime, Decimal, Double, Int32, TimeSpan, String), Collection types and interfaces (Dictionary, List, ICollection, Enumerable), Threading support (Thread), Domain-specific models and interfaces (IActorModel, IControlModel, IInfraModel, IProcessModel, IRiskModel), Excel data generation (ExcelGenerator) - Process-related extensions (ProcessExtensions)

ResetReImportData

Summary: ResetReImportData handles POST requests by clearing session data and returning a JSON result.

JsonResult ProcessController.ResetReImportData()

Routing

  • HTTP: POST
  • URL: /Process/ResetReImportData
Detailed Analysis

Key Flows - Summary: ResetReImportData handles POST requests by clearing session data and returning a JSON result. - Return JsonResult indicating operation outcome

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

Maintainability Issues - Summary: The JsonResult return value lacks completeness - Incomplete JsonResult return value

UX Impact Notes - Summary: Removing 'FilepathSession' risks breaking user-specific data flows. - Removal of 'FilepathSession' variable, Potential disruption of user-specific data flows

Test Case Ideas - Summary: Verify ResetReImportData accepts only POST and clears FilepathSession variable. - Restrict ResetReImportData to HTTP POST requests - Remove FilepathSession variable after ResetReImportData execution

ValidateMavenExcel

Summary: ValidateMavenExcel saves the uploaded file, validates it using ValidateExcelTemplate, and returns JSON results.

JsonResult ProcessController.ValidateMavenExcel(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/ValidateMavenExcel
Detailed Analysis

Key Flows - Summary: ValidateMavenExcel saves the uploaded file - validates it using ValidateExcelTemplate - and returns JSON results. - Check and create directory if missing - Invoke ValidateExcelTemplate with parameters - Return JSON with errors or validation results based on AcceptTypes

Error Flows - Summary: Return JSON error responses for template validation - Return JSON error if ValidateExcelTemplate fails - Return JSON error list if ErrorsList is not empty - Return JSON Visio error details if VisioErrors is not empty

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

Performance Issues - Summary: Optimize configuration access and avoid unnecessary list allocations to improve performance. - Inefficient use of ConfigurationManager.AppSettings with large config files - No file existence check before saving causing potential overwrites

Maintainability Issues - Summary: The method suffers from unclear naming, poor error handling, and unclear structure reducing maintainability. - Excessive parameters in ValidateExcelTemplate reduce clarity

UX Impact Notes - Summary: Validation errors and directory checks directly affect user feedback and response format. - Early return on missing directory impacts user feedback

Test Case Ideas - Summary: Validate Excel processing - Handle valid Excel files and templates - Handle empty and non-empty VisioErrors collections - Return JSON responses with error messages when applicable - Set content type to text/plain correctly

Dependencies & Called Services - Summary: Uses file handling, collection processing, HTTP file input, and system process utilities. - File directory management, Enumerable collection operations, HTTP file upload handling, File path manipulation, System process control, String operations

SavemultiplePredecessor

Summary: Process form data to create and save predecessor-successor relationships, then save project configuration.

ActionResult ProcessController.SavemultiplePredecessor(FormCollection collection)

Routing

  • HTTP: POST
  • URL: /Process/SavemultiplePredecessor
Detailed Analysis

Key Flows - Summary: Process form data to create and save predecessor-successor relationships - Create and add Arrow objects to list - Initialize list for Arrow objects representing relationships, Iterate FormCollection keys filtering by substrings 'anyA', 'll', 'Release', Extract and convert string values to integer IDs for predecessors and successors, Call SaveBatchActs to persist Arrow objects, Invoke SaveConfigurationDetails with project ID

Error Flows - Summary: Handle conversion errors and validate inputs to prevent runtime exceptions. - Lack of error handling for Convert.ToInt32 conversion failures, Missing input validation causing potential runtime errors

Security Issues - Summary: Lack of input validation risks injection and input-based attacks. - Missing input validation, No input sanitization, Injection vulnerability risk

Performance Issues - Summary: Optimize string operations and collection iteration to improve performance. - Inefficient string.Contains and string.Replace calls inside loops, Unbatched iteration over large FormCollection.AllKeys causing high memory use and slow processing

Maintainability Issues - Summary: Improve code clarity by fixing typos, removing dead code, and avoiding magic strings. - Use of magic strings reduces clarity and increases error risk, Incomplete and corrupted code snippets hinder readability and maintenance, Non-descriptive variable names decrease code understandability, Unused variable 'PredecessorSuceeor' indicates dead code, Method name 'SavemultiplePredecessor' contains a typo and lacks readability

UX Impact Notes - Summary: Redirects alter user flow and missing error handling degrades experience. - Missing error handling causes unhandled exceptions - Redirects change user page or view

Test Case Ideas - and handles security. - Handle empty FormCollection gracefully - Trigger 'InputSummary' event with value 'FinalPlan' and verify redirect - Process valid FormCollection with multiple predecessor-successor entries, Process collection items with substrings 'anyA', 'll', 'Release'

Dependencies & Called Services - Summary: Uses conversion and process model interfaces with string lists. - Convert utility, IProcessModel interface, List collection, String type

SaveProductForSelectedActs

Summary: Extract IDs from the request and update the product for specified activities.

ActionResult ProcessController.SaveProductForSelectedActs()

Routing

  • HTTP: POST
  • URL: /Process/SaveProductForSelectedActs

Cross-layer call chain - ProcessController.SaveProductForSelectedActs → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_SaveProductForSelectedActs["ProcessController.SaveProductForSelectedActs"]
    ProcessController_SaveProductForSelectedActs --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Extract IDs from the request and update the product for specified activities. - Retrieve project ID, product ID, and activity IDs from request - Update product for specified activities using BulkProductUpdateByActivityIds

Error Flows - Summary: Handle null ActivityID and complete return statements to prevent runtime errors. - Null reference exception from unchecked Request.Form['ActivityID'] - Incomplete return statement causing runtime errors or unexpected behavior

Security Issues - Summary: Prevent SQL injection and XSS by sanitizing inputs before database and form data usage. - SQL injection risk from unsanitized ProdId and ActIds in BulkProductUpdateByActivityIds

Performance Issues - Summary: Optimize string concatenation and data conversion for large input sets. - Inefficient string.Join for large activity ID lists, Slow Convert.ToString() on large Request.Form data

Maintainability Issues - Summary: Magic strings and incomplete conditions reduce code clarity and maintainability. - Incomplete if condition checking Request.Form['ActivityID'] - Incomplete return statement at method end

UX Impact Notes - Summary: No visible UX impact, but security issues may cause errors or unexpected behavior. - No direct UX impact, Potential security issues causing errors or unexpected behavior

Test Case Ideas - Summary: Verify product update - error logging - and return statement handling. - Product update for specified activities - Reviewed status update - Error message logging - Handling of incomplete or missing return statements

Dependencies & Called Services - Summary: Uses utilities and services for data conversion, logging, and process management. - DateTime conversion, Enum handling, IProcessModel interface, String manipulation - LoggingManager service

FormBRActivity

Summary: Retrieve and process project data, populate ViewData, and render the Form BR Activity page.

ActionResult ProcessController.FormBRActivity()

Routing

  • HTTP: GET
  • URL: /Process/FormBRActivity

Cross-layer call chain - ProcessController.FormBRActivity → Andromeda.Core.Extensions.LinqExtensions.getSkillScore

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProcessController_FormBRActivity["ProcessController.FormBRActivity"]
    ProcessController_FormBRActivity --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
View Metadata
  • View: FormBRActivity (Andromeda.Web\Views\Process\FormBRActivity.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and process project data, populate ViewData, and render the Form BR Activity page. - Return View result to render page

Performance Issues - Summary: Repeated use of FirstOrDefault and Where on large datasets degrades performance. - Multiple FirstOrDefault calls on large datasets - Multiple Where calls on large datasets

Maintainability Issues - Summary: Tight coupling and anonymous types reduce code maintainability and testability. - Tight coupling with multiple models and services, Use of anonymous types reducing code clarity

UX Impact Notes - Summary: Populating ViewData with project data enables rendering the Form BR Activity page. - Populating ViewData with project data, Rendering Form BR Activity page

Test Case Ideas - Summary: Verify data retrieval, ordering, and correct page rendering with ViewData. - Retrieve correct data from all models, Order results by specified property 'I', Render Form BR Activity page with populated ViewData

Dependencies & Called Services - Summary: Uses core interfaces and utilities for actor, control, and process models with LINQ and string operations. - Enumerable utilities, IActorModel interface, IControlModel interface, IProcessModel interface, LinqExtensions utilities, String operations

InsertActivityBRForms

Summary: Decode JSON data, update activity properties, adjust process map modes, and finalize processing with arrow mode.

JsonResult ProcessController.InsertActivityBRForms()

Routing

  • HTTP: POST
  • URL: /Process/InsertActivityBRForms
Detailed Analysis

Key Flows - update activity properties - Assign ActivityId and Name to ActivityProperty objects - Update activity properties via SetActivityProperties - Update process map mode if activity IDs exist

Error Flows - Summary: The method lacks explicit error handling for invalid JSON and exceptions. - No explicit handling of invalid or malformed JSON data, No exception handling for JSON decoding errors, No exception handling for downstream call failures

Security Issues - Summary: Prevent JSON deserialization attacks by validating input before decoding. - JSON deserialization vulnerability, Lack of input validation before Json.Decode

Performance Issues - Summary: Repeated JSON decoding and multiple loops over large collections degrade performance. - Repeated use of System.Web.Helpers.Json.Decode, Multiple loops over large collections of properties or activity IDs

Maintainability Issues - Summary: The method uses magic strings and numbers, lacks explicit typing, and contains unclear or incomplete code. - Use of magic strings in Request.Form keys, Hardcoded string values limit flexibility, Magic number 5 used without named constant, Implicit variable typing reduces clarity, Undefined method tArrowMode reduces code clarity, Incomplete and fragmented code hinders understanding

Test Case Ideas - property assignments - and conditional logic in InsertActivityBRForms. - Assign ActivityId and Name for collection properties - Set BusinessRuleKnowledge to 5 in FormData items - Call SetActivityProperties with correct parameters - Call UpdateOutArrowMode when actIds is non-empty - Handle missing or malformed form data keys

Dependencies & Called Services - Summary: Uses control and process models for activity insertion. - IControlModel dependency, IProcessModel dependency

EditSkillCompetency

Summary: Retrieve project data, filter related actors and activities, and prepare combined activity, actor, and product data for the view.

ActionResult ProcessController.EditSkillCompetency()

Routing

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

Key Flows - Summary: Retrieve project data, filter related actors and activities, and prepare combined activity, actor, and product data for the view. - Fetch and filter project actors, store in ViewData, Fetch and filter project activities by PageID, store in ViewData - return combined data

Performance Issues - Summary: Reduce multiple database calls and repeated collection enumerations to improve performance. - Inefficient LINQ queries on large datasets

Maintainability Issues - Summary: The method mixes unrelated tasks and uses anonymous types, reducing maintainability. - Multiple unrelated tasks in one method, Extensive use of anonymous types reducing code clarity

UX Impact Notes - Summary: ViewData controls content and options in EditSkillCompetency, shaping user experience. - ViewData stores data for EditSkillCompetency view, ViewData content affects user options and display

Test Case Ideas - Summary: Verify data retrieval, filtering, mapping, and storage in ViewData for EditSkillCompetency. - Retrieve correct project ID from Registry, Retrieve and store actors in ViewData, Retrieve, filter by PageID, and store activities in ViewData, Filter, map, and combine activity properties with actors and products, Retrieve and store products in ViewData - Validate LINQ queries for correct data mapping and transformation

Dependencies & Called Services - Summary: Uses models and collections for skill competency editing. - IControlModel for control logic

UpdateSkillCompetency

Summary: UpdateSkillCompetency processes valid competency data to update skills or returns a response if data is empty.

JsonResult ProcessController.UpdateSkillCompetency()

Routing

  • HTTP: POST
  • URL: /Process/UpdateSkillCompetency
Detailed Analysis

Key Flows - Summary: UpdateSkillCompetency processes valid competency data to update skills or returns a response if data is empty. - Call BulkUpdateSkillCompetency to update skills on valid data - Return JSON response after update or if 'Competency' is empty

Error Flows - Summary: Handle invalid or missing 'Competency' data to prevent update failures. - Missing 'Competency' key results in null or empty update data

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

Maintainability Issues - Summary: Replace magic string with constant and fix BulkUpdateSkillCompetency syntax for maintainability. - Correct BulkUpdateSkillCompetency call syntax to standard form

UX Impact Notes - Summary: The JSON response affects user flow by triggering redirects or displaying messages. - JSON response triggers redirects

Test Case Ideas - Summary: Validate UpdateSkillCompetency handles various Competency inputs and returns correct JSON responses. - Valid JSON Competency input updates successfully with JSON response - Empty Competency collection skips BulkUpdateSkillCompetency but returns JSON - Non-empty Competency collection triggers BulkUpdateSkillCompetency with correct data - BulkUpdateSkillCompetency called with correct parameters - Method returns valid JSON response containing expected data

Dependencies & Called Services - Summary: Uses IHRModel service for skill competency updates. - IHRModel service dependency

RelaseStartConstraint

Summary: RelaseStartConstraint handles an HTTP GET request, retrieves project activities and arrow details, and stores them for view rendering.

ActionResult ProcessController.RelaseStartConstraint()

Routing

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

Key Flows - Summary: RelaseStartConstraint handles an HTTP GET request - Handle HTTP GET request - Retrieve activities and arrow details by project ID, Store activities, arrows, and actors in ViewData for view

Performance Issues - Summary: Slow or resource-intensive methods degrade performance. - Slow GetActivities method, Slow GetArrowDetail method, Slow GetActors method

Maintainability Issues - Summary: Replace hardcoded values and associate HTTP attributes with methods for clarity. - Replace hardcoded 'ProjectId' with named constant or configurable parameter, Associate HTTP GET attribute directly with corresponding method

UX Impact Notes - Summary: Accurate and complete ViewData ensures correct user interface display. - Correctness of data in ViewData, Completeness of data in ViewData, Impact on user interface display

Test Case Ideas - Summary: Verify HTTP GET attribute, data retrieval, ViewData storage, and view rendering in RelaseStartConstraint. - HTTP GET attribute on RelaseStartConstraint, Data retrieval for activities, arrows, and actors by project ID, Correct storage of data in ViewData with keys 'activities', 'arrows', 'Actors', View rendering using ViewData content

Dependencies & Called Services - Summary: RelaseStartConstraint depends on actor and process models. - IActorModel dependency, IProcessModel dependency

ReleaseFormsActivities

Summary: Process HTTP GET request to retrieve and join project activities and actors data.

ActionResult ProcessController.ReleaseFormsActivities()

Routing

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

Key Flows - Summary: Process HTTP GET request to retrieve and join project activities and actors data. - Handle HTTP GET request for ReleaseFormsActivities - Read project XML data from ProcessMapModel, Retrieve activities, arrows, and actors data from models, Join activities and actors data into detailed list

Performance Issues - Summary: Multiple database calls degrade performance with large data or slow networks. - Performance impact on large datasets

Maintainability Issues - Summary: Anonymous types reduce code readability and maintainability. - Use of anonymous types in data processing

Test Case Ideas - Summary: Verify ReleaseFormsActivities correctly processes and stores project, activities, arrows, and actors data on HTTP GET. - Invoke ReleaseFormsActivities on HTTP GET, Read project data from ProcessMapModel, Retrieve activities, arrows, and actors data from models, Join and process activities and actors data into list, Store processed data in ViewData for view

Dependencies & Called Services - Summary: Uses core interfaces and collections for process and actor modeling. - Enum usage, Enumerable collections, IActorModel interface, IProcessModel interface

DeadlinesActivities

Summary: The method handles an HTTP GET request, reads project XML data, joins activities with actors, and prepares data for the view.

ActionResult ProcessController.DeadlinesActivities()

Routing

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

Key Flows - Summary: The method handles an HTTP GET request - Handle HTTP GET request - Read project XML via ProcessMapModel.ReadProjectXml, Retrieve activities, arrows, and actors from models, Join and filter activities with actors using LINQ, Populate ViewData and ViewBag with processed data

Error Flows - Summary: The method lacks explicit error handling and exception management. - Absence of error handling, No exception management

Performance Issues - Summary: Multiple database calls and LINQ queries degrade method performance. - Multiple database calls in one method, Excessive LINQ queries within method

Maintainability Issues - Summary: The method mixes data retrieval, transformation, and view population, harming maintainability. - Multiple unrelated tasks in one method, Reduced maintainability, Complicated testing

UX Impact Notes - Summary: Prepares and populates data for displaying deadlines and activities in the UI. - Prepare view data, Populate deadlines and activities, Impact UI presentation

Test Case Ideas - Summary: Verify HTTP GET handling, data retrieval, and LINQ-based data processing. - Retrieve and display project data, Filter and transform data with LINQ

Dependencies & Called Services - Summary: Uses core data types and interfaces for actor and process modeling. - Enum usage, Enumerable collections, IActorModel interface, IProcessModel interface, String type

SaveProcessWaitTypesReleaseConstraint

Summary: Decode JSON from request, save configuration and process wait types release.

JsonResult ProcessController.SaveProcessWaitTypesReleaseConstraint()

Routing

  • HTTP: POST
  • URL: /Process/SaveProcessWaitTypesReleaseConstraint

Cross-layer call chain - ProcessController.SaveProcessWaitTypesReleaseConstraint → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_SaveProcessWaitTypesReleaseConstraint["ProcessController.SaveProcessWaitTypesReleaseConstraint"]
    ProcessController_SaveProcessWaitTypesReleaseConstraint --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: Decode JSON from request, save configuration and process wait types release. - Decode JSON data into Arrow objects, Save configuration details - Process wait types release

Error Flows - Summary: Handle invalid JSON - and unhandled downstream errors. - Invalid or non-compliant ActivityID affecting updates

Security Issues - Summary: Fix JSON deserialization and SQL injection vulnerabilities from unvalidated input. - SQL injection and data tampering risks from unvalidated Request.Form data

Performance Issues - Summary: Inefficient JSON handling and repeated integer conversions degrade performance. - Inefficient JSON parsing from first form value, Repeated Convert.ToInt32 calls on request form data

Maintainability Issues - and clarify conditional logic for maintainability. - Truncated conditional statement obscures logic

UX Impact Notes - Summary: Condition on ActivityID may disrupt user form processing flow. - User flow disruption from ActivityID condition, Form processing impact

Test Case Ideas - conditional logic - status updates - and error logging. - Decode JSON data from request form, Save configuration and process wait types release - Log error messages with current date and time - Update reviewed status correctly for various inputs - Validate conditional behavior for different ActivityID values

Dependencies & Called Services - Summary: Uses utilities and interfaces for data conversion, logging, and process modeling. - DateTime conversion, Enum handling, IProcessModel interface - LoggingManager for logging

ExcelTemplate

Summary: The method handles an HTTP GET request and returns a View to the client.

ActionResult ProcessController.ExcelTemplate()

Routing

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

Key Flows - Summary: The method handles an HTTP GET request and returns a View to the client. - Handle HTTP GET request - Return View to client

UX Impact Notes - Summary: Renders a specific user interface to impact user experience. - Returns a View

Test Case Ideas - Summary: Verify ExcelTemplate handles GET requests and returns the correct View. - Return View response

ActivityProduct

Summary: Retrieve and process project data, filter and deduplicate product factors, and prepare joined activity-actor data for the view.

ActionResult ProcessController.ActivityProduct()

Routing

  • HTTP: GET
  • URL: /Process/ActivityProduct

Cross-layer call chain - ProcessController.ActivityProduct → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_ActivityProduct["ProcessController.ActivityProduct"]
    ProcessController_ActivityProduct --> Andromeda_Core_Entities_Project_GetTags
View Metadata
  • View: ActivityProduct (Andromeda.Web\Views\Process\ActivityProduct.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and process project data, filter and deduplicate product factors, and prepare joined activity-actor data for the view. - Create ProductFactor objects with unique temporary IDs for TagsRelatedProducts - Join activities with actors ordered by DFSIndex and assign to ViewData

Error Flows - Summary: The method lacks explicit error handling and exception management. - Absence of explicit error handling, No exception management implemented

Performance Issues - Summary: Multiple database calls and inefficient collection operations degrade performance. - Nested 'Any' methods causing slow tag matching on large datasets

Maintainability Issues - reassigns variables - Reassignment of listofProductNames causing potential confusion

UX Impact Notes - Summary: Populate lists and view bags to display data, directly affecting user experience. - Data retrieval for display, Populating lists and view bags, Direct impact on user interface

Test Case Ideas - Summary: Verify data retrieval, tag processing, filtering, grouping, product factor creation, and ViewData population. - Return correct data for valid project ID - GetTags method returns expected tags

Dependencies & Called Services - Summary: Uses collections and interfaces for modeling actors, controls, processes, and projects. - Enumerable for collection operations, IActorModel interface for actor representation, IControlModel interface for control representation, IProcessModel interface for process representation, List collection for managing items, Project entity for project data, String type for text data

UpdateMode

Summary: UpdateMode decodes JSON, updates arrow modes for activities, conditionally updates Mode, and returns JSON result.

JsonResult ProcessController.UpdateMode()

Routing

  • HTTP: POST
  • URL: /Process/UpdateMode
Detailed Analysis

Key Flows - Summary: UpdateMode decodes JSON - updates arrow modes for activities - conditionally updates Mode - and returns JSON result. - Conditionally update Mode based on decoded data - Return JSON result - Update arrow mode in process map model per activity

Error Flows - Summary: Handle JSON decoding errors to prevent runtime failures. - Lack of JSON decoding exception handling, Risk of compilation or runtime errors from incomplete code

Security Issues - Summary: System.Web.Helpers.Json.Decode risks JSON deserialization vulnerabilities and uses deprecated code. - JSON deserialization vulnerability from untrusted input, Use of deprecated System.Web.Helpers.Json.Decode with potential security flaws

Performance Issues - Summary: Decoding large JSON collections and repeated type conversions degrade performance. - Decode entire JSON collection into memory, Iterate over large activity collections, Repeated conversions of activity properties to integers and strings

Maintainability Issues - Summary: UpdateMode uses deprecated JSON decoding - Undefined variable 'J' in return statement

Test Case Ideas - Summary: Validate JSON decoding - conditional logic - Mode updates - Check JSON data equality conditions - Test UpdateArrowMode with varied Predecessor and Id inputs - Verify conditional updates of Mode property - Ensure method returns valid JSON results

Dependencies & Called Services - Summary: UpdateMode uses Convert and IProcessModel services. - Convert service, IProcessModel interface

ClusterRankingOnDemand

Summary: Retrieve project data and configuration, perform cluster analysis, and return updated activities as JSON.

JsonResult ProcessController.ClusterRankingOnDemand()

Routing

  • HTTP: GET
  • URL: /Process/ClusterRankingOnDemand
Detailed Analysis

Key Flows - and return updated activities as JSON. - Return updated base activities as JSON response

Performance Issues - Summary: Inefficient data retrieval and looping cause performance bottlenecks in cluster processing. - Use of ToList() on large datasets

Maintainability Issues - Summary: Replace magic strings with constants and improve condition readability. - Use constants or enums instead of magic strings 'Cluster' and 'K-means', Improve readability of FirstOrDefault condition by fixing line breaks and indentation

UX Impact Notes - Summary: The JSON response delivers processed activities for UI display and further client processing. - Enables client-side UI rendering and processing - Processed base activities in JSON response

Test Case Ideas - data assignments - and conditional logic. - Return correct value from GetConfigurationValue - Assign 'nk' from 'cl.Value' correctly - Validate conditional checks on 'actD' and 'ID' properties

Dependencies & Called Services - Summary: Uses data conversion and interfaces for actor, control, and process models. - Data conversion utilities, Enumerable collections, IActorModel interface, IControlModel interface, IProcessModel interface

VisioMapProcessCreation

Summary: Handles HTTP GET request by setting ProjectName in ViewData and returning the View.

ActionResult ProcessController.VisioMapProcessCreation()

Routing

  • HTTP: GET
  • URL: /Process/VisioMapProcessCreation
Detailed Analysis

Key Flows - Summary: Handles HTTP GET request by setting ProjectName in ViewData and returning the View. - Handle HTTP GET request - Set ProjectName in ViewData from Registry.CurrentProject - Return corresponding View

UX Impact Notes - Summary: The returned View directly affects user experience based on its content. - Returned View impacts user experience

Test Case Ideas - Summary: Verify VisioMapProcessCreation handles GET requests - sets ProjectName - and returns correct View. - Set ProjectName in ViewData - Return expected View

CheckVisioValidations

Summary: CheckVisioValidations loads error XML, parses elements, saves data if no errors, updates view, and redirects.

ActionResult ProcessController.CheckVisioValidations()

Routing

  • HTTP: GET
  • URL: /Process/CheckVisioValidations

Cross-layer call chain - ProcessController.CheckVisioValidations → Andromeda.Core.Utility.Encrypt.DecryptString - ProcessController.CheckVisioValidations → Andromeda.Validation.ProcessMapValidation.Validate - ProcessController.CheckVisioValidations → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone - ProcessController.CheckVisioValidations → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    ProcessController_CheckVisioValidations["ProcessController.CheckVisioValidations"]
    ProcessController_CheckVisioValidations --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_CheckVisioValidations --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_CheckVisioValidations --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_CheckVisioValidations --> Andromeda_Validation_ProcessMapValidation_Validate
View Metadata
  • View: CheckVisioValidations (Andromeda.Web\Views\Process\CheckVisioValidations.cshtml)
  • Model: List<Andromeda.Validation.VisioError>
Detailed Analysis

Key Flows - Summary: CheckVisioValidations loads error XML - updates view - and redirects. - Load error XML file if it exists - Redirect to complete the process - Retrieve project ID and construct error and activity XML file paths, Initialize and populate swimlanes, shapes, edges, and errors from XML, Call TraverseAndSave to persist data if no errors found, Save activities and new products using actor and control models - Update ViewData to indicate validation success and construct additional file paths

Error Flows - Summary: The method halts processing on missing files or validation errors and risks exceptions from null or empty inputs. - File existence checks fail or exceptions occur with empty or null project ID or file paths

Security Issues - Summary: CheckVisioValidations risks configuration exposure and XML injection vulnerabilities. - Use of ConfigurationManager.AppSettings for file paths risks configuration compromise

Performance Issues - Summary: Optimize configuration access, XML parsing, LINQ usage, database calls, and large file loading for better performance. - Inefficient ConfigurationManager.AppSettings access - Loading large XML files impacting performance

Maintainability Issues - Summary: Hardcoded paths, magic strings/numbers, incomplete code, and direct config access reduce maintainability. - Direct use of ConfigurationManager.AppSettings reduces testability and flexibility

UX Impact Notes - Summary: Validation results and redirects directly affect user navigation and error display. - NoErrors ViewData controls error message display, Validation errors impact downstream user interactions - Redirects alter user navigation flow

Test Case Ideas - Summary: Validate file path - property updates - and redirects. - ActivityId property updates based on shape existence - ViewData updates and file path construction on success - Redirect behavior after validations

Dependencies & Called Services - Summary: Uses models, data structures, and utilities for Visio validation and processing. - Data conversion utilities, Edge and shape information models, Encryption services, Enumerable collections, File handling, Actor, control, process, and project models, Integer and string types, XML container and element handling - Process and validation logic

UpdateErrorsXMLFile

Summary: Decode JSON data from the request, convert to typed collections, and update the Visio file accordingly.

JsonResult ProcessController.UpdateErrorsXMLFile()

Routing

  • HTTP: POST
  • URL: /Process/UpdateErrorsXMLFile
Detailed Analysis

Key Flows - and update the Visio file accordingly. - Call CreateOrUpdateErrorsVisio with StreamWriter and populated collections

Error Flows - Summary: Handle exceptions from integer conversion and JSON deserialization failures. - Unhandled exceptions from Convert.ToInt32 on invalid input

Security Issues - Summary: System.Web.Helpers.Json.Decode risks JSON deserialization without input validation. - JSON deserialization vulnerability, Lack of input validation or sanitization

Performance Issues - Summary: Optimize repeated JSON decoding, large collection iterations, and repeated type conversions. - Repeated System.Web.Helpers.Json.Decode calls, Iteration over large collections like edgeInfo, shapesInfo, SwimLaneInfo, Repeated Convert.ToInt32 and Convert.ToDouble calls inside loops

Maintainability Issues - and simplify boolean assignments to improve maintainability. - risking unhandled FormatExceptions - Simplify conditional boolean assignments

Test Case Ideas - Summary: Validate JSON input - Create EdgeInfo objects with valid integer conversions - Handle missing JSON keys for robustness - Call CreateOrUpdateErrorsVisio with valid StreamWriter - Process empty collections correctly - Validate JSON keys 'Edges'

Dependencies & Called Services - Summary: Convert and process list data for called services. - Convert list data - Process called services

CreateOrUpdateErrorsVisio

Summary: Transform input data into XML, manage file paths and directories, and save the Visio errors XML file.

void ProcessController.CreateOrUpdateErrorsVisio(List<SwimlaneInfo> swimlanes, List<ShapeInfo> shapes, List<EdgeInfo> edges)

Routing

  • URL: /Process/CreateOrUpdateErrorsVisio

Cross-layer call chain - ProcessController.CreateOrUpdateErrorsVisio → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    ProcessController_CreateOrUpdateErrorsVisio["ProcessController.CreateOrUpdateErrorsVisio"]
    ProcessController_CreateOrUpdateErrorsVisio --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
Detailed Analysis

Key Flows - Summary: Transform input data into XML, manage file paths and directories, and save the Visio errors XML file. - Create target directory if it does not exist - Delete existing target XML file if present - Transform shapes, swimlanes, and edges into XML elements, Construct file and directory paths using project variables, Save new XML document representing Visio errors

Error Flows - Summary: Fix typos and incomplete code to prevent compilation and runtime errors. - Typo in method name 'ToStri' causing compilation errors, Incomplete file deletion code causing runtime errors, Undefined behavior from 'ng()' method call

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

Performance Issues - Summary: LINQ and string manipulation degrade performance with large shape, swimlane, or edge lists. - Performance degradation with large shape lists, Inefficient LINQ usage, Costly string manipulation

Maintainability Issues - Summary: Fix typos, remove unused code, clarify method calls, and avoid magic strings for maintainability. - Avoid magic strings for XML element and attribute names, Correct method name typo 'ToStri' to prevent compilation errors, Remove unused variables and incomplete code, Clarify purpose and usage of 'ng()' method call

Test Case Ideas - Summary: Verify input handling, file path correctness, directory and file operations, Save invocation, and typo error handling. - Check directory existence and creation logic - Verify file existence check and deletion behavior - Detect and handle 'ToStri' typo errors - Handle empty shape - Validate file path construction for ProjectId and ProjectFolder

Dependencies & Called Services - Summary: Uses data types, file handling, XML processing, and LINQ extensions. - Decimal data type, Directory file system access, Double data type, File file handling, Int32 data type, LINQ extensions, String data type, XContainer XML container, XElement XML element

CreateXMLForActivityProps

Summary: Convert shape and activity data into XML, ensure project folder exists, and save XML document.

void ProcessController.CreateXMLForActivityProps(List<ShapeInfo> shapes, List<ActivityProperty> properties)

Routing

  • URL: /Process/CreateXMLForActivityProps

Cross-layer call chain - ProcessController.CreateXMLForActivityProps → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    ProcessController_CreateXMLForActivityProps["ProcessController.CreateXMLForActivityProps"]
    ProcessController_CreateXMLForActivityProps --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
Detailed Analysis

Key Flows - Summary: Convert shape and activity data into XML, ensure project folder exists, and save XML document. - Verify and create project folder if missing

Security Issues - Summary: The method risks security by using a folder path from ConfigurationManager.AppSettings. - Use of folder path from ConfigurationManager.AppSettings

Performance Issues - Summary: RemoveLineBreakChars() and Trim() slow down processing for large text inputs. - Use of RemoveLineBreakChars() on each shape's text, Use of Trim() on each shape's text

Maintainability Issues - Summary: Replace magic strings with named constants to improve maintainability. - Magic strings for XML element names, Magic string 'ProjectFolder' for configuration key

Test Case Ideas - Summary: Validate XML generation - folder setup - Set 'folder' variable from application configuration - Create folder if it does not exist - Handle empty input lists correctly - Validate generated XML against expected schema

Dependencies & Called Services - Summary: Uses system and XML libraries for data manipulation and XML element creation. - Directory access, Integer operations, LINQ extensions, String handling, XML container manipulation, XML element creation

BulkUndesiredUpdate

Summary: Decode activities from JSON, group by undesired outcome, update each in bulk, and return the result.

JsonResult ProcessController.BulkUndesiredUpdate()

Routing

  • HTTP: POST
  • URL: /Process/BulkUndesiredUpdate
Detailed Analysis

Key Flows - update each in bulk - and return the result. - Return JsonResult with bulk update outcome - Update each activity ID with project ID and parameter 'u'

Error Flows - Summary: Handle JSON deserialization errors - JSON deserialization failure on invalid input, Runtime errors from incomplete or corrupted code, Undefined variable usage causing errors

Security Issues - Summary: Prevent JSON deserialization vulnerabilities by validating and sanitizing input. - JSON deserialization vulnerability, Lack of input validation and sanitization

Performance Issues - Summary: Optimize JSON decoding and avoid ToList() in loops to improve performance. - Inefficient JSON decoding with System.Web.Helpers.Json.Decode on large inputs, Memory overhead from ToList() usage inside loops

Maintainability Issues - Summary: The method lacks clear naming, documentation, and contains corrupted code, hindering maintainability. - Non-descriptive method name, Unclear variable naming, Corrupted or incomplete code lines, Unclear code structure and missing context

Test Case Ideas - Summary: Verify BulkUndesiredUpdate processes input correctly and calls UpdateUndesired appropriately. - Handle empty 'und' collection - Return JsonResult - Call UpdateUndesired for each activity ID - Pass correct project and activity IDs to UpdateUndesired - Define and pass 'u' variable correctly to UpdateUndesired

Dependencies & Called Services - Summary: BulkUndesiredUpdate depends on IProcessModel service. - Dependency on IProcessModel service

UpdateBulkDOE

Summary: UpdateBulkDOE decodes JSON, updates DOE activity properties, sets reviewed status, and logs the update or handles empty DOE lists.

JsonResult ProcessController.UpdateBulkDOE()

Routing

  • HTTP: POST
  • URL: /Process/UpdateBulkDOE

Cross-layer call chain - ProcessController.UpdateBulkDOE → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_UpdateBulkDOE["ProcessController.UpdateBulkDOE"]
    ProcessController_UpdateBulkDOE --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: UpdateBulkDOE decodes JSON - updates DOE activity properties - sets reviewed status - and logs the update or handles empty DOE lists. - Set activity properties and update reviewed status - Handle empty DOE list by setting default activity properties - Log update operation

Error Flows - Summary: UpdateBulkDOE lacks input validation and exception handling - Invalid or missing JSON data causes deserialization failures, Syntax errors and incomplete code cause compilation or runtime errors, No explicit exception handling leads to ungraceful error management

Security Issues - Summary: Prevent JSON deserialization attacks by validating input before decoding. - JSON deserialization vulnerability, Lack of input validation before Json.Decode

Performance Issues - Summary: Optimize iteration and data processing to prevent performance degradation on large DOE collections. - Inefficient iteration over large DOE collections and activity properties, Unoptimized use of GroupBy, ToList(), and First() causing multiple enumerations, Excessive Convert.ToInt32() calls impacting performance

Maintainability Issues - Summary: Fix undefined variables, improve naming, remove magic numbers, and correct syntax errors. - Undefined variable 'f' causes compilation errors, Syntax errors reduce readability and maintainability, Non-descriptive variable names hinder code understanding, Magic numbers and strings reduce code clarity, Variable names lack descriptiveness

Test Case Ideas - DOE flag setting - and performance with large datasets. - Handle valid JSON data in request - Set 'haveDOEs' flag based on DOE presence - Group properties correctly and set distinct properties - Evaluate performance with large datasets

Dependencies & Called Services - Summary: UpdateBulkDOE uses data conversion - DateTime conversion, Enumerable collection processing, IControlModel interface usage, IProcessModel interface usage, List data structure, String manipulation - LoggingManager for logging

ImplementLOT

Summary: Extract form data, filter product factors and activities, then update activity volumes and bulk AHT accordingly.

JsonResult ProcessController.ImplementLOT()

Routing

  • HTTP: POST
  • URL: /Process/ImplementLOT
Detailed Analysis

Key Flows - then update activity volumes and bulk AHT accordingly. - Set bSize if LOTType is 'UnBatch' (case-insensitive) - Filter child project product factors by parent project product names and update selected IDs - Assign selected product IDs to allProductIds - Update volumes of activities with 'CONSTANT' volume formula by volumeLOT factor - Update activity volumes in control model - Update bulk AHT for activities with non-zero average handling time using TimeSpan conversions

Error Flows - Summary: Handle missing form keys - Null reference exceptions from missing form keys, Exceptions from invalid int, bool, or double conversions, Division by zero error when bSize is zero, Compilation or runtime errors from incomplete code

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

Performance Issues - Summary: Multiple LINQ queries and database calls degrade performance on large datasets. - Multiple LINQ queries on product factors and activities, Inefficient use of Contains and Equals in LINQ Where clauses, Multiple database calls for parent and child project product factors

Maintainability Issues - Summary: The code uses magic strings, has syntax errors, misspellings, unclear variables, and complex LINQ queries. - Use of magic strings for form keys and LINQ queries, Syntax errors including missing brackets and semicolons, Misspelled variable names, Commented-out code and unclear variable usage, Complex LINQ queries lacking clear explanations

UX Impact Notes - Summary: ImplementLOT returns JsonResult and requires robust client-side handling to prevent UX disruption. - JsonResult return requires proper client-side handling - Unhandled exceptions from invalid form data disrupt UX

Test Case Ideas - Summary: Validate case-insensitive LOTType handling - filtering logic - volume updates - bSize set to 1 for eCase condition - Performance testing with large datasets and LINQ queries - Method returns JsonResult and covers all branches

Dependencies & Called Services - Summary: Use collections, interfaces, and types for data processing and time management. - Enumerable for collection operations, List for data storage, IControlModel and IProcessModel interfaces for abstraction, String for text manipulation, TimeSpan for time interval management, Convert for type conversions - Process for system process handling

GetTeamActivities

Summary: GetTeamActivities fetches and filters project activities by TeamId, returning them as JSON.

JsonResult ProcessController.GetTeamActivities(int? TeamId)

Routing

  • HTTP: GET
  • URL: /Process/GetTeamActivities

Cross-layer call chain - ProcessController.GetTeamActivities → Andromeda.Core.Services.ProcessExtensions.FindByID

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_GetTeamActivities["ProcessController.GetTeamActivities"]
    ProcessController_GetTeamActivities --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - returning them as JSON. - Fetch base activities, arrows, and product factors for current project - Return filtered activities as JSON response

Error Flows - Summary: Handle invalid TeamId by returning empty list or appropriate error response. - Return empty list or error response

Performance Issues - Summary: Multiple database calls cause performance degradation without caching or optimization. - Multiple database calls in GetTeamActivities, Lack of caching for database queries, No query optimization for GetActivities, getArrowDetail, GetProductFactorsForProject

Maintainability Issues - Summary: No maintainability issues identified.

UX Impact Notes - Summary: Returning JSON activities enables UI display but errors degrade user experience. - JSON result enables activity display, Improper formatting harms UI, Data retrieval errors degrade UX

Test Case Ideas - Summary: Verify GetTeamActivities handles GET requests - returns correct data - and performs well with large datasets. - Handle HTTP GET requests - Return correct activities for valid TeamId - Evaluate performance with large datasets

Dependencies & Called Services - Summary: Uses collections, actor/control/process models, math utilities, and time management extensions. - Enumerable for collection operations, IActorModel for actor-related data, IControlModel for control-related data, IProcessModel for process-related data, List for data storage, Math for calculations, TimeSpan for time intervals - ProcessExtensions for process utilities

GetTeamActivityCompetency

Summary: The method filters project activities by TeamId and returns those with business rules as JSON.

JsonResult ProcessController.GetTeamActivityCompetency(int? TeamId)

Routing

  • HTTP: GET
  • URL: /Process/GetTeamActivityCompetency
Detailed Analysis

Key Flows - Summary: The method filters project activities by TeamId and returns those with business rules as JSON. - Return activities with business rules as JSON

Security Issues - Summary: Sanitize TeamId to prevent SQL injection in activity queries. - SQL injection risk from unsanitized TeamId, Input validation for TeamId

Performance Issues - Summary: Multiple database queries degrade performance by fetching activity properties and project activities separately. - Multiple database queries, Separate retrieval of activity properties, Separate retrieval of project activities

Maintainability Issues - Summary: Tight coupling reduces modularity and complicates testing and future changes. - Tight coupling between ProcessController, controlModel, and ProcessMapModel, Reduced modularity, Complicated testing and future changes

UX Impact Notes - Summary: The method returns JSON that requires proper formatting and error handling to ensure good UX. - JSON response format, Proper data formatting, Error handling for UX

Test Case Ideas - Summary: Verify GetTeamActivityCompetency handles valid requests and filters activities correctly. - Filter data by valid TeamId, Exclude activities without business rules - Handle HTTP GET requests - Process activities with empty properties

Dependencies & Called Services - Summary: Uses data collections, control and process models, and string operations. - IControlModel for control logic

SaveControlPatternActivityDetails

Summary: Decode JSON from POST, process valid activities, populate products, set control model product, and save activity names.

JsonResult ProcessController.SaveControlPatternActivityDetails()

Routing

  • HTTP: POST
  • URL: /Process/SaveControlPatternActivityDetails
Detailed Analysis

Key Flows - set control model product - Set control model product from activity products

Error Flows - Summary: Skip activities with invalid IDs and handle missing properties during conversion. - Handle missing or invalid properties during activity conversion - Skip activities with ActivityID 0 to avoid invalid entries

Security Issues - Summary: Unsanitized JSON input from Request.Form risks deserialization attacks. - Unsanitized JSON input from Request.Form, JSON deserialization vulnerability

Performance Issues - Summary: Optimize JSON deserialization, collection iteration, and repeated calculations to improve performance. - Inefficient JSON deserialization from Request.Form with large data, Performance impact from iterating large activity and product collections, Repeated conversions and rounding of average handling time

Maintainability Issues - Summary: Refactor code to improve readability, decouple dependencies, and enhance error handling. - Replace magic number (0) with named constant for SimulationProjectId, Decouple method from request form and JSON decoding for easier testing, Refactor repeated Convert.ToInt32 and Convert.ToDecimal calls with error handling, Avoid incomplete or truncated code snippets to maintain clarity

Test Case Ideas - Summary: Validate JSON decoding - Create and add ActivityProduct to collection - Set product correctly for each activity product - Handle large form data for performance - Process activities with non-zero ActivityID

Dependencies & Called Services - Summary: Uses collection conversion, control and process models, math operations, and time span calculations. - Collection conversion, Control model interface, Mathematical operations, TimeSpan calculations - Process model interface

PermanentDeleteProject

Summary: PermanentDeleteProject permanently removes a project and all associated data.

JsonResult ProcessController.PermanentDeleteProject()

Routing

  • HTTP: POST
  • URL: /Process/PermanentDeleteProject

Cross-layer call chain - ProcessController.PermanentDeleteProject → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProcessController_PermanentDeleteProject["ProcessController.PermanentDeleteProject"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_PermanentDeleteProject --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: PermanentDeleteProject permanently removes a project and all associated data.

Error Flows - Summary: Reject deletion on invalid project ID or incorrect captcha input. - Invalid or missing ProjectId causing project retrieval failure and error, Incorrect captcha input causing error response and deletion prevention

Security Issues - Summary: PermanentDeleteProject risks SQL injection, brute-force captcha attacks, and information leaks. - Direct conversion of ProjectId without validation risks SQL injection and data tampering, Missing input validation allows malformed or malicious ProjectId, No rate limiting or IP blocking enables brute-force captcha attacks, Error messages disclose project owner names, causing information leakage

Performance Issues - Summary: No performance issues identified in PermanentDeleteProject method.

Maintainability Issues - Summary: The method uses hardcoded strings, magic numbers, static classes, and contains syntax errors reducing maintainability. - role checks - Hardcoded configuration key for app settings retrieval

UX Impact Notes - Summary: Provide clear JSON responses but hardcoded messages and difficult captchas harm UX. - Clear JSON responses for success, invalid project, captcha errors, and permission issues, Hardcoded error messages limit localization and user-friendly messaging, Difficult captchas degrade user experience

Test Case Ideas - Summary: Validate input handling - registry updates - Registry update on matching project ID

Dependencies & Called Services - Summary: Uses data conversion, project and process models, and registry access. - Data conversion utilities, Project model interface, Registry access, String operations - Process model interface

Checksynonyms

Summary: Process new properties to map business rules, retrieve synonyms, detect duplicates against old properties, and return duplicates as JSON.

JsonResult ProcessController.Checksynonyms()

Routing

  • HTTP: POST
  • URL: /Process/Checksynonyms

Cross-layer call chain - ProcessController.Checksynonyms → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_Checksynonyms["ProcessController.Checksynonyms"]
    ProcessController_Checksynonyms --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - and return duplicates as JSON. - Return duplicates list as JSON result

Error Flows - Summary: Handle JSON deserialization errors gracefully and log processing exceptions without halting execution. - Catch and log processing exceptions without rethrowing or returning

Security Issues - Summary: Fix JSON deserialization and SQL injection vulnerabilities by validating inputs. - JSON deserialization vulnerability from unvalidated request form data

Performance Issues - Summary: Optimize synonym retrieval to prevent slowdowns from repeated calls and large collections. - Performance degradation iterating large new property collections, Inefficiency from repeated getSynonyms calls without caching, Multiple enumerations from LINQ Where and ToList on large collections, Performance impact from exception handling inside loops

Maintainability Issues - Summary: Improve naming, decouple classes, avoid tuples, and fix incomplete code for maintainability. - Non-standard C# variable naming, Tight coupling with ProcessMapModel and Registry classes, Use of Tuple reduces readability and maintainability, Incomplete and unclear code sections

Test Case Ideas - Summary: Validate Checksynonyms method's JSON output - Handle malformed JSON input in Decode method - Test filtering logic with varied inputs and expected outputs - Confirm method compiles and returns valid JSON - Validate Checksynonyms returns valid JsonResult - Validate getSynonyms returns expected results

Dependencies & Called Services - and logging manager for service operations. - Enumerable for collection operations, IProcessModel interface for process handling, List for data storage - LoggingManager for logging

ValidateFormsBrsSynonyms

Summary: Decode JSON form data, retrieve synonyms for each property, detect duplicates, and return validation results.

JsonResult ProcessController.ValidateFormsBrsSynonyms()

Routing

  • HTTP: POST
  • URL: /Process/ValidateFormsBrsSynonyms

Cross-layer call chain - ProcessController.ValidateFormsBrsSynonyms → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ValidateFormsBrsSynonyms["ProcessController.ValidateFormsBrsSynonyms"]
    ProcessController_ValidateFormsBrsSynonyms --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - and return validation results. - Detect duplicates via collection filtering and containment checks - Return JSON with validation data

Error Flows - Summary: Handle exceptions by logging and returning JSON error responses. - Exception handling with try-catch - Return JSON response indicating failure or error - Log exceptions using LoggingManager.Exception

Security Issues - Summary: Unvalidated input causes JSON deserialization vulnerability in Decode method. - Unvalidated input from request form

Performance Issues - Summary: Optimize JSON decoding and avoid nested 'Where' and 'Contains' calls in loops for better performance. - Nested 'Where' and 'Contains' calls inside loops causing slow performance on large datasets

Maintainability Issues - Summary: Improve code clarity by using descriptive variable names and avoiding complex types. - Non-descriptive variable names reduce code clarity, Incomplete or corrupted code hinders maintainability, Use of Tuple and anonymous types reduces readability

UX Impact Notes - Summary: The method's JSON response controls validation display and page redirection. - JSON response controls page redirection

Test Case Ideas - Summary: Validate method handles various JSON inputs - returns correct synonyms - Verify getSynonyms returns expected results - Test performance with large datasets - Return valid JSON responses - Handle valid JSON input - Handle large JSON input - Handle empty synonym collections - Handle duplicate synonyms in collections

Dependencies & Called Services - and logging for form validation. - Enumerable for collection operations, IProcessModel interface for process handling, List for data storage - LoggingManager for logging

UndesiredUpdate

Summary: Parse valid ID, retrieve and convert undesired outcome status, update process map, return JSON response.

JsonResult ProcessController.UndesiredUpdate()

Routing

  • HTTP: POST
  • URL: /Process/UndesiredUpdate
Detailed Analysis

Key Flows - update process map - return JSON response. - Return JSON response - Update process map

Error Flows - Summary: The method lacks explicit validation and exception handling for invalid or missing 'ID' values. - Potential silent failures or incorrect updates due to invalid 'ID'

Security Issues - Summary: Lack of input validation exposes the method to SQL injection and data tampering. - Missing input validation and sanitization for 'ID' from request form, Direct use of 'IsUndesiredOutcome' from request form without validation

Performance Issues - Summary: Multiple database updates in one method degrade performance. - Multiple database updates in single method

Maintainability Issues - Summary: Improve naming conventions and complete code for better readability and maintainability. - Non-standard variable naming for 'Id', Undefined variable 'J' usage, Incomplete code and conditional statements

UX Impact Notes - Summary: Returning JSON response disrupts user flow if unhandled. - JSON response return

Test Case Ideas - Summary: Verify UndesiredUpdate handles IDs - updates status - and returns correct JSON. - Handle missing ID values - Update undesired outcome and reviewed status - Validate ID greater than zero with various inputs - Ensure method returns expected object

Dependencies & Called Services - Summary: Uses conversion and processing services with integer data. - Conversion service, IProcessModel interface, Integer data type

SaveVolumeProduct

Summary: Extract form data, update volumes and configuration, recalculate metrics, update status, and return JSON result.

JsonResult ProcessController.SaveVolumeProduct()

Routing

  • HTTP: POST
  • URL: /Process/SaveVolumeProduct

Cross-layer call chain - ProcessController.SaveVolumeProduct → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.SaveVolumeProduct → Andromeda.Core.LoggingManager.Exception - ProcessController.SaveVolumeProduct → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - ProcessController.SaveVolumeProduct → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - 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_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_SaveVolumeProduct["ProcessController.SaveVolumeProduct"]
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_SaveVolumeProduct --> Andromeda_Core_LoggingManager_Error
    ProcessController_SaveVolumeProduct --> Andromeda_Core_LoggingManager_Exception
    ProcessController_SaveVolumeProduct --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_SaveVolumeProduct --> Andromeda_Core_Services_Algorithms_Delooper_deloop
Detailed Analysis

Key Flows - update volumes and configuration - update status - and return JSON result. - Invoke UpdateVolumes to apply changes - Return JSON response with save result - Update configuration and activity product volume - Update process reviewed status

Error Flows - Summary: Handle specific and general exceptions with logging but allow silent failure for loop increment errors. - Catch DeloopLoopIncrementException with empty block causing silent failure - Catch general exceptions and log using LoggingManager.Exception

Security Issues - Summary: User input lacks validation, risking SQL injection and data tampering. - Direct conversion of user input to integers without validation, Potential SQL injection if GetSourcesAndSinks does not sanitize input

Performance Issues - Summary: Multiple database queries and calculations degrade performance on large datasets. - Performance impact on large datasets

Maintainability Issues - Summary: Remove magic numbers and handle exceptions properly to improve maintainability. - Empty catch blocks hinder issue diagnosis and debugging

UX Impact Notes - Summary: Handle input errors and exceptions transparently to maintain clear user feedback. - Input conversion errors impact user experience, Lack of clear user feedback on errors, Silent exception handling causes unexpected behavior

Test Case Ideas - status updates - Check method returns expected JSON responses in normal and error cases - Confirm UpdateVolumes method invocation after updates - Verify GetSourcesAndSinks returns correct data and volume calculations - Ensure reviewed status updates correctly - Validate behavior with missing or empty form data

Dependencies & Called Services - Summary: SaveVolumeProduct uses utilities for data conversion, logging, math, and process management. - DateTime conversion utilities, Enumerable data processing, IProcessModel interface usage, Math operations - LoggingManager for logging - Process management

CheckPathMeetsatSameEnd

Summary: Load project activities and arrows, identify paths ending in activities with multiple successors, validate path conditions, and return error messages as JSON.

JsonResult ProcessController.CheckPathMeetsatSameEnd()

Routing

  • HTTP: GET
  • URL: /Process/CheckPathMeetsatSameEnd
Detailed Analysis

Key Flows - validate path conditions - and return error messages as JSON. - Check successor counts for activities in each path - Return error messages as JSON response with AllowGet - Validate path activity counts against successor counts

Error Flows - Summary: Validate activities with multiple predecessors or successors and return JSON errors if found. - Check activities with multiple predecessor arrows for further validation - Return JSON response with errors or no-error status - Validate activities with multiple successor IDs and add errors if invalid

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

Performance Issues - Summary: Multiple database calls and inefficient LINQ usage degrade performance. - Multiple database calls and large data retrieval, Inefficient LINQ methods (Where, Any, Select, Count) in loops, Repeated calls to FinalModel.GetCompletePrePath inside loops, Excessive use of ToList causing memory allocation and copying, Contains method used inside loops causing slowdowns

Maintainability Issues - Summary: The method uses magic values, unclear names, tight coupling, and incomplete code, reducing maintainability. - Use magic strings instead of constants or enums, Use magic numbers instead of named constants, Tight coupling with FinalModel and its methods, Tight coupling with VisioError class and ErrorMsg collection, Unclear variable names reduce readability, Incomplete and truncated code snippets, Use anonymous types in JSON transformation

UX Impact Notes - Summary: Returns JSON error messages that directly affect user feedback and experience. - Return JsonResult for error and validation feedback

Test Case Ideas - Summary: Verify method returns correct JsonResult and error messages across varied input scenarios. - Handle empty and populated allArrows with varied predecessor IDs - Return correct JsonResult for activities with zero or multiple predecessor arrows - Test conditional logic with SucIDs.Count values of 0 - Verify JsonRequestBehavior.AllowGet is set correctly based on conditions - Validate branching and error message generation with different Cnt

Dependencies & Called Services - Summary: Uses collections and interfaces for data handling and model abstraction. - Dictionary for key-value storage, Enumerable for collection iteration, IActorModel interface for actor abstraction, IFinalPlanModel interface for plan abstraction, List for ordered data storage, String for text manipulation

GetMIPredictionsData

Summary: The method validates ProjId, retrieves and filters project data, calls an external API, processes the response, and returns JSON.

JsonResult ProcessController.GetMIPredictionsData(int? ProjId, string related, int? all)

Routing

  • HTTP: GET
  • URL: /Process/GetMIPredictionsData

Cross-layer call chain - ProcessController.GetMIPredictionsData → Andromeda.Core.Services.Registry.GetPermissions - ProcessController.GetMIPredictionsData → Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialChar - Andromeda.Core.Services.Registry.GetPermissions → Andromeda.Core.Models.ModelHelper.GetProjectDetails

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialChar"]
    Andromeda_Core_Models_ModelHelper_GetProjectDetails["Andromeda.Core.Models.ModelHelper.GetProjectDetails"]
    Andromeda_Core_Services_Registry_GetPermissions["Andromeda.Core.Services.Registry.GetPermissions"]
    ProcessController_GetMIPredictionsData["ProcessController.GetMIPredictionsData"]
    Andromeda_Core_Services_Registry_GetPermissions --> Andromeda_Core_Models_ModelHelper_GetProjectDetails
    ProcessController_GetMIPredictionsData --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar
    ProcessController_GetMIPredictionsData --> Andromeda_Core_Services_Registry_GetPermissions
Detailed Analysis

Key Flows - Summary: The method validates ProjId - and returns JSON. - Process JSON response to populate activity properties - Return empty JSON if ProjId is missing - Return empty JSON if project details not found - Send data to external API via HttpClient - Return constructed data as JSON with AllowGet

Error Flows - Summary: The method returns empty JSON arrays on null inputs and lacks error handling for JSON parsing and null references. - Return empty JSON array if ProjId is null - Return empty JSON array if project details are null

Security Issues - Summary: The method risks resource leaks, injection attacks, and unsafe handling of external data. - Unsanitized user-controlled 'related' parameter used in conditional logic

Performance Issues - Summary: Optimize HTTP client usage, avoid blocking async calls, and reduce costly LINQ and string operations. - HttpClient created per request causing socket exhaustion - ToArray on large datasets

Maintainability Issues - Summary: The method suffers from unclear code, inconsistent naming, missing error handling, and tight coupling. - Use of magic strings reduces clarity and maintainability, Extensive anonymous types in LINQ hinder understanding and maintenance, Typos and incomplete code fragments reduce readability and increase bug risk, Lack of error handling for JSON decoding and data conversions complicates debugging, Inconsistent variable naming causes confusion, Tight coupling with specific namespaces and external dependencies reduces modularity

UX Impact Notes - Summary: Users face confusing empty responses, slow loading, and inconsistent data display without clear errors. - Unhandled JSON decoding and data conversion exceptions disrupt UX

Test Case Ideas - case-insensitive string logic - Case-insensitive string comparison logic - Allow GET requests and return JsonResult with AllowGet behavior

Dependencies & Called Services - Summary: Uses data conversion, serialization, collections, time handling, and registry access dependencies. - Data conversion utilities, Enumerable and Linq extensions, Model interfaces (IActorModel, IControlModel, IProcessModel, IProjectModel), JavaScript serialization, Collection types (List), Registry access, String manipulation, TimeSpan for time intervals

UpdateProductMIData

Summary: UpdateProductMIData processes product data, updates review status, and returns updated activities.

JsonResult ProcessController.UpdateProductMIData()

Routing

  • HTTP: POST
  • URL: /Process/UpdateProductMIData
Detailed Analysis

Key Flows - Summary: UpdateProductMIData processes product data - updates review status - and returns updated activities. - Fetch product factors for project via controlModel - Return JSON with updated activities - Update project reviewed status

Error Flows - Summary: Handle exceptions from invalid project ID or product data conversions. - Lack of input validation for project ID and product data, Exceptions from failed integer conversions, Missing error handling for conversion failures

Security Issues - Summary: UpdateProductMIData risks SQL injection from unvalidated input and unsafe method calls. - SQL injection vulnerability in UpdateProductbyName method call

Performance Issues - Summary: Inefficient list conversion and repeated type conversions degrade performance. - Inefficient ToList() call on large product factors, Repeated Convert.ToInt32 and Convert.ToString calls without error handling

Maintainability Issues - Summary: Replace magic strings and numbers with named constants to improve maintainability. - Use named constants for form field names, Avoid magic numbers for clarity

UX Impact Notes - Summary: Returning JSON requires proper client-side handling to maintain user flow. - Returning JSON object

Test Case Ideas - Summary: Verify UpdateProductMIData updates product data and status correctly with proper error handling. - Conditional logic with 'all' flag - Correct parameters in UpdateProductbyName call - Proper update of reviewed status

Dependencies & Called Services - Summary: Uses data conversion and model interfaces for processing product MI data. - Data conversion utilities, Dictionary and Enumerable collections, IControlModel interface, IProcessModel interface, String operations

UpdateAHTMIData

Summary: Extract and decode AHT data from the request, then bulk update using the processed collection.

void ProcessController.UpdateAHTMIData()

Routing

  • HTTP: POST
  • URL: /Process/UpdateAHTMIData
Detailed Analysis

Key Flows - then bulk update using the processed collection. - Bulk update data via UpdateBulkAHT

Error Flows - Summary: Handle invalid project ID causing Convert.ToInt32 exception. - Invalid project ID format, Convert.ToInt32 exception on invalid input

Security Issues - Summary: The method lacks input validation and sanitization, risking SQL injection and XSS attacks. - Missing input validation, Missing input sanitization, Risk of SQL injection, Risk of cross-site scripting (XSS)

Performance Issues - Summary: Optimize loop conversions and manage large collection growth to improve performance. - Repeated conversions and formatting inside loop, Uncontrolled growth of collection causing memory issues

Maintainability Issues - Summary: Remove magic strings and numbers; document UpdateBulkAHT method purpose clearly. - Lack of documentation for UpdateBulkAHT method behavior

Test Case Ideas - and UpdateBulkAHT invocation. - Invoke UpdateBulkAHT with populated collection

Dependencies & Called Services - Summary: Utilizes data conversion, collection handling, process modeling, math operations, and time measurement. - Data conversion, Collection handling, Mathematical operations, Time measurement - Process modeling

UpdateActivityPropsMIData

Summary: Process JSON input to update activity properties and reviewed status based on 'related' value for forms or business rules.

JsonResult ProcessController.UpdateActivityPropsMIData()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivityPropsMIData
Detailed Analysis

Key Flows - Summary: Process JSON input to update activity properties and reviewed status based on 'related' value for forms or business rules. - Perform case-insensitive checks on 'related' variable - Process form data when 'related' equals 'form', Process business rule data when 'related' equals 'businessrule' - Update activity properties and reviewed status - Update activity properties and business rules in database

Error Flows - Summary: Handle JSON decoding errors - JSON decoding exceptions, String-to-integer conversion failures, Null reference exceptions on business rule properties, Lack of validation for malformed or malicious input

Security Issues - Summary: Unvalidated user input risks SQL injection and XSS vulnerabilities. - UpdateActivityProperties due to unsanitized parameters

Performance Issues - Summary: Optimize data conversion, list creation, string operations, and duplicate removal for better performance. - Costly GroupBy and Select with ToList() for duplicate elimination on large datasets

Maintainability Issues - complex logic - Use of magic strings reduces readability and maintainability, Non-descriptive variable names hinder code understanding, Magic numbers in conditions reduce code clarity, Complex method chains and poor separation of concerns reduce code clarity, Presence of unused or dead code

UX Impact Notes - Summary: Correct activity property updates indirectly affect UI and user feedback. - Correctness of updated activity properties

Test Case Ideas - Summary: Validate JSON input handling - Performance with large datasets and repeated object creation - Conditional logic for business rule counts above and below 10

Dependencies & Called Services - Summary: Uses data conversion and collection types to process control and process models. - Data conversion utilities, Enumerable collections, Control model interface, List collection, String type - Process model interface, Process entity

GetModeIdFromsName

Summary: The method finds a TransferModes object by name and returns its Id.

int ProcessController.GetModeIdFromsName(IList<TransferModes> modes, string modeName)

Routing

  • URL: /Process/GetModeIdFromsName
Detailed Analysis

Key Flows - Summary: The method finds a TransferModes object by name and returns its Id. - Return Id of matching TransferModes object

Error Flows - Summary: Return default value if no matching TransferModes object is found. - Return default value when no matching TransferModes object exists

Performance Issues - Summary: No performance issues identified in GetModeIdFromsName method.

Maintainability Issues - Summary: Correct method name typo to improve readability and maintainability. - Method name typo: 'GetModeIdFromsName' should be 'GetModeIdFromName'

Test Case Ideas - Summary: Verify method behavior with NonAction attribute and various TransferModes lists. - Return default for empty TransferModes list - Return correct Id for single matching TransferModes - Return first matching Id in multiple TransferModes

Dependencies & Called Services - Summary: Uses Enumerable and String classes for data processing. - Enumerable class usage, String class usage

GetObservationsforVolume

Summary: Retrieve project data, filter activities by type and predecessors, identify zero-volume activities linked to decision bases, and return results as JSON.

JsonResult ProcessController.GetObservationsforVolume()

Routing

  • HTTP: GET
  • URL: /Process/GetObservationsforVolume
Detailed Analysis

Key Flows - and return results as JSON. - Fetch arrows and activities for project using actorModel - Return JSON with filtered activities and decisions

Performance Issues - Summary: Multiple database calls and inefficient loops degrade performance. - Multiple database calls or large data retrievals, Use of FirstOrDefault inside loops causing repeated iterations or queries

Maintainability Issues - Summary: The method's tight coupling and unclear code reduce maintainability and readability. - Tight coupling with actorModel hinders independent changes, Use of magic number (0) instead of named constant reduces readability, Bitwise AND operator (&) used with booleans causes confusion, Incomplete and unclear code snippets impair understanding

UX Impact Notes - Summary: Returns JSON data that updates UI and influences user flow. - JSON data for UI update

Test Case Ideas - Summary: Validate method behavior across diverse project IDs - Volume equals zero returns correct arrow - Method returns JSON with expected properties - Correct data returned for varied inputs

Dependencies & Called Services - Summary: Uses collections and actor model interfaces for data handling. - Enumerable for data querying, IActorModel for actor interactions, List for collection storage, String for text data

GetObservationsforAHT

Summary: Retrieve and process project data to calculate effort metrics and return ordered results as JSON.

JsonResult ProcessController.GetObservationsforAHT()

Routing

  • HTTP: GET
  • URL: /Process/GetObservationsforAHT

Cross-layer call chain - ProcessController.GetObservationsforAHT → Andromeda.Core.Entities.Activity.TotalEffort - ProcessController.GetObservationsforAHT → Andromeda.Core.Entities.PathData.GetPathIds - ProcessController.GetObservationsforAHT → Andromeda.Core.Entities.Activity.Effort

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Effort["Andromeda.Core.Entities.Activity.Effort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_PathData_GetPathIds["Andromeda.Core.Entities.PathData.GetPathIds"]
    ProcessController_GetObservationsforAHT["ProcessController.GetObservationsforAHT"]
    ProcessController_GetObservationsforAHT --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetObservationsforAHT --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GetObservationsforAHT --> Andromeda_Core_Entities_PathData_GetPathIds
Detailed Analysis

Key Flows - Summary: Retrieve and process project data to calculate effort metrics and return ordered results as JSON. - Calculate actor counts based on team effort and work hours - Order paths by descending effort and return as JSON array

Error Flows - Summary: The method lacks explicit error handling for data retrieval and input validation failures. - No explicit exception handling for data retrieval or conversion errors, No validation or handling of invalid or missing input parameters

Performance Issues - Summary: LINQ methods cause high memory use and slow performance on large datasets. - Use of ToList() on large result sets increases memory usage

Maintainability Issues - Summary: Improve code clarity by removing commented lines, using descriptive names, and simplifying expressions. - Remove commented out lines to enhance clarity, Use descriptive variable names instead of vague ones like 'bRules', Avoid anonymous types and complex LINQ expressions to improve readability, Replace unexplained magic numbers with named constants, Define variables like 'torId', 'y', and 'actor' clearly before use

UX Impact Notes - Summary: Returned JSON structure impacts user flows displaying Average Handling Time observations. - Returned JSON structure

Test Case Ideas - conditional logic - Correct data return for valid project - Correct setting of actor.Count after processing - Filtering logic correctness for arrows and decision inputs

Dependencies & Called Services - Summary: Uses core data types, collections, math utilities, and domain-specific models for processing observations. - Core data types (Double, Int32, String), Collections (List, Enumerable), Mathematical utilities (Math), Domain models (IActorModel, IControlModel, IProcessModel, PathData), Activity and Convert utilities

GenerateExcelBulkUpload

Summary: GenerateExcelBulkUpload initializes paths, retrieves project data, processes activities and actors into Excel rows, handles batch processing, and finalizes the Excel file.

ActionResult ProcessController.GenerateExcelBulkUpload(string screenFrom, string folderPath, List<Activity> ActsData, List<ActivityProperty> ActsPropData, int DownloadTemplate)

Routing

  • URL: /Process/GenerateExcelBulkUpload

Cross-layer call chain - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.Entities.Project.GetTags - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialChar - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.Services.ExcelGenerator.CloneRow - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.Services.ExcelGenerator.UpdateCell - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.LoggingManager.Error - ProcessController.GenerateExcelBulkUpload → Andromeda.Core.Entities.Activity.GetNVAType - ProcessController.GenerateExcelBulkUpload → 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_Activity_GetNVAType["Andromeda.Core.Entities.Activity.GetNVAType"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars["Andromeda.Core.Extensions.LinqExtensions.RemoveInvalidFileNameChars"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialChar"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_ExcelGenerator_CloneRow["Andromeda.Core.Services.ExcelGenerator.CloneRow"]
    Andromeda_Core_Services_ExcelGenerator_UpdateCell["Andromeda.Core.Services.ExcelGenerator.UpdateCell"]
    ProcessController_GenerateExcelBulkUpload["ProcessController.GenerateExcelBulkUpload"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Entities_Activity_GetNVAType
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Entities_Project_GetTags
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Extensions_LinqExtensions_RemoveInvalidFileNameChars
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialChar
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_LoggingManager_Error
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Services_ExcelGenerator_CloneRow
    ProcessController_GenerateExcelBulkUpload --> Andromeda_Core_Services_ExcelGenerator_UpdateCell
Detailed Analysis

Key Flows - handles batch processing - Save and return finalized Excel file as ActionResult - Process large datasets in batches with new HttpClient instances

Error Flows - Summary: Handle null references - Invalid or empty input parameters causing fallback logic

Security Issues - Summary: Prevent directory traversal and IDOR vulnerabilities by validating inputs. - IDOR risk from unvalidated project IDs or identifiers

Performance Issues - Summary: Optimize data handling, HttpClient usage, async calls, database access, string operations, and Excel processing. - and LINQ on large datasets causing high memory and slow performance

Maintainability Issues - Summary: The method is large, complex, tightly coupled, and uses outdated and inconsistent coding practices. - Large method with many parameters and complex logic

UX Impact Notes - sheet logic - Conditional logic alters data and sheet names based on screenFrom parameter

Test Case Ideas - Summary: Validate file path generation - Batch processing logic for large activity datasets - Performance with large datasets to identify bottlenecks - Excel sheet protection password setting and effectiveness

Dependencies & Called Services - and logging services. - Data models: Activity, Actor, IActorModel, IControlModel, IProcessModel, IProjectModel, IRiskModel, Project, File and path handling: File, Directory, Path, Excel processing: ExcelGenerator, SpreadsheetDocument, OpenXmlCompositeElement, OpenXmlElement, OpenXmlPartContainer, OpenXmlPartRootElement, Data types and utilities: DateTime, Decimal, Double, Int32, TimeSpan, String, Collections and LINQ: Dictionary, Enumerable, List, LinqExtensions, Serialization and web utilities: JavaScriptSerializer, HttpServerUtility, Mathematical operations: Math, Conversion utilities: Convert - Logging: LoggingManager

GetMasterExcelData

Summary: GetMasterExcelData retrieves and processes master Excel data for application use.

List<string> ProcessController.GetMasterExcelData(string screenFrom)

Routing

  • URL: /Process/GetMasterExcelData

Cross-layer call chain - ProcessController.GetMasterExcelData → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_GetMasterExcelData["ProcessController.GetMasterExcelData"]
    ProcessController_GetMasterExcelData --> Andromeda_Core_Entities_Project_GetTags
Detailed Analysis

Key Flows - Summary: GetMasterExcelData retrieves and processes master Excel data for application use. - Process Excel data for application - Retrieve master Excel data

Error Flows - Summary: Handle invalid project IDs and null activity property collections to prevent exceptions. - Missing or invalid project ID causes null references or empty data, Null activity property collections cause null reference exceptions when aggregating data

Performance Issues - Summary: Avoid redundant ToList() calls and optimize string comparison for better performance. - ToList() on large datasets causes memory issues

Maintainability Issues - Summary: Refactor method to separate concerns, replace magic strings, and reduce coupling for maintainability. - Multiple unrelated tasks in one method, Use constants or enums instead of magic strings, Multiple operations in single statements reduce readability, Tight coupling with Registry class reduces flexibility, Incomplete or unclear code segments

UX Impact Notes - Summary: Dynamic data context changes user experience based on 'screenFrom' parameter. - Dynamic data context based on 'screenFrom' parameter, Variable program flow affecting user experience

Test Case Ideas - Summary: Verify method returns correct master data and handles invalid 'ectId' values. - Handle incomplete or unexpected 'ectId' values - Return correct master data for valid project ID

Dependencies & Called Services - Summary: Uses collections and interfaces to manage project and process data. - Enumerable for data iteration, IActorModel interface, IControlModel interface, IProcessModel interface, List collection, Project data model, String data type

BulkUploadExcel

Summary: BulkUploadExcel saves the file, processes activity and business data with validation and updates, sends notifications for new property types, and returns appropriate responses.

JsonResult ProcessController.BulkUploadExcel(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/BulkUploadExcel

Cross-layer call chain - ProcessController.BulkUploadExcel → Andromeda.Core.Services.ExcelGenerator.ReadAllSheets - ProcessController.BulkUploadExcel → Andromeda.Core.Services.ExcelGenerator.ReadExcelData - ProcessController.BulkUploadExcel → Andromeda.Core.LoggingManager.Error - ProcessController.BulkUploadExcel → Andromeda.Core.Extensions.LinqExtensions.DistinctBy - ProcessController.BulkUploadExcel → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.BulkUploadExcel → Andromeda.Core.Entities.Membership.GetAllUsers - ProcessController.BulkUploadExcel → Insorce.Models.UserProfile.GetUserProfile - ProcessController.BulkUploadExcel → Insorce.Models.UsersModel.FromMembershipUser - ProcessController.BulkUploadExcel → Andromeda.Core.Entities.Roles.GetRolesForUser - ProcessController.BulkUploadExcel → Andromeda.Core.Services.Registry.setProjectDetails - ProcessController.BulkUploadExcel → Andromeda.Core.LoggingManager.Exception - Andromeda.Core.Entities.Roles.GetRolesForUser → Andromeda.Core.Entities.Roles.GetRolesForUser - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_Roles_GetRolesForUser["Andromeda.Core.Entities.Roles.GetRolesForUser"]
    Andromeda_Core_Extensions_LinqExtensions_DistinctBy["Andromeda.Core.Extensions.LinqExtensions.DistinctBy"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_Services_ExcelGenerator_ReadAllSheets["Andromeda.Core.Services.ExcelGenerator.ReadAllSheets"]
    Andromeda_Core_Services_ExcelGenerator_ReadExcelData["Andromeda.Core.Services.ExcelGenerator.ReadExcelData"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    Insorce_Models_UsersModel_FromMembershipUser["Insorce.Models.UsersModel.FromMembershipUser"]
    ProcessController_BulkUploadExcel["ProcessController.BulkUploadExcel"]
    Andromeda_Core_Entities_Roles_GetRolesForUser --> Andromeda_Core_Entities_Roles_GetRolesForUser
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_BulkUploadExcel --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_BulkUploadExcel --> Andromeda_Core_Entities_Roles_GetRolesForUser
    ProcessController_BulkUploadExcel --> Andromeda_Core_Extensions_LinqExtensions_DistinctBy
    ProcessController_BulkUploadExcel --> Andromeda_Core_LoggingManager_Error
    ProcessController_BulkUploadExcel --> Andromeda_Core_LoggingManager_Exception
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_ExcelGenerator_ReadAllSheets
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_ExcelGenerator_ReadExcelData
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_BulkUploadExcel --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_BulkUploadExcel --> Insorce_Models_UserProfile_GetUserProfile
    ProcessController_BulkUploadExcel --> Insorce_Models_UsersModel_FromMembershipUser
Detailed Analysis

Key Flows - processes activity and business data with validation and updates - sends notifications for new property types - and returns appropriate responses. - and update business rules and objectives - Send notification emails for new property types - Return JSON or plain text responses with error or success messages - Validate and update activity data including AHT and working hours

Error Flows - Summary: Return precise error messages for all invalid or inconsistent uploaded Excel data. - Error for null, invalid extension, or oversized files, Error for data validation failures like invalid characters, NVA types, working hours, or cost formats, Error for invalid team counts or missing product columns, Error for invalid DOEs or special characters in data, Error responses formatted per request AcceptTypes

Security Issues - Summary: Validate inputs and permissions to prevent DoS - Sanitize input data to prevent SQL injection, Sanitize email content to prevent email injection - Validate maximum file size to prevent DoS - Validate file paths to prevent unauthorized access or overwrite - Validate user permissions before updating or saving data

Performance Issues - Summary: Optimize repeated data operations and external calls to prevent performance degradation. - Uncached ConfigurationManager.AppSettings access causing overhead - Any) on large datasets

Maintainability Issues - Summary: BulkUploadExcel contains unclear code, hardcoded values, poor naming, and lacks documentation. - Lack of comments and documentation for complex logic

UX Impact Notes - Summary: Users receive clear, format-dependent error messages and admin notifications, but large files may cause delays. - Error logging may impact system stability and UX

Test Case Ideas - Summary: Validate BulkUploadExcel handles file validation - and database updates correctly. - Handle oversized file upload errors - database updates - Send email notifications for new property types - Update review statuses and ensure data integrity - Validate Excel file extension and size limits

Dependencies & Called Services - Summary: BulkUploadExcel uses collections, data types, file handling, logging, membership, and process management services. - Collection interfaces and classes, Data type conversions and parsing, DateTime and TimeSpan handling, Decimal and Double numeric types, Dictionary and List data structures, File and directory operations, Excel file generation, HttpPostedFileBase for file uploads, Actor, Control, Infra, Login, Membership, Process, Project, and Risk models, Membership and role management services, Regular expressions, Registry access, String manipulation, LINQ extensions - Logging management - Process management and extensions

ChangeSuccessorActivitiesIOProcess

Summary: The method validates and updates successor activities, modifies process shapes and edges, manages arrows, and finalizes activity changes.

JsonResult ProcessController.ChangeSuccessorActivitiesIOProcess()

Routing

  • HTTP: POST
  • URL: /Process/ChangeSuccessorActivitiesIOProcess

Cross-layer call chain - ProcessController.ChangeSuccessorActivitiesIOProcess → Andromeda.Core.Entities.Arrow.Clone - ProcessController.ChangeSuccessorActivitiesIOProcess → Andromeda.Core.Extensions.LinqExtensions.GetPathIds - ProcessController.ChangeSuccessorActivitiesIOProcess → Andromeda.Core.Entities.ShapeInfo.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_ShapeInfo_Clone["Andromeda.Core.Entities.ShapeInfo.Clone"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    ProcessController_ChangeSuccessorActivitiesIOProcess["ProcessController.ChangeSuccessorActivitiesIOProcess"]
    ProcessController_ChangeSuccessorActivitiesIOProcess --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ChangeSuccessorActivitiesIOProcess --> Andromeda_Core_Entities_ShapeInfo_Clone
    ProcessController_ChangeSuccessorActivitiesIOProcess --> Andromeda_Core_Extensions_LinqExtensions_GetPathIds
Detailed Analysis

Key Flows - Summary: The method validates and updates successor activities - Create new Start activity and edge if selected activity is a decision - Delete obsolete arrows and save updated arrow details - Clone selected activity to create new End activity if incoming arrows exist - Perform bulk product updates if selected activity has ProductId > 0 - Update activity shapes' isOutProcess property based on process type - Update activity types and call ChangeActivityIOProcess to finalize - Validate successor activities' out process type against current process type

Error Flows - Summary: Return JSON errors for missing activities - Missing selected activity error, Missing activity shape error, Successor activity process type mismatch error

Security Issues - Summary: Sanitize 'actId' and 'ProjId' inputs to prevent SQL injection. - SQL injection risk from unsanitized 'actId' in request form, SQL injection risk from unsanitized 'ProjId' in database calls

Performance Issues - Summary: The method inefficiently processes large collections causing slow performance and high memory use. - Inefficient fetching of all base activities and arrow details for large projects, Slow performance from FirstOrDefault on large collections, O(n^2) complexity from filtering loop arrows using Contains in LINQ, Memory overhead from ToList() on large collections, Slow Max() method on large lists, Performance impact from iterating large collections like inArrows and edgeShapesList

Maintainability Issues - complex logic - and manual property settings - Manual setting of many properties on cloned objects

UX Impact Notes - Summary: Error messages and process flow changes disrupt user workflow and process visualization. - Early returns interrupt user operations - Process flow updates affect process visualization

Test Case Ideas - Summary: Validate method behavior for valid inputs - Create new 'End' activity when incoming arrows exist - verify properties and list updates - Create new 'Start' activity when selected activity is a decision - Delete arrows from process model, including non-existent arrows - Handle incomplete or malformed input data - Handle empty collections gracefully - Return valid JsonResult for valid project and activity IDs - Save arrow details and bulk product updates when ProductId is greater than zero - Return error messages with correct activity names appropriately - Update activity types and call ChangeActivityIOProcess with various inputs - Validate successor activities with matching and mismatching out process types

Dependencies & Called Services - Summary: Uses collections, LINQ, and process modeling types for activity processing. - Arrow for workflow direction, Convert for type conversions, Enumerable and LinqExtensions for collection operations, IProcessModel for process representation, Int32 for integer handling, List for collection management, ShapeInfo for graphical element data

TeamPeriodicFTE

Summary: Calculate daily FTE efforts per active, non-system actor using out-process activities and return summarized actor data.

JsonResult ProcessController.TeamPeriodicFTE()

Routing

  • HTTP: GET
  • URL: /Process/TeamPeriodicFTE
Detailed Analysis

Key Flows - non-system actor using out-process activities and return summarized actor data. - Calculate maximum FTE from arrays - Return JSON with ActorId

Error Flows - Summary: Handle invalid project IDs and data retrieval failures explicitly. - Invalid or missing project ID handling, Data retrieval failure handling

Performance Issues - Summary: Excessive database calls and large in-memory collections degrade performance and increase memory usage. - Loading entire actors list into memory with ToList() - Multiple database calls without caching or optimization, High memory usage from creating new FTE arrays per actor, Slow processing and memory strain iterating large collections

Maintainability Issues - Summary: Replace magic strings and unclear variable names; fix incomplete code and avoid anonymous types. - Replace magic strings with constants or enums, Improve unclear variable names for readability, Fix incomplete or truncated code lines to prevent errors, Avoid anonymous types in LINQ Select for maintainability

Test Case Ideas - Summary: Verify correct FTE calculation and data handling across varied inputs. - Calculate maximum FTE value correctly - Return correct data for given project - Accumulate opAct.Value accurately and handle empty values - Assign FTE values to actors under diverse scenarios

Dependencies & Called Services - Summary: Uses core system libraries and actor/process model interfaces. - Core system libraries, Actor model interface - Process model interface

GetDeadlineObservations

Summary: Retrieve project data, analyze scheduling increases, filter and group deadline observations, then return results as JSON.

JsonResult ProcessController.GetDeadlineObservations()

Routing

  • HTTP: GET
  • URL: /Process/GetDeadlineObservations

Cross-layer call chain - ProcessController.GetDeadlineObservations → Andromeda.Core.DataManager.GetDataList

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    ProcessController_GetDeadlineObservations["ProcessController.GetDeadlineObservations"]
    ProcessController_GetDeadlineObservations --> Andromeda_Core_DataManager_GetDataList
Detailed Analysis

Key Flows - then return results as JSON. - Fetch project actors and check active non-system teams for scheduling increases - Return JSON with grouped observations

Performance Issues - Summary: Multiple database calls in quick succession degrade performance. - Multiple database calls in short code span, Performance degradation due to repeated DB access

Maintainability Issues - Summary: Replace magic strings with constants or enums to improve maintainability. - Use of magic strings, Replace magic strings with constants or enums

UX Impact Notes - Summary: The JSON result influences frontend user interface behavior. - JSON result impacts frontend UI

Test Case Ideas - Summary: Verify GetDeadlineObservations handles GET requests and returns correct data for project IDs. - Handle HTTP GET requests - Return correct data for given project ID - Return expected result when no deadline observations exist

Dependencies & Called Services - Summary: Uses Enumerable for collections, IActorModel for actor data, and String for text handling. - Enumerable for collection operations, IActorModel for actor data access, String for text manipulation

GetSchedObservations

Summary: Retrieve scheduled observations for the current project, round times, and return as JSON.

JsonResult ProcessController.GetSchedObservations()

Routing

  • HTTP: GET
  • URL: /Process/GetSchedObservations

Cross-layer call chain - ProcessController.GetSchedObservations → Andromeda.Core.DataManager.GetDataList

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetDataList["Andromeda.Core.DataManager.GetDataList"]
    ProcessController_GetSchedObservations["ProcessController.GetSchedObservations"]
    ProcessController_GetSchedObservations --> Andromeda_Core_DataManager_GetDataList
Detailed Analysis

Key Flows - and return as JSON. - Return observations as JSON result

Performance Issues - Summary: Rounding TaskTime and DeadlineTime on many observations degrades performance. - Performance impact on large observation sets

Maintainability Issues - Summary: Anonymous type usage reduces maintainability for reusable or extendable projections. - Use anonymous type for projection, Reduce maintainability for reuse or extension

Test Case Ideas - Summary: Verify GetSchedObservations handles requests - returns correct data - Handle HTTP GET requests correctly - Return correct observations for given project - Gracefully handle empty observation lists

Dependencies & Called Services - Summary: Uses Enumerable for collections, IActorModel for actor interactions, and Math for calculations. - Enumerable for collection operations, IActorModel for actor interactions, Math for mathematical calculations

GetObservationSched

Summary: GetObservationSched retrieves the current project ID and calls the actor model with the valid Id.

ActionResult ProcessController.GetObservationSched(int? Id)

Routing

  • HTTP: GET
  • URL: /Process/GetObservationSched

Cross-layer call chain - ProcessController.GetObservationSched → Andromeda.Core.DataManager.GetData

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    ProcessController_GetObservationSched["ProcessController.GetObservationSched"]
    ProcessController_GetObservationSched --> Andromeda_Core_DataManager_GetData
Detailed Analysis

Key Flows - Summary: GetObservationSched retrieves the current project ID and calls the actor model with the valid Id. - Retrieve current project ID, Call actor model's GetObservationSched with project ID and valid Id

Error Flows - Summary: Return HTTP 'Not Found' if observation schedule or its Schedule is null or empty. - Return HTTP 'Not Found' response

Maintainability Issues - Summary: Fix incomplete code, naming inconsistencies, and typos to improve maintainability. - Incomplete or truncated conditional statements causing errors, Non-standard variable names reducing code clarity, Typo in class name 'HttpNotFou' complicating maintenance, Unclear or incomplete code snippets lacking context

UX Impact Notes - Summary: Users download schedule CSV or see 'Not Found' error for invalid requests. - CSV file download with schedule details for valid requests, 'Not Found' error message for missing or invalid schedules

Test Case Ideas - Summary: Test GetObservationSched for valid inputs, data presence, correct CSV response, and proper error handling. - Valid integer Id for successful retrieval and CSV return - Correct CSV file returned when schedule data exists - Correct file extension set to 's.csv' - HTTP 404 status code set when schedule not found

Dependencies & Called Services - Summary: Uses encoding and actor model for string-based observation scheduling. - Encoding dependency, IActorModel interface, String data type

ReplaceProductToActivities

Summary: ReplaceProductToActivities updates activity products and product review status based on POSTed JSON data.

JsonResult ProcessController.ReplaceProductToActivities()

Routing

  • HTTP: POST
  • URL: /Process/ReplaceProductToActivities

Cross-layer call chain - ProcessController.ReplaceProductToActivities → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_ReplaceProductToActivities["ProcessController.ReplaceProductToActivities"]
    ProcessController_ReplaceProductToActivities --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - Summary: ReplaceProductToActivities updates activity products and product review status based on POSTed JSON data. - Retrieve current project ID from registry, Decode JSON data from HTTP POST form - Update activity products via UpdateActivityProduct for each item in data.SelA - Update product review status via UpdateIsReviewedStatus

Error Flows - Summary: Handle JSON deserialization errors and integer conversion failures. - JSON deserialization failure on invalid input, FormatException during integer conversion of Product_ValErrors

Security Issues - Summary: System.Web.Helpers.Json.Decode risks JSON deserialization attacks without validation. - JSON deserialization vulnerability, Lack of input validation or sanitization

Performance Issues - Summary: Repeated UpdateActivityProduct calls and frequent DateTime.Now.ToString() degrade performance. - Repeated UpdateActivityProduct calls in loop over large data.SelA - Inefficient frequent use of DateTime.Now.ToString() for logging timestamps

Maintainability Issues - Summary: Improve naming conventions and eliminate magic strings to enhance code readability and maintainability. - Magic strings in logging hinder maintainability

UX Impact Notes - Summary: The method logs errors without clear user notification or UI handling. - Error logging without user notification

Test Case Ideas - update calls - Handle valid JSON data in request form - Process empty data.SelA collection without updates - Call UpdateActivityProduct correct times with correct parameters - Call UpdateIsReviewedStatus correctly and update reviewed status

Dependencies & Called Services - and logging. - Data conversion service, DateTime utility - Logging manager - Process model interface

ChangeDecisionToProcessActivity

Summary: Change a decision activity to a process activity by validating inputs, updating project data, and removing related arrows and shapes.

JsonResult ProcessController.ChangeDecisionToProcessActivity()

Routing

  • HTTP: POST
  • URL: /Process/ChangeDecisionToProcessActivity

Cross-layer call chain - ProcessController.ChangeDecisionToProcessActivity → Andromeda.Core.Entities.Arrow.Clone - ProcessController.ChangeDecisionToProcessActivity → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.ChangeDecisionToProcessActivity → Andromeda.Core.Extensions.LinqExtensions.GetPathIds

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_ChangeDecisionToProcessActivity["ProcessController.ChangeDecisionToProcessActivity"]
    ProcessController_ChangeDecisionToProcessActivity --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ChangeDecisionToProcessActivity --> Andromeda_Core_Extensions_LinqExtensions_GetPathIds
    ProcessController_ChangeDecisionToProcessActivity --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - Summary: Change a decision activity to a process activity by validating inputs, updating project data, and removing related arrows and shapes. - Delete database arrows linked to volume-zero activities, Delete identified shape from process map - Retrieve selected activity ID and fetch base activities and arrows, Read project XML to obtain team, activity, and edge shapes, Identify activity shape for selected activity, Filter activities and shapes by ID, version, volume, and path IDs to find volume-zero activities and shapes, Track and collect edges to remove related to volume-zero shapes - Update activity type to 'Activity' and update project XML - Validate selected activity is a decision; return error if not - Validate existence of successor activities; return error if missing

Error Flows - Summary: Validate activity existence - Check for null or non-existent selected activity - Verify selected activity is a decision type, Ensure successor activities are present and valid

Security Issues - Summary: Sanitize input to prevent SQL injection and fix code errors to avoid security risks. - SQL injection risk from unsanitized Request.Form 'ID' value, Syntax errors causing potential security vulnerabilities

Performance Issues - Summary: Inefficient collection operations degrade performance on large datasets. - Use of ToList() and Clone() on large datasets

Maintainability Issues - Summary: Tight coupling and unclear code reduce maintainability and readability. - Tight coupling with ProcessMapModel and Registry classes, Use of magic numbers and strings reduces code clarity, Non-descriptive variable names hinder readability, Empty code blocks and unrelated string literals indicate poor organization, Error messages built via string concatenation reduce readability

UX Impact Notes - Summary: Provides clear JSON error messages and updates process data affecting user display. - Clear JSON error messages for invalid or missing activities - Updates process map and project XML affecting application state and user display

Test Case Ideas - XML updates - Handle non-decision activity types - Handle empty collections gracefully - Ensure performance and correctness with large datasets - Update activity type to 'Activity' and apply project XML changes

Dependencies & Called Services - Summary: Uses collections and LINQ extensions to manipulate process model activities. - Arrow library for data flow, Enumerable and LinqExtensions for collection queries, ICollection and List for data storage, IProcessModel for process representation - ProcessExtensions for process-specific operations

Product

Summary: Fetch project activities and related data, handle empty activities by redirecting, and prepare ViewData for the product view.

ActionResult ProcessController.Product()

Routing

  • URL: /Process/Product
View Metadata
  • View: Product (Andromeda.Web\Views\Process\Product.cshtml)
Detailed Analysis

Key Flows - handle empty activities by redirecting - Fetch activities sorted by DFSIndex - Redirect to ProcessCreation if no activities - Retrieve current project ID, Retrieve actors and product master data, Associate activities with team names, Populate ViewData with arrows, maps, factors, and review statuses, Remove duplicate product names and store in ViewData, Retrieve master temporary data and wizard run status

Error Flows - Summary: Redirect to 'ProcessCreation' if no activities exist for the current project. - Redirect to 'ProcessCreation' action when no activities found for current project

Performance Issues - Summary: Inefficient data retrieval and LINQ operations cause high memory use and slow performance. - LINQ GroupBy and Select on large datasets cause bottlenecks

Maintainability Issues - Summary: Improve method naming, variable clarity, decouple dependencies, fix incomplete code, and remove commented code. - Unclear method name 'Product', Non-descriptive variable names, Tight coupling with Registry and model classes, Anonymous objects in projections reduce clarity, Incomplete or malformed code causing compilation errors, Commented out code reduces clarity

UX Impact Notes - Summary: Redirects and data population directly affect user navigation and interface clarity. - Ensure correct controller names in redirects to prevent user errors - Process and deduplicate product names for accurate user suggestions - Redirect users to ProcessCreation when no activities exist

Test Case Ideas - Summary: Verify correct data retrieval, sorting, filtering, ViewData population, and performance under various conditions. - Check approval status conditions including Approved and Rejected - Handle non-empty activities collection - Handle large datasets efficiently - Handle empty 'obsAcc' and varied 'ReviewData' conditions - Redirect to 'ProcessCreation' if activities collection is empty - Return correct activities list for project ID

Dependencies & Called Services - Summary: Uses multiple interface models and collections for service management. - ILoginModel interface

Volume

Summary: Retrieve and validate project activities and related data, calculate and adjust volume metrics, then prepare detailed activity data for display.

ActionResult ProcessController.Volume()

Routing

  • URL: /Process/Volume

Cross-layer call chain - ProcessController.Volume → Andromeda.Core.Entities.Arrow.Clone - ProcessController.Volume → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.Volume → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.Volume → Andromeda.Core.LoggingManager.Exception - ProcessController.Volume → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - ProcessController.Volume → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - 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_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_Volume["ProcessController.Volume"]
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_Volume --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_Volume --> Andromeda_Core_LoggingManager_Exception
    ProcessController_Volume --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_Volume --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_Volume --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_Volume --> Andromeda_Core_Services_ProcessExtensions_FindByID
View Metadata
  • View: Volume (Andromeda.Web\Views\Process\Volume.cshtml)
Detailed Analysis

Key Flows - Summary: Retrieve and validate project activities and related data - Calculate volume percentages and sum outputs for decision activities - Fetch related data: actors, arrows, products, factors, clone arrows - Redirect to ProcessCreation if no activities exist - Set volume metrics and percentages in ViewData for display - Update operation names and map decision inputs with successor management

Error Flows - Summary: Handle missing activities - log delooping errors - and check empty collections to prevent exceptions. - Catch and log IncrementException during delooping - Check outArrows collection before accessing first element to avoid InvalidOperationException - Redirect to ProcessCreation if no project activities found

Security Issues - Summary: No security concerns identified in the Volume method.

Performance Issues - Summary: Optimize data operations to prevent multiple enumerations and N+1 query problems on large datasets. - Inefficient OrderBy and ToList on large datasets - Nested loops updating control model and setting products - Multiple GroupBy and Sum operations on large datasets

Maintainability Issues - Summary: The Volume method suffers from unclear naming, magic values, tight coupling, and incomplete code. - Unclear method and variable names reduce code clarity, Use of unexplained magic strings and numeric constants, Tight coupling with controlModel and mapArrow hinders modifications, Anonymous types in ViewData complicate maintenance, Incomplete or unclear code fragments risk compilation errors

UX Impact Notes - Summary: Guides user workflow and displays volume metrics while handling exceptions. - Handle exceptions during delooping to maintain UX - Prepare and display calculated volume percentages and metrics - Redirect user to ProcessCreation if no activities exist

Test Case Ideas - Summary: Verify correct activity retrieval, volume calculations, data filtering, and performance under various conditions. - Empty activities collection triggers ProcessCreation redirection - Performance and correctness with large datasets - Conditional logic involving ops.Count and collection presence checks

Dependencies & Called Services - Summary: Uses core data types, collections, math, logging, and domain-specific models for processing. - Core data types Int32 and String, Collection types List and Enumerable, Mathematical operations via Math, Domain models IActorModel, IControlModel, IProcessModel, IProjectModel, Arrow library - Logging via LoggingManager - Process utilities in ProcessExtensions

AHT

Summary: Fetch project activities and related data, handle missing activities by redirecting, and retrieve review and wizard status.

ActionResult ProcessController.AHT()

Routing

  • URL: /Process/AHT
View Metadata
  • View: AHT (Andromeda.Web\Views\Process\AHT.cshtml)
Detailed Analysis

Key Flows - handle missing activities by redirecting - Check completed account reviews - Fetch activities sorted by DFSIndex - Redirect to ProcessCreation if no activities - Retrieve current project ID, Project activity data with Effort and AvgHandlingTime, Retrieve arrows, swim lanes, shapes, product factors, Retrieve current wizard stage configuration

Error Flows - Summary: Handle missing activities and prevent null reference exceptions in project data and wizard stage. - Null reference risk accessing wizard stage 'H' property without null check - Redirect to ProcessCreation if no project activities found

Security Issues - Summary: Fix code typos to prevent compilation errors and security risks. - Code typos causing compilation errors, Potential unexpected behavior from incomplete code

Performance Issues - Summary: Avoid redundant enumerations and large memory allocations from ToList on big collections. - Large memory allocations from ToList on big collections, Multiple enumerations from repeated Any and First calls in the same line, Inefficient Any calls inside loops causing repeated collection iterations

Maintainability Issues - Summary: Improve naming, replace magic strings, add comments and error handling for clarity and maintainability. - Incomplete controller name 'Proce' in redirect action

UX Impact Notes - Summary: Redirects users when no activities exist and stores UI-relevant data affecting experience. - Redirect user if no activities found - Store user permissions, actors, project properties, review flags, wizard stage in ViewBag/ViewData affecting UI, Indirect UX impact from magic strings and performance on responsiveness

Test Case Ideas - flag setting - and redirection logic in AHT method. - Handle empty activity list with proper redirection - Handle missing arrows - Redirect to ProcessCreation action under correct conditions - Set IsAnyoneAccReviewed flag based on review data - Evaluate conditional checks on 'ule'

Dependencies & Called Services - Summary: Uses collections, interfaces, math, and time utilities for service operations. - Enumerable for collection operations, IActorModel interface, IControlModel interface, IProcessModel interface, IProjectModel interface, List collection, Math utilities, TimeSpan for time measurement

SystemsandApplications

Summary: Retrieve and verify project data, gather related entities, set flags, invoke permission module, and return results.

ActionResult ProcessController.SystemsandApplications()

Routing

  • URL: /Process/SystemsandApplications
View Metadata
  • View: SystemsandApplications (Andromeda.Web\Views\Process\SystemsandApplications.cshtml)
Detailed Analysis

Key Flows - set flags - and return results. - Fetch and sort activities - Set access review and wizard stage flags - Return the result

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

Performance Issues - Summary: Inefficient collection handling causes high memory use and slow performance on large datasets. - LINQ methods like FirstOrDefault and Where slow data transformations on large datasets

Maintainability Issues - Summary: Improve naming, reduce coupling, avoid magic strings, and fix incomplete code for maintainability. - Incomplete controller name 'Proce' in redirect causes errors

UX Impact Notes - Summary: Redirect users to create activities and use ViewData flags to control UI workflow. - Populate ViewData with comprehensive project data for UI, Use ViewData flags to control UI elements and workflow steps - Redirect users to 'ProcessCreation' when no activities exist

Test Case Ideas - conditional logic - and permission checks. - Redirect behavior with empty Activities collection - Return empty list and redirect when no project activities - Return activities sorted by DFSIndex - Culture settings affect configuration comparison - Assign and verify contents of LegacySystems variable - Call PermissionModule.SystemsandApplications correctly and verify return - Access review logic with empty obsAcc and matching/non-matching ReviewData - Approval status checks with different a.Status and ule values - Set IsAnyoneAccReviewed flag correctly

Dependencies & Called Services - Summary: Uses multiple interface models and enumerable collections for system and application services. - Enumerable collections, IActorModel interface, IControlModel interface, IProcessModel interface, IProjectModel interface, String type

DeadLines

Summary: Initialize project context, process activities and deadlines, manage review and accreditation data, and prepare ViewData for the view.

ActionResult ProcessController.DeadLines()

Routing

  • URL: /Process/DeadLines

Cross-layer call chain - ProcessController.DeadLines → Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths["Andromeda.Core.Services.Algorithms.Delooper.GetPossiblePaths"]
    ProcessController_DeadLines["ProcessController.DeadLines"]
    ProcessController_DeadLines --> Andromeda_Core_Services_Algorithms_Delooper_GetPossiblePaths
View Metadata
  • View: DeadLines (Andromeda.Web\Views\Process\DeadLines.cshtml)
Detailed Analysis

Key Flows - Summary: Initialize project context, process activities and deadlines, manage review and accreditation data, and prepare ViewData for the view. - Check activities collection for early method exit conditions - Process deadline activities to add deadline paths - Redirect to ProcessCreation if ties collection is not empty - Assign configuration and project data to ViewData - Set accreditation flag based on accreditation data

Error Flows - Summary: Handle null references and complete all conditions to prevent runtime and compilation errors. - Null reference errors from dataOfMeasures or Measure being null during JSON decoding, Incomplete if statement conditions causing compilation errors, Incomplete code causing runtime errors or unexpected behavior

Performance Issues - Summary: Optimize collection handling and query execution to improve performance. - Ordering large datasets without pagination or filtering impacting performance

Maintainability Issues - Summary: Code suffers from unclear naming, magic strings, tight coupling, and incomplete snippets. - Typo in class name causing confusion, Incomplete and truncated code snippets, Use of magic strings without named constants, Complex conditionals with non-descriptive variable names, Tight coupling with multiple models hindering changes, Unclear method name not reflecting purpose

UX Impact Notes - Summary: Redirects and UI flags affect user flow and interface behavior. - 'IsAnyoneAccReviewed' flag in ViewData alters UI elements and actions - Redirect to 'ProcessCreation' disrupts user flow without clear communication

Test Case Ideas - and conditional logic handling. - Fetch configuration values and project comparison data - Redirect to 'ProcessCreation' based on 'ties' collection emptiness - Order activities by DFSIndex and handle empty lists - Ensure correct early return behavior on activity conditions - Add deadline paths and handle missing activity IDs - Iterate accreditation data and set 'IsAnyoneAccReviewed' flag properly - Validate dataOfMeasures.MeasuresJson conditions

Dependencies & Called Services - Summary: Uses collections and interfaces for modeling and managing processes and projects. - Dictionary for key-value storage, Enumerable for collection iteration, IActorModel interface for actor abstraction, IControlModel interface for control abstraction, IProcessModel interface for process abstraction, IProjectModel interface for project abstraction, Int32 for integer values, List for ordered collections, String for text data

WaitTypes

Summary: Fetch project activities and related data, handle missing activities by redirecting, and set approval flags for WaitTypes.

ActionResult ProcessController.WaitTypes()

Routing

  • URL: /Process/WaitTypes
View Metadata
  • View: WaitTypes (Andromeda.Web\Views\Process\WaitTypes.cshtml)
Detailed Analysis

Key Flows - handle missing activities by redirecting - and set approval flags for WaitTypes. - Check review data for WaitTypes approvals and set flag - Fetch activities sorted by DFSIndex, Fetch arrows, swim lanes, shapes, product factors, review statuses - Redirect to ProcessCreation if no activities - Retrieve current project ID, Retrieve actors and activity properties, Map team names by ActorId, Retrieve and store project stage configuration values

Error Flows - Summary: Handle missing activities and prevent null reference exceptions during collection processing. - Prevent null reference exceptions on null collections during iteration and condition checks - Redirect to ProcessCreation if no project activities exist

Security Issues - Summary: Incomplete code fragments cause security vulnerabilities without validation and error handling. - Incomplete code fragments, Lack of validation, Missing error handling

Performance Issues - Summary: Inefficient data retrieval and filtering cause high memory use and slow performance on large datasets. - Costly OrderBy and ToList on large activity datasets

Maintainability Issues - Summary: Refactor WaitTypes method to improve clarity, reduce coupling, and replace magic values. - Incomplete controller name 'Proce' in redirection

UX Impact Notes - Summary: Redirects users when no activities exist and stores UI-related flags in ViewData. - Redirect user to 'ProcessCreation' if no activities exist - Store UI flags like 'IsAnyoneAccReviewed' and configuration values in ViewData

Test Case Ideas - redirection - Set 'TeamName' correctly based on actor presence - Acceptable performance with large datasets - Handle empty and non-empty Activities collection - Handle empty and non-empty obsAcc collections - Redirection to correct controller and action

Dependencies & Called Services - Summary: Uses multiple model interfaces and enumerable collections for service dependencies. - Enumerable collections, IActorModel interface, IControlModel interface, IProcessModel interface, IProjectModel interface

ProcessMapRejections

Summary: Fetch project activities and paths, handle missing activities by redirecting, and prepare rejection stage data for the view.

ActionResult ProcessController.ProcessMapRejections()

Routing

  • URL: /Process/ProcessMapRejections

Cross-layer call chain - ProcessController.ProcessMapRejections → Andromeda.Core.Entities.Arrow.Clone - ProcessController.ProcessMapRejections → Andromeda.Core.Entities.PathData.GetPathIds

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_PathData_GetPathIds["Andromeda.Core.Entities.PathData.GetPathIds"]
    ProcessController_ProcessMapRejections["ProcessController.ProcessMapRejections"]
    ProcessController_ProcessMapRejections --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_ProcessMapRejections --> Andromeda_Core_Entities_PathData_GetPathIds
View Metadata
  • View: ProcessMapRejections (Andromeda.Web\Views\Process\ProcessMapRejections.cshtml)
Detailed Analysis

Key Flows - handle missing activities by redirecting - Fetch and filter all project paths and undesired paths - Redirect to ProcessCreation if no activities exist - Set ViewData with undesired paths

Error Flows - Summary: Handle missing activities by redirecting and prevent null reference exceptions. - Check for null references in user permissions and data access - Redirect to 'ProcessCreation' if no project activities exist

Security Issues - Summary: Prevent null reference exceptions by validating user permissions and data. - Missing null checks on user permissions and data

Performance Issues - Summary: Optimize memory use and reduce repeated iterations and database queries for better performance. - Excessive memory allocation from ToList() on large activity collections, Multiple sequential database queries causing bottlenecks, Inefficient iteration from FirstOrDefault on large collections, Performance degradation from repeated method calls inside loops, Multiple iterations from Any method inside review data loops, Potential inefficiency from FirstOr call on large ModuleRelations collection

Maintainability Issues - Summary: Poor naming, complex code, tight coupling, and magic values reduce maintainability and testability. - Non-descriptive variable names reduce code clarity, Dense, complex code hinders understanding and maintenance, Incomplete code segments risk compilation errors, Tight coupling with ProcessMapModel and ViewData complicates testing and maintenance, Magic strings and enum values reduce readability and flexibility, Hard-coded constants increase maintenance difficulty

UX Impact Notes - Summary: Redirects users when no activities exist and controls feature visibility via flags. - Control feature visibility with flags like IsAnyoneAccReviewed - Redirect user if no activities found

Test Case Ideas - Summary: Verify ProcessMapRejections handles activity lists - Handle empty and non-empty activity lists - Process obsAcc collections and ReviewData with module matching - Iterate and update allUndesiredPaths correctly - Set ViewData for UndesiredPaths - Validate lambda filtering logic with varied inputs

Dependencies & Called Services - Summary: Uses core data structures and interfaces for process and project modeling. - Arrow data structure, Dictionary collection, Enumerable interface, IActorModel interface, IControlModel interface, IProcessModel interface, IProjectModel interface, Int32 data type, PathData structure

PeriodicActivities

Summary: Retrieve project activities and related data, redirect if none, then prepare and return data for view rendering.

ActionResult ProcessController.PeriodicActivities()

Routing

  • URL: /Process/PeriodicActivities
View Metadata
  • View: PeriodicActivities (Andromeda.Web\Views\Process\PeriodicActivities.cshtml)
Detailed Analysis

Key Flows - redirect if none - then prepare and return data for view rendering. - Fetch activities ordered by DFSIndex - Redirect to ProcessCreation if no activities - Return data for view rendering

Error Flows - Summary: Redirect to 'ProcessCreation' page if no activities exist for the current project. - Redirect to 'ProcessCreation' page when no activities found for current project

Performance Issues - Summary: Excessive memory use and repeated database calls degrade PeriodicActivities performance. - Use of ToList() on large collections causes high memory usage, Multiple uncached database or model calls degrade performance, Repeated enumeration via FirstOrDefault and Any in lambdas impacts performance

Maintainability Issues - Summary: The method suffers from naming inconsistencies, incomplete code, poor readability, and tight coupling. - Incomplete return statement and controller name

UX Impact Notes - Summary: Redirects users when no activities exist and populates view data to enhance display. - Populate ViewData with comprehensive project-related data to influence view display - Redirect user to 'ProcessCreation' page if no activities exist

Test Case Ideas - redirection - TeamName set from ActorId in transformed activities - OutProcessProperties set from OutProcess and ActivityID in transformed activities - Redirect to ProcessCreation on empty Activities - Redirect targets correct controller and action when no activities

Dependencies & Called Services - Summary: PeriodicActivities uses interfaces and types for actor, control, process models, and time management. - IControlModel interface for control logic

GeolocateWorkingHours

Summary: Fetch project data, identify key activities, analyze paths for undesired ends, and prepare ViewData with financial factors.

ActionResult ProcessController.GeolocateWorkingHours()

Routing

  • URL: /Process/GeolocateWorkingHours

Cross-layer call chain - ProcessController.GeolocateWorkingHours → Andromeda.Core.Entities.PathData.GetPathIds

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_PathData_GetPathIds["Andromeda.Core.Entities.PathData.GetPathIds"]
    ProcessController_GeolocateWorkingHours["ProcessController.GeolocateWorkingHours"]
    ProcessController_GeolocateWorkingHours --> Andromeda_Core_Entities_PathData_GetPathIds
View Metadata
  • View: GeolocateWorkingHours (Andromeda.Web\Views\Process\GeolocateWorkingHours.cshtml)
Detailed Analysis

Key Flows - Summary: Fetch project data, identify key activities, analyze paths for undesired ends, and prepare ViewData with financial factors. - Retrieve project ID and fetch actors with locations and activities sorted by DFS index, Identify rework decision and undesired end activities from activities and arrows, Analyze paths leading to undesired end activities by joining with arrow data, Populate ViewData with foreign exchange rates and product factors for the project

Error Flows - Summary: Handle null references - Null reference exceptions from unchecked ActorId and ActorName - Syntax errors in activity condition checks causing runtime failures - Missing error handling for GetPaths method leading to unhandled exceptions

Security Issues - Summary: No security vulnerabilities or sensitivity concerns found in the method. - No security vulnerabilities, Method not marked sensitive

Performance Issues - Summary: Optimize data queries and reduce repeated searches to improve performance. - High memory use from ToList() on large datasets

Maintainability Issues - Summary: GeolocateWorkingHours method lacks clarity, contains incomplete code, and is tightly coupled, reducing maintainability. - Unclear method name misrepresents broad responsibilities, Incomplete and syntactically incorrect code fragments, Magic strings and poorly descriptive variable names, Tight coupling with multiple model classes, Direct ViewData manipulation complicates testing, Undefined methods hinder understanding and maintenance

UX Impact Notes - Summary: Data storage and conditional redirection impact user interface and navigation flow. - Conditional redirection alters user navigation

Test Case Ideas - Summary: Verify GeolocateWorkingHours handles data retrieval - conditional logic - Handle empty actors - Redirect to ProcessCreation on y() condition - Set IsAnyoneAccReviewed flag correctly

Dependencies & Called Services - Summary: Uses data models and collections for geolocation and working hours processing. - Enumerable for data iteration, IActorModel for actor data, IControlModel for control data, IProcessModel for process data, IProjectModel for project data, List for collection management, PathData for path-related information

GeolocateTeamSize

Summary: Filter active, non-system actors and set ViewData with actors, FX rates, and review status including team size approval.

ActionResult ProcessController.GeolocateTeamSize()

Routing

  • URL: /Process/GeolocateTeamSize

Cross-layer call chain - ProcessController.GeolocateTeamSize → Andromeda.Core.Entities.Activity.TotalEffort - ProcessController.GeolocateTeamSize → 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_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Actor_GetLocation["Andromeda.Core.Entities.Actor.GetLocation"]
    ProcessController_GeolocateTeamSize["ProcessController.GeolocateTeamSize"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    ProcessController_GeolocateTeamSize --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_GeolocateTeamSize --> Andromeda_Core_Entities_Actor_GetLocation
View Metadata
  • View: GeolocateTeamSize (Andromeda.Web\Views\Process\GeolocateTeamSize.cshtml)
Detailed Analysis

Key Flows - non-system actors and set ViewData with actors - Check review data for team size approval and update ViewData flag - Filter actors by IsActive and IsSystem flags, Populate ViewData with actors, FX rates, and project review status

Error Flows - Summary: No error flows are defined for GeolocateTeamSize.

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

Performance Issues - Summary: LINQ filtering and 'Any' checks cause slow performance on large datasets. - Unoptimized LINQ Where filtering on large actor datasets

Maintainability Issues - Summary: Code suffers from unclear naming, magic literals, and incomplete snippets harming maintainability. - Incomplete code snippets causing compilation and comprehension issues, Unclear variable names reducing readability, Use of magic numbers and strings without named constants, Non-standard variable naming violating C# conventions

UX Impact Notes - Summary: Redirects and data formatting affect user navigation and display clarity. - Format work start and end times for user locale, Populate ViewData to control displayed data - Redirect user if no team information found

Test Case Ideas - redirect behavior - Approval status checks for different statuses - Redirect URL correctness under various inputs

Dependencies & Called Services - Summary: GeolocateTeamSize depends on utility and model interfaces for data processing and calculations. - Activity service, Actor service, Data conversion utilities, DateTime handling, Decimal arithmetic, Enumerable collections, IActorModel interface, IProcessModel interface, IProjectModel interface, Math utilities

GetBrSimilarity

Summary: Retrieve and filter project data, compare business rules semantically, and return aggregated results.

JsonResult ProcessController.GetBrSimilarity()

Routing

  • HTTP: GET
  • URL: /Process/GetBrSimilarity

Cross-layer call chain - ProcessController.GetBrSimilarity → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_GetBrSimilarity["ProcessController.GetBrSimilarity"]
    ProcessController_GetBrSimilarity --> Andromeda_Core_Entities_Project_GetTags
Detailed Analysis

Key Flows - and return aggregated results. - Return aggregated rules as JSON response

Performance Issues - Summary: Multiple unoptimized database calls and inefficient LINQ operations degrade performance on large datasets. - Uncached multiple database calls like GetTags and GetTemplateProjectsData, Use of Distinct() and ToLower() inside loops, Multiple LINQ operations including Distinct, GroupBy, nested Any() calls, Contains method in OrderBy clause causing slow sorting

Maintainability Issues - Summary: Refactor code to improve readability, clarity, and naming consistency. - Long chains of method calls reduce readability and maintainability, Non-descriptive variable names reduce code clarity, Anonymous types complicate understanding and maintenance, Complex nested lambda expressions reduce code clarity, Incomplete and unclear code snippets hinder maintainability, Typo in variable name 'aggrigat' requires correction

UX Impact Notes - Summary: Ordering and filtering of business rules affect JSON response and user experience. - Ordering of similar business rules, Filtering of similar business rules, Impact on JSON response completeness, User experience affected by unexpected or incomplete data

Test Case Ideas - Summary: Verify filtering, normalization, aggregation, ordering, and case-insensitive handling of business rule collections. - Add 'P' to 'src' and verify First method return - Handle empty project and template collections - Handle collections with 'src' equal to 3 and matching 'MatchedRec' values

Dependencies & Called Services - Summary: Uses collections and interfaces for processing models and semantic similarity. - Enumerable for collection operations, IProcessModel interface for process modeling, IProjectModel interface for project modeling, ISemanticSimilarity interface for similarity calculations, List collection for data storage, Project class for project data, String type for text handling

GetFormSimilarity

Summary: Retrieve project and template forms, compare them using semantic similarity, and return filtered similar forms.

JsonResult ProcessController.GetFormSimilarity()

Routing

  • HTTP: GET
  • URL: /Process/GetFormSimilarity

Cross-layer call chain - ProcessController.GetFormSimilarity → Andromeda.Core.Entities.Project.GetTags

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Project_GetTags["Andromeda.Core.Entities.Project.GetTags"]
    ProcessController_GetFormSimilarity["ProcessController.GetFormSimilarity"]
    ProcessController_GetFormSimilarity --> Andromeda_Core_Entities_Project_GetTags
Detailed Analysis

Key Flows - and return filtered similar forms. - Return JSON response with aggregated similar forms

Performance Issues - Summary: Optimize LINQ usage to reduce multiple iterations and memory overhead on large datasets. - Inefficient use of Any() and Contains() inside Where() causing slow queries, Excessive Distinct(), ToList(), and ToArray() calls increasing memory allocations, Nested Any() in lambdas degrading performance on large collections, Multiple LINQ operations causing repeated data iterations

Maintainability Issues - Summary: Complex code structures and unclear magic numbers reduce code maintainability and readability. - Use of unexplained magic numbers in ordering logic decreases clarity

UX Impact Notes - Summary: Return JSON with similar forms requires proper client-side handling for good UX. - JSON response with similar forms, Client-side handling for UX

Test Case Ideas - Summary: Verify correct data processing, filtering, grouping, and similarity comparison in diverse project scenarios. - Correct data return for given project - Filtering and grouping logic across scenarios - String comparison with different culture settings and inputs

Dependencies & Called Services - Summary: Uses collections and interfaces for processing models and semantic similarity. - Enumerable for collection operations, IProcessModel interface for process abstraction, IProjectModel interface for project abstraction, ISemanticSimilarity interface for similarity calculations, List collection for managing items, Project entity for project data, String type for text handling

SuggestedNewName

Summary: Decode names, concatenate them, call GenerateClusterResponse, and return JSON response.

JsonResult ProcessController.SuggestedNewName()

Routing

  • HTTP: POST
  • URL: /Process/SuggestedNewName

Cross-layer call chain - ProcessController.SuggestedNewName → Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse - Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    ProcessController_SuggestedNewName["ProcessController.SuggestedNewName"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse --> Andromeda_Core_LoggingManager_Error
    ProcessController_SuggestedNewName --> Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse
Detailed Analysis

Key Flows - and return JSON response. - Return generated response as JSON

Error Flows - allowing exceptions to propagate unhandled. - No explicit error handling, Exceptions propagate during decoding, Exceptions propagate during aggregation, Exceptions propagate during downstream calls

Security Issues - Summary: The method processes user input without validation, risking injection and XSS attacks. - Use of unvalidated user input from Request.Form['actNames']

Performance Issues - Summary: The method inefficiently concatenates large string lists using Aggregate. - Inefficient string concatenation with Aggregate on large lists

Maintainability Issues - Summary: The method's use of hardcoded strings reduces maintainability. - Use of hardcoded magic strings for response checks

UX Impact Notes - Summary: Returning empty strings reduces user feedback clarity. - Empty string responses reduce meaningful user feedback

Test Case Ideas - Summary: Verify method invocation, JSON response, and input handling for various name lists. - Handle empty name list - Handle name list with special characters - Return JsonResult with 'NewName' property

Dependencies & Called Services - Summary: Uses InsorceOpenAICalls string dependency for service calls. - InsorceOpenAICalls string dependency

ReplaceSystems

Summary: ReplaceSystems processes an HTTP POST request to extract old and new system values.

JsonResult ProcessController.ReplaceSystems()

Routing

  • HTTP: POST
  • URL: /Process/ReplaceSystems
Detailed Analysis

Key Flows - Summary: ReplaceSystems processes an HTTP POST request to extract old and new system values. - Invoke method via HTTP POST, Extract old and new system values from request form

Security Issues - Summary: Unvalidated input causes SQL injection and XSS vulnerabilities. - Lack of input validation, Absence of input sanitization, SQL injection risk, Cross-site scripting (XSS) risk

Performance Issues - Summary: Database operations may slow down with very large project data. - Slow database operations on large project data, Potential delays in renaming properties and inserting history records

Maintainability Issues - Summary: Using a magic string for property name reduces maintainability and increases error risk. - Use of magic string 'DOE' for property name, Multiple code modifications required for changes

UX Impact Notes - Summary: Returning JsonResult impacts UX based on client response handling. - JsonResult response handling, User experience on failure or unexpected results

Test Case Ideas - Summary: Verify ReplaceSystems handles POST requests - returns JsonResult - Handle missing or empty oldValue and newValue in request - Return JsonResult

Dependencies & Called Services - Summary: ReplaceSystems depends on IActorModel and IProcessModel interfaces. - IActorModel interface dependency, IProcessModel interface dependency

DeleteSystems

Summary: DeleteSystems handles a POST request to delete DOE properties for the current project and returns the result as JSON.

JsonResult ProcessController.DeleteSystems()

Routing

  • HTTP: POST
  • URL: /Process/DeleteSystems
Detailed Analysis

Key Flows - Summary: DeleteSystems handles a POST request to delete DOE properties for the current project and returns the result as JSON. - Return JsonResult with operation outcome

Error Flows - risking unhandled exceptions. - Unhandled exceptions propagate from critical method calls

Security Issues - Summary: Directly using unvalidated Request.Form data risks injection attacks. - Unvalidated Request.Form data usage

Maintainability Issues - Summary: DeleteSystems lacks error handling and uses unvalidated Request.Form data. - Direct use of unvalidated Request.Form reduces code clarity and safety

UX Impact Notes - Summary: The method returns JsonResult - Return JsonResult

Test Case Ideas - Summary: Verify DeleteSystems invocation, correct parameter usage, JSON response, input validation, and security. - Handle missing or empty 'doe' form value - Return JsonResult successfully

Dependencies & Called Services - Summary: DeleteSystems calls IActorModel and IProcessModel services. - IActorModel service usage, IProcessModel service usage

GetStandardizationHistory

Summary: GetStandardizationHistory fetches, sorts by DoneDate descending, and returns history data as JSON.

JsonResult ProcessController.GetStandardizationHistory(string rel)

Routing

  • HTTP: GET
  • URL: /Process/GetStandardizationHistory

Cross-layer call chain - ProcessController.GetStandardizationHistory → Andromeda.Core.DataManager.GetData

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_GetData["Andromeda.Core.DataManager.GetData"]
    ProcessController_GetStandardizationHistory["ProcessController.GetStandardizationHistory"]
    ProcessController_GetStandardizationHistory --> Andromeda_Core_DataManager_GetData
Detailed Analysis

Key Flows - and returns history data as JSON. - Return sorted data as JSON response

Performance Issues - Summary: Ordering and materializing large datasets causes performance degradation. - Ordering large datasets with OrderByDescending - Materializing large datasets with ToList

Maintainability Issues - Summary: Anonymous types reduce code readability and maintainability in history record transformation. - Use of anonymous types in history record transformation, Reduced code readability and maintainability

UX Impact Notes - Summary: Returns JSON to update UI with standardization history data. - UI update with standardization history

Test Case Ideas - Summary: Verify GetStandardizationHistory handles GET requests and returns correct project data. - Handle HTTP GET requests correctly - Return accurate data for given project and relation IDs

Dependencies & Called Services - Summary: Uses DateTime for timestamps, Enumerable for collections, and IActorModel for actor interactions. - DateTime for timestamps, Enumerable for collection handling, IActorModel for actor interactions

GetClusterData

Summary: Fetch project-related data, identify the best cluster key, and return processed cluster and activity data as JSON.

JsonResult ProcessController.GetClusterData()

Routing

  • HTTP: GET
  • URL: /Process/GetClusterData

Cross-layer call chain - ProcessController.GetClusterData → Insorce.Helpers.ClusterHelper.GenerateCluster - 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

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    ProcessController_GetClusterData["ProcessController.GetClusterData"]
    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
    ProcessController_GetClusterData --> Insorce_Helpers_ClusterHelper_GenerateCluster
Detailed Analysis

Key Flows - and return processed cluster and activity data as JSON. - Return processed data as JSON result

Error Flows - Summary: The method lacks explicit exception handling and clear error propagation for null or invalid data. - Potential but undefined null checks for actClusterEval and actData

Security Issues - Summary: No security issues identified in the analyzed code. - No explicit security vulnerabilities found

Performance Issues - Summary: Optimize database calls and collection handling to improve performance. - Multiple expensive database or model calls, Use of ToList() causing full collection enumeration and high memory usage, FirstOrDefault inside loops causing repeated inefficient searches, Inefficient loop iterations due to unclear conditions

Maintainability Issues - Summary: Tight coupling and unclear code reduce maintainability and complicate modifications. - Commented out code indicates unfinished or deprecated logic

UX Impact Notes - Summary: Returns JSON data to update UI with cluster and activity information. - UI update with cluster information

Test Case Ideas - conditional assignments - and ranking logic. - Assign actData with FirstOrDefault for matching and non-matching cases - Assign erRank with diverse values to verify correctness

Dependencies & Called Services - Summary: Uses cluster helper and interfaces for actor, control, and process models with enumerable support. - ClusterHelper dependency, Enumerable usage, IActorModel interface, IControlModel interface, IProcessModel interface

SaveExcelErrorsinFile

Summary: SaveExcelErrorsinFile creates necessary directories, writes trimmed error strings to a file, and handles existing error files.

JsonResult ProcessController.SaveExcelErrorsinFile()

Routing

  • HTTP: POST
  • URL: /Process/SaveExcelErrorsinFile
Detailed Analysis

Key Flows - Summary: SaveExcelErrorsinFile creates necessary directories - and handles existing error files. - Create working directory if it does not exist - Retrieve project ID and construct working directory and error file path, Initialize TextWriter for error file, Invoke 'er' method if error file exists, Write trimmed error strings to file, Close TextWriter

Error Flows - Summary: Handle TextWriter creation and writing exceptions to prevent file corruption and data loss. - TextWriter creation failure risks file corruption, Exceptions during writing cause data loss

Security Issues - Summary: Prevent path traversal by sanitizing directory paths before file operations. - Path traversal risk from unsanitized working directory path construction, Path traversal risk from unsanitized directory path in TextWriter

Performance Issues - Summary: String concatenation and repeated string operations degrade performance with large data. - String concatenation for file path construction, Frequent ToString() and Trim() calls on large error strings

Maintainability Issues - Summary: Unclear variable names, typos, incomplete code, and ambiguous method purposes reduce maintainability. - Non-standard and unclear variable names reduce readability, Unclear purpose of 'pData' variable, Typo and incomplete usage in StreamWriter class, Undefined directory path context, Unclear name and purpose of 'er' method

UX Impact Notes - Summary: Silent failure on missing working directory harms user experience. - Silent failure on missing working directory

Test Case Ideas - Summary: Verify file path, directory handling, file writing, method calls, and error-free execution. - TempData assignment from Request.Form

Dependencies & Called Services - Summary: Uses file and directory operations with text writing and basic data types. - Directory operations, File handling, Integer data type, String manipulation, Text writing

ClearExcelErrorsinFile

Summary: ClearExcelErrorsinFile deletes the Excel error file if it exists and confirms completion via JSON.

JsonResult ProcessController.ClearExcelErrorsinFile()

Routing

  • HTTP: POST
  • URL: /Process/ClearExcelErrorsinFile
Detailed Analysis

Key Flows - Summary: ClearExcelErrorsinFile deletes the Excel error file if it exists and confirms completion via JSON. - Check existence of Excel error file - Delete error file if it exists and condition on file name is met - Return JSON result confirming clear operation completion

Error Flows - Summary: Handles missing Excel error file and risks undefined variable causing compilation error. - Skip deletion if Excel error file does not exist, Undefined variable 'leNme' risks compilation error

Security Issues - Summary: Validate file paths to prevent unauthorized file deletion. - Improper file path validation, Risk of unauthorized file deletion

Performance Issues - Summary: No performance issues identified in ClearExcelErrorsinFile method.

Maintainability Issues - Summary: Fix variable naming errors and ensure all variables are defined for maintainability. - Define all variables used in return statements to prevent errors

UX Impact Notes - Summary: File deletion may disrupt user workflow. - File deletion impact on workflow

Test Case Ideas - deletion logic - and valid JSON return. - Return of valid JSON result object - Handling undefined variables in return statement

Dependencies & Called Services - Summary: Uses file handling and integer operations. - File handling, Integer operations

SaveinMasterTempTable

Summary: Process form data, notify eligible administrators for 'Industry' type, save data to master temp table, update project registry, and return success response.

JsonResult ProcessController.SaveinMasterTempTable()

Routing

  • HTTP: POST
  • URL: /Process/SaveinMasterTempTable

Cross-layer call chain - ProcessController.SaveinMasterTempTable → Andromeda.Core.Entities.Membership.GetAllUsers - ProcessController.SaveinMasterTempTable → Insorce.Models.UserProfile.GetUserProfile - ProcessController.SaveinMasterTempTable → Insorce.Models.UsersModel.FromMembershipUser - ProcessController.SaveinMasterTempTable → Andromeda.Core.Entities.Roles.GetRolesForUser - ProcessController.SaveinMasterTempTable → Andromeda.Core.Services.Registry.setProjectDetails - ProcessController.SaveinMasterTempTable → Andromeda.Core.LoggingManager.Exception - Andromeda.Core.Entities.Roles.GetRolesForUser → Andromeda.Core.Entities.Roles.GetRolesForUser - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Membership_GetAllUsers["Andromeda.Core.Entities.Membership.GetAllUsers"]
    Andromeda_Core_Entities_Roles_GetRolesForUser["Andromeda.Core.Entities.Roles.GetRolesForUser"]
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    Insorce_Models_UserProfile_GetUserProfile["Insorce.Models.UserProfile.GetUserProfile"]
    Insorce_Models_UsersModel_FromMembershipUser["Insorce.Models.UsersModel.FromMembershipUser"]
    ProcessController_SaveinMasterTempTable["ProcessController.SaveinMasterTempTable"]
    Andromeda_Core_Entities_Roles_GetRolesForUser --> Andromeda_Core_Entities_Roles_GetRolesForUser
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_Entities_Membership_GetAllUsers
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_Entities_Roles_GetRolesForUser
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_LoggingManager_Exception
    ProcessController_SaveinMasterTempTable --> Andromeda_Core_Services_Registry_setProjectDetails
    ProcessController_SaveinMasterTempTable --> Insorce_Models_UserProfile_GetUserProfile
    ProcessController_SaveinMasterTempTable --> Insorce_Models_UsersModel_FromMembershipUser
Detailed Analysis

Key Flows - update project registry - and return success response. - Send notification emails if IndustryType is 'Industry' - Return JSON success response - Update project details in registry

Error Flows - Summary: Catch exceptions - log errors - validate form data - and handle null user lists. - Catch and log exceptions with LoggingManager - Return JSON error responses on failure - Check for empty or null user lists to prevent null references - Validate presence and correctness of form data

Security Issues - Summary: Direct use of unsanitized user input risks injection and email injection attacks. - Direct retrieval of user input from Request.Form without validation, Risk of injection attacks from unsanitized input, Potential email injection from unsanitized email body or recipient addresses

Performance Issues - Summary: Optimize LINQ operations and avoid unnecessary ToArray() calls to improve performance. - Multiple LINQ operations on large user collections impact performance, Unnecessary ToArray() calls cause extra memory allocation and copying

Maintainability Issues - Summary: The method uses magic strings and numbers, contains incomplete and dead code, reducing maintainability. - Use of magic strings for property names, types, roles, and organization names, Use of magic numbers in HTML construction instead of named constants, Incomplete and fragmented code snippets, Presence of commented-out or dead code

UX Impact Notes - Summary: Email content issues and sending failures degrade notification clarity and reliability. - Email sending delays harm perceived responsiveness

Test Case Ideas - sending logic - Send emails only when IndustryType equals Industry - Return valid JSON responses on success and error

Dependencies & Called Services - Summary: Uses collections, interfaces, logging, membership, and role management services. - ILoginModel interface - LoggingManager service

IsObservationAccordionReviewed

Summary: Process form data to verify accordion validity, update review status, and return JSON response.

JsonResult ProcessController.IsObservationAccordionReviewed()

Routing

  • HTTP: POST
  • URL: /Process/IsObservationAccordionReviewed

Cross-layer call chain - ProcessController.IsObservationAccordionReviewed → Andromeda.Core.LoggingManager.Info - ProcessController.IsObservationAccordionReviewed → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    ProcessController_IsObservationAccordionReviewed["ProcessController.IsObservationAccordionReviewed"]
    ProcessController_IsObservationAccordionReviewed --> Andromeda_Core_LoggingManager_Error
    ProcessController_IsObservationAccordionReviewed --> Andromeda_Core_LoggingManager_Info
Detailed Analysis

Key Flows - update review status - and return JSON response. - Check accordion key existence in constants and log if missing - Parse accordion string to ObservationTabAccordions enum and validate - Verify accordion parent relation in module relations and log if absent - Return JSON response with review status - Update review status and email notification in process model

Error Flows - Summary: Logs info and returns JSON false on parsing - Lack of explicit exception handling for data type conversion errors from form data - Log info and return JSON false if accordion string parsing fails - Log info and return JSON false if accordion key is missing in constants - Log info and return JSON false if accordion parent relation is missing

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

Performance Issues - Summary: LINQ Any() with lambda on large collection degrades performance. - LINQ Any() with lambda on Constants.ModuleRelations, Potential slow performance on large collections

Maintainability Issues - and hardcoded log messages. - Incomplete code snippets indicating missing logic - Hardcoded logging messages instead of named constants

UX Impact Notes - Summary: Users face confusion and workflow disruption due to missing data and absent error messages. - Incomplete return statements cause missing or unexpected user data

Test Case Ideas - Summary: Verify method handles all input cases - logs correctly - and returns accurate JSON review status. - Valid form data parsing and review status update - Accordion keys presence in constants and related logging - Correct info message logging for missing keys or relations - Complete branch coverage including early returns and final responses

Dependencies & Called Services - Summary: Uses utilities for data conversion, logging, and process modeling. - DateTime conversion, Enum handling, Enumerable operations - Logging management - Process model interface

IsModelValidationNodeReviewed

Summary: Retrieve NodeId, update review status, verify project and control nodes review, and return review status as JSON.

JsonResult ProcessController.IsModelValidationNodeReviewed()

Routing

  • HTTP: POST
  • URL: /Process/IsModelValidationNodeReviewed

Cross-layer call chain - ProcessController.IsModelValidationNodeReviewed → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_IsModelValidationNodeReviewed["ProcessController.IsModelValidationNodeReviewed"]
    ProcessController_IsModelValidationNodeReviewed --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

Key Flows - update review status - and return review status as JSON. - Return JsonResult with review status - Update review status with ProcessMapModel.UpdateIsReviewedStatus

Error Flows - Summary: Handle exceptions and null references to prevent errors in node validation logic. - Incomplete logic causing unexpected behavior or errors

Security Issues - Summary: Unvalidated inputs risk SQL injection and unauthorized data access. - or NodeId parameters risk SQL injection in database updates - Incomplete user and module checks allow information disclosure and unauthorized access

Performance Issues - Summary: No performance issues identified in IsModelValidationNodeReviewed method.

Maintainability Issues - incomplete logic - Incomplete and unclear code logic hinders understanding and maintenance

UX Impact Notes - Summary: Exposed error messages degrade user experience. - Exposed error messages, Negative user experience impact

Test Case Ideas - review status updates - error logging - Check iteration over control nodes with varied approval statuses for final review status - Handle edge cases with empty collections and incomplete logic gracefully - Test with empty and populated node collections for conditional logic - Confirm ProcessMapModel.UpdateIsReviewedStatus called with correct parameters - Verify error logging during review status update - Ensure method returns correct JsonResult with aggregated review status - Validate NodeId against Constants.FTRNodes - ControlNodes for module assignment

Dependencies & Called Services - and logging services. - Data conversion utilities, DateTime handling, Enumerable collection processing, IProcessModel interface, IProjectModel interface - LoggingManager service

ComputeEffortData

Summary: Retrieve project ID, start background thread to compute effort data asynchronously, and return operation status.

JsonResult ProcessController.ComputeEffortData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeEffortData

Cross-layer call chain - ProcessController.ComputeEffortData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeEffortData["ProcessController.ComputeEffortData"]
    ProcessController_ComputeEffortData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - and return operation status. - Set thread as background and start it - Return JSON response indicating operation initiation

Error Flows - Summary: Handle and log exceptions internally within the background thread without propagation. - Catch exceptions in background thread - Log exceptions with LoggingManager.Exception

Security Issues - Summary: New thread creation risks data races and compromises data integrity without synchronization. - Thread safety risk from unsynchronized new thread, Data integrity risk due to lack of synchronization

Performance Issues - Summary: Creating unmanaged background threads degrades performance and risks resource leaks. - Background thread lacks error handling and termination logic

Maintainability Issues - Summary: New thread usage and unclear code reduce maintainability and clarity. - Use of new thread complicates understanding and maintenance, Lambda expression lacks context and clarity, Empty code block indicates incomplete implementation, Inconsistent and unclear naming convention with 'JsonRequestBeh'

UX Impact Notes - Summary: The JSON response directly affects user feedback by indicating success or failure. - JSON response impacts user feedback, Displays success or failure messages

Test Case Ideas - Summary: Verify ComputeEffortData returns correct JsonResult and manages threading and async calls properly. - ProcessorThread startup confirmation - Return JsonResult validation

Dependencies & Called Services - Summary: Uses LoggingManager - LoggingManager service usage - Process management - Thread handling

asynComputeEffortData

Summary: Retrieve project data, compute weighted automation efforts, update project entity, and serialize to JSON.

void ProcessController.asynComputeEffortData(int PID)

Routing

  • URL: /Process/asynComputeEffortData

Cross-layer call chain - ProcessController.asynComputeEffortData → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.asynComputeEffortData → Andromeda.Core.Entities.Activity.Clone - ProcessController.asynComputeEffortData → Andromeda.Core.Entities.Activity.TotalEffort

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    ProcessController_asynComputeEffortData["ProcessController.asynComputeEffortData"]
    ProcessController_asynComputeEffortData --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_asynComputeEffortData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_asynComputeEffortData --> Andromeda_Core_Services_ProcessExtensions_FindByID
Detailed Analysis

Key Flows - update project entity - Calculate effort values by summing efforts weighted by automation percentages for activity types - Decode JSON to project entity or create new entity based on conditions - Update project entity with effort values and serialize to JSON

Error Flows - Summary: Handle JSON decoding errors and prevent null reference exceptions in asynComputeEffortData. - Missing JSON decoding error handling, Null reference risks on allProperties and allActivities, Incomplete code causing runtime errors

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

Performance Issues - Summary: Repeated data retrieval calls and FindByID usage inside loops degrade performance. - FindByID method inside loop causing performance degradation, Multiple calls to GetCompensatoryActivities, GetNPAActivities, and GetAutomationGridData impacting performance

Maintainability Issues - Summary: Fix typos, remove magic numbers, complete code, and add JSON error handling. - Typo in method name 'asynComputeEffortData', Use of magic numbers in effort calculation, Incomplete and corrupted code fragments, Typographical errors causing compilation issues, Missing error handling for JSON decoding

UX Impact Notes - Summary: Calculated effort values indirectly affect user information display. - No direct UI impact, Effort values used for user information display

Test Case Ideas - conditional logic - and project effort updates. - Conditional logic involving dataOfMeasure and related variables - Project entity updates with calculated effort values

Dependencies & Called Services - Summary: Uses models, collections, serialization, and string utilities for effort data computation. - Activity model, Enumerable utilities, Actor model interface, Control model interface, Final plan model interface, Project model interface, JavaScript serialization, List collection, String utilities - Process model interface, Process extension methods

ComputeEffortRelatedData

Summary: Retrieve project ID, start background thread for async effort computation, and return operation status.

JsonResult ProcessController.ComputeEffortRelatedData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeEffortRelatedData

Cross-layer call chain - ProcessController.ComputeEffortRelatedData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeEffortRelatedData["ProcessController.ComputeEffortRelatedData"]
    ProcessController_ComputeEffortRelatedData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - and return operation status. - Create and configure background thread for async effort computation - Return JsonResult with operation status

Error Flows - Summary: Catch and log exceptions during asynchronous computation initiation. - Catch exceptions during async computation start - Log exceptions with LoggingManager.Exception

Security Issues - Summary: No security issues identified in ComputeEffortRelatedData.

Performance Issues - Summary: Creating new threads for async operations degrades performance if unmanaged. - Resource-intensive thread creation, Performance impact from unmanaged threading

Maintainability Issues - Summary: Incomplete code fragments and unclear thread configuration reduce maintainability. - Incomplete variable declarations and lambda expressions, Empty or malformed try block, Truncated and unclear thread configuration code

Test Case Ideas - Summary: Verify method returns JsonResult - and handles async calls correctly. - Return JsonResult validation - Return value and behavior on successful async start

Dependencies & Called Services - Summary: Uses LoggingManager - LoggingManager service - Process service - Thread service

asynComputeEffortRelatedData

Summary: Retrieve and filter project data, compute effort metrics per actor and automation type, then aggregate results into the project entity.

void ProcessController.asynComputeEffortRelatedData(int PID)

Routing

  • URL: /Process/asynComputeEffortRelatedData

Cross-layer call chain - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Entities.Activity.Effort - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProcessController.asynComputeEffortRelatedData → Insorce.Helpers.Helpers.getSkillLevel - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Entities.Gantt.HourlyEffortByActor - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Services.Algorithms.Delooper.PopulateUnitMapping - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - ProcessController.asynComputeEffortRelatedData → Andromeda.Core.Entities.Activity.TotalEffort - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - Insorce.Helpers.Helpers.getSkillLevel → Andromeda.Core.Constants.GetSkill - Insorce.Helpers.Helpers.getSkillLevel → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - Andromeda.Core.Entities.Gantt.HourlyEffortByActor → Andromeda.Core.Entities.Sched.GetHourEffort - Andromeda.Core.Entities.Gantt.HourlyEffortByActor → Andromeda.Core.Entities.Sched.StartTimeHour - 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_Constants_GetSkill["Andromeda.Core.Constants.GetSkill"]
    Andromeda_Core_Entities_Activity_Effort["Andromeda.Core.Entities.Activity.Effort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor["Andromeda.Core.Entities.Gantt.HourlyEffortByActor"]
    Andromeda_Core_Entities_Sched_GetHourEffort["Andromeda.Core.Entities.Sched.GetHourEffort"]
    Andromeda_Core_Entities_Sched_StartTimeHour["Andromeda.Core.Entities.Sched.StartTimeHour"]
    Andromeda_Core_Extensions_LinqExtensions_GetPathIds["Andromeda.Core.Extensions.LinqExtensions.GetPathIds"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks["Andromeda.Core.Services.Algorithms.Delooper.GetSourcesAndSinks"]
    Andromeda_Core_Services_Algorithms_Delooper_PopulateUnitMapping["Andromeda.Core.Services.Algorithms.Delooper.PopulateUnitMapping"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Insorce_Helpers_Helpers_getSkillLevel["Insorce.Helpers.Helpers.getSkillLevel"]
    ProcessController_asynComputeEffortRelatedData["ProcessController.asynComputeEffortRelatedData"]
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_GetHourEffort
    Andromeda_Core_Entities_Gantt_HourlyEffortByActor --> Andromeda_Core_Entities_Sched_StartTimeHour
    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_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    Insorce_Helpers_Helpers_getSkillLevel --> Andromeda_Core_Constants_GetSkill
    Insorce_Helpers_Helpers_getSkillLevel --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Entities_Activity_TotalEffort
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Entities_Gantt_HourlyEffortByActor
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_GetSourcesAndSinks
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_PopulateUnitMapping
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_asynComputeEffortRelatedData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_asynComputeEffortRelatedData --> Insorce_Helpers_Helpers_getSkillLevel
Detailed Analysis

Key Flows - Summary: Retrieve and filter project data, compute effort metrics per actor and automation type, then aggregate results into the project entity. - Calculate total, rework, and FTE effort per actor using LINQ - Handle out-process activities to compute additional effort metrics - Process automation paths to categorize activities and compute automation effort - Aggregate and assign effort metrics to project entity

Error Flows - Summary: Prevent null reference errors by validating activities and data before processing. - Check for null predecessor and successor activities when filtering arrows - Initialize or decode dataOfMeasures to handle null or empty values - Validate successor and predecessor activities during loop arrow processing

Security Issues - Summary: Sanitize inputs and update JSON decoding to prevent injection and security risks. - Unvalidated dataOfMeasures risks data integrity and security

Performance Issues - Summary: Excessive database calls and repeated LINQ operations degrade performance and increase memory use. - Multiple database calls causing performance degradation, Repeated LINQ queries on large collections causing slow performance, Multiple ToList() calls causing unnecessary data copying and memory use, FirstOrDefault inside loops causing multiple enumerations, Repeated enumerations of collections like DeloopActs and allArrows

Maintainability Issues - and complex logic reduce maintainability. - Repeated effort calculation logic lacking refactoring

Test Case Ideas - Summary: Verify accurate data retrieval, effort calculations, actor filtering, and performance under load. - Calculate total, rework, and FTE effort per actor with varied inputs - Handle out-process activities and calculate out-process effort accurately - Process automation paths and compute effort by automation type - Aggregate and assign primary - Ensure performance and correctness with large datasets - Validate magic numbers and strings in calculations for correctness and clarity

Dependencies & Called Services - Summary: Uses models, collections, utilities, and serialization for effort computation. - Activity model, Dictionary collection, Enumerable utilities, Gantt chart utilities, Helper functions, Actor model interface, Control model interface, Final plan model interface, Project model interface, Risk model interface, Integer type, JavaScript serialization, LINQ extensions, List collection, Math utilities, String type - Process model interface, Process extensions

ComputeHRCostData

Summary: Retrieve project details, start async HR cost computation in background, and confirm request acceptance.

JsonResult ProcessController.ComputeHRCostData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeHRCostData

Cross-layer call chain - ProcessController.ComputeHRCostData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeHRCostData["ProcessController.ComputeHRCostData"]
    ProcessController_ComputeHRCostData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - Summary: Retrieve project details, start async HR cost computation in background, and confirm request acceptance. - Return JSON response confirming request acceptance

Error Flows - Summary: Catch and log exceptions during async cost data computation with incomplete rollback handling. - Catch and log exceptions from asyncComputeHRCostData using LoggingManager

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

Performance Issues - Summary: Improper thread management causes resource leaks and suboptimal asynchronous behavior. - Unmanaged thread creation risks resource leaks and uncontrolled growth, Threading model conflicts with async method expectations and lacks proper awaiting

Maintainability Issues - Summary: The method spawns unmanaged threads and contains empty code blocks, reducing maintainability. - Unmanaged thread creation without clear purpose or handling, Presence of empty code blocks indicating unfinished implementation

UX Impact Notes - Summary: Returns JSON boolean affecting client-side user flows and UI updates. - Triggers UI updates

Test Case Ideas - Summary: Verify correct JSON response, parameter handling, background processing, and secure data management. - Handle incomplete lambda expressions and syntax errors - Return JsonResult - Prevent logging or disclosure of sensitive data via roller object

Dependencies & Called Services - Summary: Uses logging - LoggingManager service - Process control - Thread management

asynComputeHRCostData

Summary: Calculate project HR costs by filtering active actors, converting salaries using FX rates, processing project measure data, and updating comparison records.

void ProcessController.asynComputeHRCostData(int PID, string ProjectCurrency)

Routing

  • URL: /Process/asynComputeHRCostData
Detailed Analysis

Key Flows - Summary: Calculate project HR costs by filtering active actors, converting salaries using FX rates, processing project measure data, and updating comparison records. - Calculate each actor's USD cost using skill currency and FX rates - Decode or create project entities from JSON measure data - Serialize project entity and update comparison data

Error Flows - Summary: Handle null or empty data and prevent errors during FX rate and project data processing. - Handle empty or null FX rates collection - Initialize new objects for null project comparison data, Prevent incomplete conditions causing errors - Validate JSON data when decoding project entities

Security Issues - Summary: No security issues found in asynComputeHRCostData method.

Performance Issues - Summary: Optimize data access and serialization to prevent performance degradation. - Excessive memory use from ToList() on large actor datasets

Maintainability Issues - Summary: Improve code clarity, error handling, and use constants to enhance maintainability. - Insufficient comments for complex logic

Test Case Ideas - Summary: Verify FX rate calculations, actor filtering, cost computations, method calls, and JSON serialization. - Correct invocation and data return of GetProjectComparisionData - Proper call of InsertUpdateCompa with serialized data

Dependencies & Called Services - Summary: Uses data conversion, serialization, and model interfaces for computation. - Data conversion utilities, Enumerable collections, Actor and project model interfaces, JavaScript serialization, String manipulation

ComputeInfraCostData

Summary: Retrieve project details, start async cost computation in background, and return immediate acceptance response.

JsonResult ProcessController.ComputeInfraCostData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeInfraCostData

Cross-layer call chain - ProcessController.ComputeInfraCostData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeInfraCostData["ProcessController.ComputeInfraCostData"]
    ProcessController_ComputeInfraCostData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - and return immediate acceptance response. - Return immediate JSON response confirming request acceptance

Error Flows - Summary: Catch and log exceptions during async computation to prevent crashes. - Catch exceptions during asynchronous computation - Log exceptions using LoggingManager

Security Issues - Summary: No security issues found in ComputeInfraCostData method.

Performance Issues - Summary: Creating and starting new threads without management degrades performance and scalability. - Unmanaged thread creation and start, Resource-intensive thread usage, Negative impact on scalability

Maintainability Issues - Summary: Method naming mismatches and incomplete code reduce maintainability and cause errors. - Method name does not match HTTP GET attribute, Incomplete asynchronous method call risks errors, Empty code block indicates incomplete code

UX Impact Notes - Summary: Returns JSON immediately - requiring client to handle asynchronous background processing. - Immediate JSON response, Asynchronous background thread, Client-dependent UX flow

Test Case Ideas - Summary: Verify method returns JsonResult - Check lambda expression usage and effect - Create, start, and dispose thread properly - Return JsonResult - Set thread IsBackground property correctly

Dependencies & Called Services - Summary: Uses logging and concurrency services for process and thread management. - Logging service - Process management - Thread management

asynComputeInfraCostData

Summary: Retrieve multiple models' data, compute infrastructure costs, update project properties, and finalize computation.

void ProcessController.asynComputeInfraCostData(int PID, string ProjectCurrency)

Routing

  • URL: /Process/asynComputeInfraCostData
Detailed Analysis

Key Flows - update project properties - Calculate and round total infrastructure cost - Call nData with PID to process measurement data and validate conditions - Assign infrastructure cost

Error Flows - Summary: Handle null responses and malformed JSON to prevent runtime errors. - Detect and handle malformed or incomplete JSON data to prevent errors - Validate data presence and integrity before processing

Security Issues - Summary: Prevent SQL injection and deserialization vulnerabilities by validating inputs. - Deserialization vulnerability from unvalidated JSON input

Performance Issues - Summary: Optimize database calls and cache repeated computations to improve performance. - Multiple sequential database calls causing bottlenecks, Repeated OfficeList.Sum() calls without caching

Maintainability Issues - Summary: The method's tight coupling, unclear names, incomplete code, and magic values reduce maintainability. - Tight coupling with multiple models and services, Incomplete conditions and partial code snippets, Unclear and non-standard method and variable names, Use of magic numbers without named constants, Use of unqualified magic types

UX Impact Notes - Summary: Calculates data used to display infrastructure cost and project info to users. - No direct user experience impact, Outputs data for user display

Test Case Ideas - projEntity assignments - and handle edge cases. - projEntity assignment based on es.MeasuresJson true or false

Dependencies & Called Services - Summary: Uses models and utilities for asynchronous infrastructure cost computation. - Enumerable for collection operations, IActorModel for actor data, IHRModel for human resources data, IInfraModel for infrastructure data, IProjectModel for project data, JavaScriptSerializer for data serialization, Math for calculations, String for text manipulation

ComputeControlsData

Summary: Retrieve project ID, start asynchronous controls data computation in a new thread, and return success status.

JsonResult ProcessController.ComputeControlsData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeControlsData

Cross-layer call chain - ProcessController.ComputeControlsData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeControlsData["ProcessController.ComputeControlsData"]
    ProcessController_ComputeControlsData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - and return success status. - Create and start background thread for async controls data computation - Return JSON response with success boolean

Error Flows - Summary: Catch and log exceptions from asynComputeControlsData to prevent crashes. - Catch exceptions from asynComputeControlsData - Log exceptions using LoggingManager

Security Issues - Summary: Starting a new thread without synchronization risks thread safety and concurrency issues. - Thread safety risk from unsynchronized thread creation, Concurrency issues due to lack of synchronization

Performance Issues - Summary: Creating unmanaged background threads per request harms scalability and risks resource leaks. - Creating a new thread per request impacts scalability, Background threads lack explicit termination or management, Unmanaged threads cause resource leaks

Maintainability Issues - Summary: Raw Thread usage and unclear naming reduce code maintainability and readability. - Use raw Thread objects complicates debugging and maintenance, Unclear or truncated naming conventions reduce readability

UX Impact Notes - Summary: Returns JSON immediately - Immediate JSON response, Asynchronous background thread, Potential client confusion on sync expectations

Test Case Ideas - Summary: Verify ComputeControlsData returns correct JsonResult and handles threading properly. - Handle incomplete lambda expression - Return JsonResult validation

Dependencies & Called Services - Summary: Uses logging and system process/thread management services. - LoggingManager service - Process management - Thread management

asynComputeControlsData

Summary: Retrieve and process project-related data to calculate control metrics and construct risk paths.

void ProcessController.asynComputeControlsData(int PID)

Routing

  • URL: /Process/asynComputeControlsData

Cross-layer call chain - ProcessController.asynComputeControlsData → Andromeda.Core.Entities.Arrow.Clone - ProcessController.asynComputeControlsData → Insorce.Helpers.ClusterHelper.GenerateCluster - ProcessController.asynComputeControlsData → Andromeda.Core.Services.ProcessExtensions.FindByID - ProcessController.asynComputeControlsData → Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows - ProcessController.asynComputeControlsData → Andromeda.Core.Services.Algorithms.Delooper.deloop - ProcessController.asynComputeControlsData → Andromeda.Core.Entities.Activity.Clone - ProcessController.asynComputeControlsData → Insorce.Helpers.Helpers.GetIndividualPath - 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.Algorithms.Delooper.deloop → Andromeda.Core.LoggingManager.Error - Andromeda.Core.Services.Algorithms.Delooper.deloop → Andromeda.Core.Services.ProcessExtensions.FindByID - Insorce.Helpers.Helpers.GetIndividualPath → Andromeda.Core.Entities.Arrow.Clone - Insorce.Helpers.Helpers.GetIndividualPath → Andromeda.Core.Entities.EdgeInfo.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Clone["Andromeda.Core.Entities.Activity.Clone"]
    Andromeda_Core_Entities_Arrow_Clone["Andromeda.Core.Entities.Arrow.Clone"]
    Andromeda_Core_Entities_EdgeInfo_Clone["Andromeda.Core.Entities.EdgeInfo.Clone"]
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows["Andromeda.Core.Services.Algorithms.Delooper.GetLoopingArrows"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop["Andromeda.Core.Services.Algorithms.Delooper.deloop"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Andromeda_Core_Services_ProcessExtensions_FindByID["Andromeda.Core.Services.ProcessExtensions.FindByID"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_Helpers_GetIndividualPath["Insorce.Helpers.Helpers.GetIndividualPath"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    ProcessController_asynComputeControlsData["ProcessController.asynComputeControlsData"]
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_LoggingManager_Error
    Andromeda_Core_Services_Algorithms_Delooper_deloop --> Andromeda_Core_Services_ProcessExtensions_FindByID
    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
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_Arrow_Clone
    Insorce_Helpers_Helpers_GetIndividualPath --> Andromeda_Core_Entities_EdgeInfo_Clone
    ProcessController_asynComputeControlsData --> Andromeda_Core_Entities_Activity_Clone
    ProcessController_asynComputeControlsData --> Andromeda_Core_Entities_Arrow_Clone
    ProcessController_asynComputeControlsData --> Andromeda_Core_Services_Algorithms_Delooper_GetLoopingArrows
    ProcessController_asynComputeControlsData --> Andromeda_Core_Services_Algorithms_Delooper_deloop
    ProcessController_asynComputeControlsData --> Andromeda_Core_Services_ProcessExtensions_FindByID
    ProcessController_asynComputeControlsData --> Insorce_Helpers_ClusterHelper_GenerateCluster
    ProcessController_asynComputeControlsData --> Insorce_Helpers_Helpers_GetIndividualPath
Detailed Analysis

Key Flows - Summary: Retrieve and process project-related data to calculate control metrics and construct risk paths. - Calculate control effectiveness, lines of defence, and related metrics via model methods - Process objectives and risk controls into nested dictionaries for efficient access - Retrieve data for activities, arrows, controls, risks, and product factors by PID, Iterate objectives and risks to count mitigations and total records, Construct individual risk paths from end nodes and aggregate path data, Deserialize project comparison JSON and compute adequacy, effectiveness, coverage, and effort saved

Error Flows - Summary: Handle null inputs and missing data to prevent exceptions and unnecessary processing. - Null check for rEval to trigger cluster generation - Early return on null or whitespace input strings - Conditional checks on nested dictionary keys to avoid exceptions

Security Issues - Summary: Validate and sanitize JSON input to prevent deserialization vulnerabilities. - Deserialization vulnerability from unvalidated JSON input

Performance Issues - Summary: Optimize collection operations and avoid costly enumerations and conversions in loops. - Excessive use of ToList() causing full enumeration and memory allocation, Resource-intensive cloning of large arrow and activity collections, Inefficient LINQ methods (Any, GroupBy, ToDictionary, OrderBy, Skip, Union) in loops on large collections, Unnecessary string conversions (ToString) on IDs within loops causing boxing and allocations, Performance impact from nested loops and recursive path construction

Maintainability Issues - Summary: The method suffers from tight coupling, unclear naming, and poor readability. - Lack of comments and documentation for complex logic

UX Impact Notes - Summary: Method lacks user feedback on invalid input and does not handle UX directly. - Calculated metrics inform UI but lack direct UX handling in method - Early returns on null or whitespace inputs prevent user feedback

Test Case Ideas - Summary: Test data processing, condition handling, metric calculations, graph operations, and performance under load. - Calculate control effectiveness, lines of defence, and related metrics accurately - Handle ObjectiveActivityRiskStatus dictionary access with diverse key scenarios - Invoke ionData method with varied PID values and validate actCluste conditions - Assess performance impact of large datasets on LINQ queries and cloning - Process objectives and create nested dictionaries for activity risk controls

Dependencies & Called Services - Summary: Uses models, helpers, collections, and utilities for asynchronous control data computation. - Activity service, Arrow service, ClusterHelper utility, Enumerable collection, Helpers utility, IActorModel interface, IControlModel interface, IProcessModel interface, IProjectModel interface, IRiskModel interface, Int32 type, JavaScriptSerializer utility, List collection, Math utility, String type - ProcessExtensions utility

ComputeTeamsRelatedData

Summary: Start a background thread to compute team data asynchronously for the current project and return operation status.

JsonResult ProcessController.ComputeTeamsRelatedData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeTeamsRelatedData

Cross-layer call chain - ProcessController.ComputeTeamsRelatedData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeTeamsRelatedData["ProcessController.ComputeTeamsRelatedData"]
    ProcessController_ComputeTeamsRelatedData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - Summary: Start a background thread to compute team data asynchronously for the current project and return operation status. - Create and start background thread for asynchronous team data computation - Return JSON response indicating operation initiation

Error Flows - Summary: Catch and log exceptions internally to ensure JSON response returns. - Catch exceptions during asynchronous computation - Ensure JSON response returns despite errors - Handle exceptions internally without propagation - Log exceptions using LoggingManager.Exception for ProcessController

Security Issues - Summary: New thread creation lacks synchronization, causing thread safety risks. - Thread safety risks from unsynchronized new thread creation

Performance Issues - Summary: Improper thread management degrades performance and risks resource leaks. - Missing thread termination logic

Maintainability Issues - Summary: Replace raw Thread with modern async patterns and clarify variable usage for maintainability. - Use modern asynchronous patterns instead of raw Thread objects, Replace unclear lambda expressions with self-explanatory code, Define and document variable 'Proj' to avoid ambiguity

UX Impact Notes - Summary: Boolean JSON response affects user experience based on client-side handling. - Boolean JSON response, Client-side handling impact on UX

Test Case Ideas - Summary: Verify correct JSON response, thread management, and asynchronous data computation. - Return JsonResult - Validate JSON response correctness

Dependencies & Called Services - Summary: Uses logging and concurrency services for process and thread management. - LoggingManager for logging - Process management - Thread management

asynComputeTeamsRelatedData

Summary: Compute team-related metrics by aggregating activity data, filtering teams, decoding measures, and serializing results.

void ProcessController.asynComputeTeamsRelatedData(int PID)

Routing

  • URL: /Process/asynComputeTeamsRelatedData

Cross-layer call chain - ProcessController.asynComputeTeamsRelatedData → Andromeda.Core.Entities.Activity.TotalEffort - ProcessController.asynComputeTeamsRelatedData → Andromeda.Core.Entities.Activity.ReworkEffort

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    Andromeda_Core_Entities_Activity_TotalEffort["Andromeda.Core.Entities.Activity.TotalEffort"]
    ProcessController_asynComputeTeamsRelatedData["ProcessController.asynComputeTeamsRelatedData"]
    ProcessController_asynComputeTeamsRelatedData --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_asynComputeTeamsRelatedData --> Andromeda_Core_Entities_Activity_TotalEffort
Detailed Analysis

Key Flows - Summary: Compute team-related metrics by aggregating activity data, filtering teams, decoding measures, and serializing results. - Calculate minimum FTE from activities, Calculate team size, peak, effort, utilization, and desired utilization - Retrieve activities and actors by project ID, Aggregate total effort, rework, and productive hours per actor, Filter active, non-system teams and retrieve measure data, Initialize project comparison data if absent, Decode JSON measure data into project entity, Serialize project entity data to JSON

Error Flows - Summary: Handle missing or null data during team-related computations. - Handle missing activities or actors for project ID - Initialize new instance if project comparison data is null - Validate MeasuresJson string before JSON decoding

Security Issues - Summary: Deserializing projEntity JSON risks security vulnerabilities. - Deserialization vulnerability in projEntity JSON processing

Performance Issues - Summary: Optimize database calls and LINQ operations to improve performance. - Multiple LINQ operations on large datasets

Maintainability Issues - Summary: Code contains unclear variables, magic numbers, incomplete fragments, and commented-out code reducing maintainability. - Commented-out code indicating incomplete functionality, Anonymous types in LINQ reduce code clarity, Magic numbers without explanations, Unclear and non-descriptive variable names, Incomplete or malformed code fragments

UX Impact Notes - Summary: Calculates team metrics for potential user display. - Calculate team performance metrics - Support user display of team data

Test Case Ideas - Summary: Verify accurate calculations, data retrieval, filtering, serialization, and error handling in team data processing. - Correct minimum FTE calculation from activities and actors, Handling missing activities or actors for project ID, Accurate TotalEffort and ReworkEffort per actor, Correct FTE retrieval from Minumcount collection, Accurate ProductiveHours calculation, Filtering active, non-system teams in inscopeNonsystmTeams, Expected data presence in dataOfMeasures, Team size, peak, effort, utilization, and desired utilization calculations under varied team data, Project entity JSON serialization, Robust handling of incomplete or malformed data

Dependencies & Called Services - Summary: Uses core libraries and interfaces for data processing and serialization. - Activity service, Data conversion utilities, Enumerable collections, Actor model interface, Project model interface, JavaScript serialization, Mathematical functions, String manipulation - Process model interface

ComputeBRsRelatedData

Summary: Retrieve project ID, start background thread for async BRs data computation, and confirm request acceptance.

JsonResult ProcessController.ComputeBRsRelatedData()

Routing

  • HTTP: GET
  • URL: /Process/ComputeBRsRelatedData

Cross-layer call chain - ProcessController.ComputeBRsRelatedData → Andromeda.Core.LoggingManager.Exception

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Exception["Andromeda.Core.LoggingManager.Exception"]
    ProcessController_ComputeBRsRelatedData["ProcessController.ComputeBRsRelatedData"]
    ProcessController_ComputeBRsRelatedData --> Andromeda_Core_LoggingManager_Exception
Detailed Analysis

Key Flows - Summary: Retrieve project ID, start background thread for async BRs data computation, and confirm request acceptance. - Return JSON response confirming request acceptance

Error Flows - Summary: Catch and log exceptions from asynComputeBRsData to prevent crashes. - Catch exceptions from asynComputeBRsData - Log exceptions using LoggingManager

Security Issues - Summary: No security issues found in ComputeBRsRelatedData.

Performance Issues - Summary: Creating unmanaged threads and empty code blocks degrade performance and resource management. - Unmanaged thread creation causing resource leaks, Empty code block indicating inefficient implementation

Maintainability Issues - Summary: Improve naming clarity and remove unused lambda expression. - Unclear method name ComputeBRsRelatedData, Non-descriptive variable name ProjectId, Unused lambda expression

UX Impact Notes - Summary: Returns success response before background processing completes - Immediate JSON response before async processing, Potential user confusion from premature success indication

Test Case Ideas - Summary: Verify correct data retrieval, thread execution, async call, and immediate JSON response. - Return JsonResult - Return JSON response with correct boolean immediately after thread start

Dependencies & Called Services - Summary: Uses logging - LoggingManager for logging - Process for process control - Thread for threading

asynComputeBRsData

Summary: Retrieve and process project data, manage clusters, handle JSON entities, and update comparison data.

void ProcessController.asynComputeBRsData(int PID)

Routing

  • URL: /Process/asynComputeBRsData

Cross-layer call chain - ProcessController.asynComputeBRsData → Insorce.Helpers.ClusterHelper.GenerateCluster - 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

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_ReplaceSpecialCharwithSpace["Andromeda.Core.Extensions.LinqExtensions.ReplaceSpecialCharwithSpace"]
    Andromeda_Core_Services_KClusters_RunClustering["Andromeda.Core.Services.KClusters.RunClustering"]
    Insorce_Helpers_ClusterHelper_GenerateCluster["Insorce.Helpers.ClusterHelper.GenerateCluster"]
    Insorce_Helpers_InsorceOpenAICalls_GenerateClusterResponse["Insorce.Helpers.InsorceOpenAICalls.GenerateClusterResponse"]
    ProcessController_asynComputeBRsData["ProcessController.asynComputeBRsData"]
    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
    ProcessController_asynComputeBRsData --> Insorce_Helpers_ClusterHelper_GenerateCluster
Detailed Analysis

Key Flows - handle JSON entities - and update comparison data. - Reset and assign cluster keys based on conditions and data - Decode or assign JSON data for project entities - Serialize project entity and update or insert comparison data via InsertUpdateComp

Error Flows - Summary: Handle null data and prevent errors with conditional checks and proper initialization. - Check for null values before assigning cluster keys or processing JSON - Initialize new ProjectC instance for null or empty project comparison data, Address incomplete code sections to avoid unexpected errors

Security Issues - Summary: Calling undefined method 'ntity' causes security risk without validation or error handling. - Undefined method call 'ntity', Lack of input validation, Missing error handling

Performance Issues - Summary: Replace deprecated JavaScriptSerializer to improve JSON serialization performance. - Use of deprecated JavaScriptSerializer class, Slow JSON serialization for large objects

Maintainability Issues - Summary: The method suffers from tight model coupling, poor naming, incomplete code, and deprecated serialization. - Tight coupling with multiple models reduces maintainability, Non-descriptive variable names hinder readability, Undeclared and unused variables indicate incomplete code, Use of deprecated serialization classes complicates future maintenance

Test Case Ideas - conditional logic - Handle empty activity lists - Serialize project entities and call InsertUpdateComp - Assign projEntity based on sures.MeasuresJson value - Validate actClusterEval versus project ID conditions

Dependencies & Called Services - Summary: Uses multiple models and utilities for data processing and serialization. - ClusterHelper for cluster operations, Enumerable for collection handling, IActorModel for actor data, IControlModel for control data, IProcessModel for process data, IProjectModel for project data, JavaScriptSerializer for JSON serialization, String utilities

GetActivitiesBreakUp

Summary: Retrieve project actors and their activities, filter and map data, then return as JSON.

JsonResult ProcessController.GetActivitiesBreakUp()

Routing

  • HTTP: GET
  • URL: /Process/GetActivitiesBreakUp

Cross-layer call chain - ProcessController.GetActivitiesBreakUp → Andromeda.Core.Entities.Activity.Effort - ProcessController.GetActivitiesBreakUp → Andromeda.Core.Entities.Activity.IterationEffort - ProcessController.GetActivitiesBreakUp → Andromeda.Core.Entities.Activity.ReworkEffort

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Effort["Andromeda.Core.Entities.Activity.Effort"]
    Andromeda_Core_Entities_Activity_IterationEffort["Andromeda.Core.Entities.Activity.IterationEffort"]
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    ProcessController_GetActivitiesBreakUp["ProcessController.GetActivitiesBreakUp"]
    ProcessController_GetActivitiesBreakUp --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetActivitiesBreakUp --> Andromeda_Core_Entities_Activity_IterationEffort
    ProcessController_GetActivitiesBreakUp --> Andromeda_Core_Entities_Activity_ReworkEffort
Detailed Analysis

Key Flows - then return as JSON. - Fetch and filter active, non-system actors - Return mapped data as JSON

Performance Issues - Summary: Contains, Any, and FirstOrDefault methods cause slow performance on large actor collections. - Contains method on large actor ID list causes performance issues, Any and FirstOrDefault methods on large Actors collection cause slow performance

Maintainability Issues - Summary: Code contains commented-out sections and magic strings, reducing maintainability. - Commented-out code indicating incomplete or abandoned functionality, Use of magic strings violating DRY principle

UX Impact Notes - Summary: Delivers processed activities data in JSON, influencing display and usage. - Impact on data display and application usage - Processed activities data in JSON format

Test Case Ideas - Summary: Verify correct activity retrieval, filtering, data accuracy, serialization, and HTTP response. - Correct activities retrieval by project ID, Filtering of system and inactive actors, Accurate ActorName retrieval from Actors collection, Correct calculation and rounding of effort metrics, Proper serialization of ActsData to JSON, JSON response with correct HTTP status code

Dependencies & Called Services - Summary: Uses collections, time handling, math operations, and actor model for activity data processing. - Activity domain model, Enumerable collections, IActorModel interface, List collection, Math utilities, TimeSpan struct

UploadProjectBackup

Summary: Validate and process a '.bak' project backup by extracting, verifying, importing data, recalculating volumes, and returning JSON responses.

JsonResult ProcessController.UploadProjectBackup(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/UploadProjectBackup

Cross-layer call chain - ProcessController.UploadProjectBackup → Andromeda.Core.Utility.Compress.UnzipFolder - ProcessController.UploadProjectBackup → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_Utility_Compress_UnzipFolder["Andromeda.Core.Utility.Compress.UnzipFolder"]
    ProcessController_UploadProjectBackup["ProcessController.UploadProjectBackup"]
    ProcessController_UploadProjectBackup --> Andromeda_Core_LoggingManager_Error
    ProcessController_UploadProjectBackup --> Andromeda_Core_Utility_Compress_UnzipFolder
Detailed Analysis

Key Flows - Summary: Validate and process a '.bak' project backup by extracting - and returning JSON responses. - Ensure temporary folder exists or create it - Verify backup matches current project and return JSON error if not - Return success or error JSON responses based on outcome and AcceptTypes - Validate '.bak' file extension and return JSON error if invalid

Error Flows - Summary: Validate backup file type - and handle processing exceptions with JSON errors. - Log exceptions and return JSON error with message and stack trace - Return JSON error even if AcceptTypes exclude JSON

Security Issues - Summary: UploadProjectBackup risks malicious file upload, config exposure, and SQL injection. - DeleteConfigurationTable method vulnerable to SQL injection - ConfigurationManager.AppSettings usage risks exposing sensitive configuration data

Performance Issues - Summary: Recursive file searches and LINQ operations degrade performance on large datasets. - Recursive Directory.GetFiles slows large or network directory scans, LINQ methods Any(), Distinct(), ToList() impact performance on large collections

Maintainability Issues - Summary: The method suffers from unclear code, inconsistent error handling, and poor naming conventions. - Long method call chains and nested logic reduce clarity

UX Impact Notes - Summary: Restricting file types and exposing technical error details degrade user experience and clarity. - Restrict file uploads to '.bak' extension limiting workflow flexibility, Hardcoded, non-localized error messages reduce user comprehension, JSON error responses sent without explicit JSON request cause confusion, 'text/plain' content type affects client response handling, Expose detailed error info and stack traces overwhelming users

Test Case Ideas - folder logic - Temporary folder creation and existence logic

Dependencies & Called Services - Summary: Uses compression, file handling, XML processing, logging, and project model interfaces. - Compression utilities, Directory and Path management, Enumerable collections, HttpPostedFileBase for file uploads, IProcessModel and IProjectModel interfaces, StreamReader and TextReader for stream reading, XContainer and XElement for XML processing - LoggingManager for logging

DProjTemp

Summary: Retrieve project details, generate multiple Excel bulk upload files, and create a zip archive containing them.

ActionResult ProcessController.DProjTemp()

Routing

  • HTTP: GET
  • URL: /Process/DProjTemp

Cross-layer call chain - ProcessController.DProjTemp → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    ProcessController_DProjTemp["ProcessController.DProjTemp"]
    ProcessController_DProjTemp --> Andromeda_Core_Utility_Compress_CreateZip
Detailed Analysis

Key Flows - and create a zip archive containing them. - Create zip file containing all generated Excel files - Retrieve current project ID and folder path from configuration, Generate multiple Excel bulk upload files for project components

Error Flows - Summary: Handle errors during Excel file generation and zip file creation. - Error handling for Excel file generation failures, Error handling for zip file creation failures, Exception management during file processing

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

Performance Issues - Summary: Repeated GenerateExcelBulkUpload calls degrade performance with many project components. - Repeated GenerateExcelBulkUpload calls, High computational cost with many project components

Maintainability Issues - Summary: Repeated calls to GenerateExcelBulkUpload with similar parameters reduce maintainability. - Repeated calls to GenerateExcelBulkUpload with similar parameters, Increased difficulty updating method signature or parameters

UX Impact Notes - Summary: Generates Excel and zip files for user download or data import. - Excel file generation, Zip file creation, User-facing download functionality, Data import support

Test Case Ideas - Summary: Verify correct generation of Excel files and proper creation of zip archive. - Excel file generation for each project component, Zip file creation containing all Excel files

Dependencies & Called Services - Summary: DProjTemp uses services for compression, directory management, processing, and string handling. - Compression service, Directory management service, String handling service - Processing service

UpdateandGenerateExcel

Summary: Process form data to create activity objects with constraints, handle conditional data collections, and generate an Excel file with JSON response.

ActionResult ProcessController.UpdateandGenerateExcel()

Routing

  • URL: /Process/UpdateandGenerateExcel
Detailed Analysis

Key Flows - Summary: Process form data to create activity objects with constraints - handle conditional data collections - Create Activity objects from data collections with ID and name mapping - Return JSON response with generated Excel data

Error Flows - Summary: Handle data conversion errors - Null reference exceptions accessing br.T or br.N without checks

Security Issues - Summary: Use of unvalidated Request.Form data risks SQL injection and XSS attacks. - Unvalidated Request.Form data

Performance Issues - Summary: Optimize string operations and data processing in loops to improve performance. - Inefficient string concatenation within loops, Unoptimized iteration over large data collections, Repeated Trim and conversion methods inside loops

Maintainability Issues - Summary: Replace magic strings and numbers with constants, improve variable naming, and add error handling. - Use constants or enums instead of magic strings, Replace magic numbers with named constants, Improve variable names for clarity, Avoid similar variable names to prevent confusion, Add error handling for type conversions and data processing, Avoid incomplete and fragmented code snippets

Test Case Ideas - conditional logic - Decode JSON and initialize activity data lists, Execute conditional branches for different flag values, Call GenerateExcelBulkUpload with flags and verify JSON response - Handle string concatenation and trimming with varied inputs - Process empty and large data collections for correctness and performance

Dependencies & Called Services - Summary: Utilizes standard libraries for data conversion, collection handling, math operations, string manipulation, and time interval processing. - Data conversion utilities, Collection handling, Mathematical operations, String manipulation, Time interval processing

DownloadExcelFromTempPath

Summary: Returns Excel file as ActionResult when TempData contains a valid file path.

ActionResult ProcessController.DownloadExcelFromTempPath()

Routing

  • HTTP: GET
  • URL: /Process/DownloadExcelFromTempPath
Detailed Analysis

Key Flows - Summary: Returns Excel file as ActionResult when TempData contains a valid file path. - Return Excel file with correct content type and file name

Error Flows - Summary: The method lacks validation for missing or empty Excel file paths, risking runtime errors. - Potential runtime errors when returning file without path check

Security Issues - Summary: Serving files from TempData without validation risks unauthorized file access. - Unvalidated file path from TempData

Maintainability Issues - Summary: The method lacks error handling for TempData access, reducing robustness and maintainability. - Direct use of TempData['ExcelFilePath'] without error handling, No validation of TempData content before use

UX Impact Notes - Summary: Users receive an Excel file response that impacts their workflow and expectations. - Excel file response, Workflow impact, User expectation influence

Test Case Ideas - Summary: Verify HTTP GET response and correct Excel file retrieval from TempData path. - Handle HTTP GET request correctly - Return correct Excel file from valid TempData path

Dependencies & Called Services - Summary: Uses path conversion service for Excel download from temporary path. - Path conversion service, Excel download from temporary path

UpdateInputErrorStatus

Summary: UpdateInputErrorStatus processes POST requests to update error status and returns the operation result as JSON.

JsonResult ProcessController.UpdateInputErrorStatus()

Routing

  • HTTP: POST
  • URL: /Process/UpdateInputErrorStatus

Cross-layer call chain - ProcessController.UpdateInputErrorStatus → 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"]
    ProcessController_UpdateInputErrorStatus["ProcessController.UpdateInputErrorStatus"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_UpdateInputErrorStatus --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: UpdateInputErrorStatus processes POST requests to update error status and returns the operation result as JSON. - Invoke ProcessMapModel.UpdateInputErrorStatus with parameters - Return JsonResult with update outcome

Error Flows - Summary: Validate 'module' and 'Status' inputs to prevent exceptions during conversion. - Missing 'module' or 'Status' values, Invalid integer conversion of 'module' or 'Status', Lack of input validation causing exceptions

Security Issues - Summary: Direct integer conversion of user input risks SQL injection and data tampering. - Lack of input validation before integer conversion, Risk of SQL injection, Risk of data tampering

Maintainability Issues - Summary: Replace magic strings with constants to improve code clarity and maintainability. - Use constants instead of magic strings for form data keys

Test Case Ideas - Summary: Verify UpdateInputErrorStatus updates error status correctly for POST requests across projects. - Invoke method on HTTP POST requests - Update error status with valid 'module' and 'Status' inputs - Update correct project data for different project IDs

Dependencies & Called Services - Summary: Uses IProcessModel conversion for updating input error status. - IProcessModel conversion

ProjectJSONReading

Summary: The method validates the file extension and returns a response based on JSON read success.

ActionResult ProcessController.ProjectJSONReading(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/ProjectJSONReading
Detailed Analysis

Key Flows - Summary: The method validates the file extension and returns a response based on JSON read success. - Check ReadUploadedJSON success status - Validate '.json' file extension

Error Flows - Summary: Validate file extension and JSON content - return JSON error responses on failure. - Return JSON error if JSON content processing fails - Set and return error message for invalid JSON content - Potential unhandled error cases due to incomplete code - Validate '.json' file extension and reject invalid files

Security Issues - Summary: Validate file content beyond extension to ensure security. - File validation relies only on '.json' extension, Lack of content inspection risks security

Performance Issues - Summary: Loading entire files and using LINQ Any() on large collections degrade performance. - Loading entire uploaded file into memory - Using LINQ Any() with lambda on large AcceptTypes collection

Maintainability Issues - Summary: Improve code clarity and maintainability by fixing naming, constants, content types, and error handling. - Typo in variable name 'binD' reduces clarity, Use constants instead of magic strings like '.json' and 'application/json', Rename 'IsSuccess' to a more descriptive variable name, Incomplete or truncated code hinders understanding and maintenance, Use 'application/json' content type for JSON responses instead of 'text/plain', Replace hardcoded error messages with localizable and configurable messages

UX Impact Notes - redirects - File upload restrictions on extensions affecting workflow, JSON responses with incorrect content type causing client issues, Unclear error messages degrading user experience - Redirects altering user flow

Test Case Ideas - Summary: Validate JSON file processing - Returned JSON objects content type and property accuracy

Dependencies & Called Services - Summary: Read and process JSON data using file, encoding, and string utilities. - BinaryReader for file reading, Encoding for text decoding, Path for file path handling, String for string manipulation - Process for managing processes

ReadUploadedJSON

Summary: The method decodes JSON, processes nodes and edges, validates the process map, handles errors, saves data, and optionally returns Visio errors without saving.

int? ProcessController.ReadUploadedJSON(string ReData, int ProjID, bool CheckVisioValidation)

Routing

  • URL: /Process/ReadUploadedJSON

Cross-layer call chain - ProcessController.ReadUploadedJSON → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars - ProcessController.ReadUploadedJSON → Andromeda.Validation.ProcessMapValidation.Validate - ProcessController.ReadUploadedJSON → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone - ProcessController.ReadUploadedJSON → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    ProcessController_ReadUploadedJSON["ProcessController.ReadUploadedJSON"]
    ProcessController_ReadUploadedJSON --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ReadUploadedJSON --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ReadUploadedJSON --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
    ProcessController_ReadUploadedJSON --> Andromeda_Validation_ProcessMapValidation_Validate
Detailed Analysis

Key Flows - validates the process map - handles errors - and optionally returns Visio errors without saving. - Create swimlanes and update edges - Generate XML and validate process map - Return Visio error count - Return Visio errors JSON if validation mode enabled without saving - Handle errors and save objectives - Process nodes into shapes and edges

Error Flows - Summary: Handle invalid JSON and null references to prevent failures and exceptions. - Lack of explicit handling for invalid or undecodable JSON, Null reference exceptions from uninitialized objects or collections, Unexpected behavior from incomplete or malformed JSON structures

Security Issues - Summary: Lack of explicit access control risks unauthorized database modifications. - Missing explicit access control checks - Use of riskmodel and Registry.LoggedInUser without validation

Performance Issues - Summary: Inefficient JSON decoding, repeated collection iterations, string operations, and DB calls degrade performance. - Database calls within loops causing slowdowns on large datasets

Maintainability Issues - Summary: The method suffers from unclear code, poor naming, magic values, and tight coupling. - Self-assignments and unused variables indicating code smells

UX Impact Notes - Summary: Returning unclear JSON errors degrades user experience and causes confusion. - Unclear JSON error messages when CheckVisioValidation is true

Test Case Ideas - Summary: Validate JSON processing - ProcessMapValidation and Visio error handling with CreateOrUpdateErrorsVisio - Behavior with CheckVisioValidation true and false - Correct Visio error count returned after processing

Dependencies & Called Services - Summary: Uses data conversion, collection handling, model interfaces, and validation utilities. - Data conversion utilities, EdgeInfo data structure, Enumerable collections, Control, Process, and Risk model interfaces, LINQ extension methods, List collections, ShapeInfo data structure, String manipulation, TimeSpan handling - Process handling, Process map validation

UpdateNVAandActivityProperties

Summary: Consolidate and update activity properties by resolving correct ActivityIds, then save NPA activities for each shape.

void ProcessController.UpdateNVAandActivityProperties(List<ActivityProperty> activityProperties, List<ShapeInfo> Shapes)

Routing

  • URL: /Process/UpdateNVAandActivityProperties
Detailed Analysis

Key Flows - Summary: Consolidate and update activity properties by resolving correct ActivityIds - Group activityProperties by normalized ActivityId, Name, and Value, Resolve ActivityId using Shapes collection or fallback to original, Save NPA activities by iterating over Shapes and invoking actorModel.SaveNPAActivity - Update ProcessMapModel with resolved ActivityId and property details

Performance Issues - Summary: Optimize string operations, reduce repeated queries, and minimize save calls in loops. - Expensive Trim and ToLower calls during grouping on large collections, Multiple FirstOrDefault and First calls causing repeated iterations or queries, Repeated SaveNPAActivity calls inside loops over large Shapes collection

Maintainability Issues - Summary: The method's public void signature and complex logic reduce maintainability and clarity. - Confusing public void method marked as NonAction, Anonymous types in GroupBy reduce readability, Complex conditional statements for ActivityId hinder understanding, Incomplete and unclear code snippets lower readability, Commented out code decreases code clarity

Test Case Ideas - and activity property assignment without modifying inputs. - Handle empty Shapes collection without errors - Set activity property when ActivityId is absent in Shapes

Dependencies & Called Services - Summary: Uses collections, actor and process models, and string operations. - Enumerable for collections, IActorModel interface, IProcessModel interface, String operations

ShowCrunchedHistory

Summary: ShowCrunchedHistory returns JSON immediately if project ID is zero, otherwise calls downstream model.

JsonResult ProcessController.ShowCrunchedHistory()

Routing

  • HTTP: GET
  • URL: /Process/ShowCrunchedHistory

Cross-layer call chain - ProcessController.ShowCrunchedHistory → Andromeda.Core.DataManager.ExecuteScalar2

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_ExecuteScalar2["Andromeda.Core.DataManager.ExecuteScalar2"]
    ProcessController_ShowCrunchedHistory["ProcessController.ShowCrunchedHistory"]
    ProcessController_ShowCrunchedHistory --> Andromeda_Core_DataManager_ExecuteScalar2
Detailed Analysis

Key Flows - Summary: ShowCrunchedHistory returns JSON immediately if project ID is zero - Immediate JSON response for zero project ID, Call downstream model method for non-zero project ID

Error Flows - Summary: Handle null CrunchedHistory by returning no data or default JSON response. - Return empty or default JSON response

UX Impact Notes - Summary: Returns JSON to update UI and provides immediate feedback on invalid project ID. - Return JSON for UI update with crunched history

Test Case Ideas - Summary: Verify ShowCrunchedHistory returns correct JSON responses based on project ID and request type. - Return valid JsonResult for GET requests - Return immediate JSON response when project ID is zero

Dependencies & Called Services - Summary: Uses IProcessModel service for processing history data. - IProcessModel service dependency

SemanticCheckBetweenLists

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

JsonResult ProcessController.SemanticCheckBetweenLists()

Routing

  • HTTP: POST
  • URL: /Process/SemanticCheckBetweenLists

Cross-layer call chain - ProcessController.SemanticCheckBetweenLists → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    ProcessController_SemanticCheckBetweenLists["ProcessController.SemanticCheckBetweenLists"]
    ProcessController_SemanticCheckBetweenLists --> Andromeda_Core_LoggingManager_Error
Detailed Analysis

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

Error Flows - Summary: Handle API errors and JSON deserialization failures with logged errors and failure responses. - Log error and return failure JSON on non-OK API status - Return failure JSON on JSON deserialization failure or empty data

Security Issues - Summary: Fix JSON deserialization, secure API key storage, and properly dispose HttpClient. - JSON deserialization vulnerability from unvalidated input

Performance Issues - Summary: Improve asynchronous handling and optimize data retrieval and collection iteration for better performance. - Request.Form data retrieval causes performance overhead, Improper awaiting of PostAsync leads to deadlocks and performance issues, Calling .Result on async operations causes deadlocks, Unoptimized foreach loops over large collections degrade performance

Maintainability Issues - Summary: Magic strings, incomplete code, unclear variables, and direct magic values reduce maintainability. - Use of magic strings reduces code clarity, Incomplete and syntactically incorrect code segments, Anonymous object creation reduces code clarity, Undefined and incomplete variable declarations, Direct use of magic values without constants

UX Impact Notes - Summary: Returning JSON responses and early returns provide immediate user feedback. - Early returns provide immediate feedback on empty or failed inputs

Test Case Ideas - error logging - Validate handling of valid JSON input with non-empty properties - Validate similarity flags and matched words output - Verify early return on empty form data - Verify early return on empty OtherListProperties - Confirm error logging on failed responses

Dependencies & Called Services - Summary: Uses List and LoggingManager for managing and logging service calls. - List usage for service management - LoggingManager for logging service calls

RearrangeProcessMap

Summary: Process JSON data to update swim lanes and shapes, adjust specific shape properties, and update project XML.

JsonResult ProcessController.RearrangeProcessMap()

Routing

  • HTTP: POST
  • URL: /Process/RearrangeProcessMap
Detailed Analysis

Key Flows - Summary: Process JSON data to update swim lanes and shapes - and update project XML. - Convert IDs and update existing swim lane actors - Convert IDs and update shape properties including dimensions and positions - Set fixed height and width for 'Decision' type shapes - Update project XML with modified swim lanes and shapes

Error Flows - Summary: Handle exceptions from invalid JSON - Null reference exceptions from missing objects during updates

Security Issues - Summary: Direct JSON deserialization of unvalidated request data risks security breaches. - Unvalidated JSON deserialization

Performance Issues - Summary: Optimize repeated method calls and avoid redundant processing in loops to improve performance. - Repeated UpdateProjectXml calls inside loops cause performance degradation

Maintainability Issues - Summary: Fix undefined variables, typos, magic values, unclear names, and tight method coupling. - Tight coupling with UpdateProjectXml method and data structures

Test Case Ideas - property settings - and XML updates. - Processing empty SwimLaneList and ShapesList - UpdateProjectXml invocation with correct parameters - Correct setting of shape properties including height and width

Dependencies & Called Services - Summary: Uses Convert and Enumerable to process IProcessModel and String data. - Convert utility, Enumerable operations, IProcessModel interface, String data handling

GetProjDataForGenAI

Summary: Retrieve project ID, fetch related activities and actors with locations, then aggregate additional project data into a comprehensive response.

JsonResult ProcessController.GetProjDataForGenAI(string Screen)

Routing

  • HTTP: GET
  • URL: /Process/GetProjDataForGenAI

Cross-layer call chain - ProcessController.GetProjDataForGenAI → Andromeda.Core.Entities.Actor.WorkStartTimeUTC - ProcessController.GetProjDataForGenAI → Andromeda.Core.Entities.Actor.WorkEndTimeUTC - ProcessController.GetProjDataForGenAI → Andromeda.Core.Entities.Activity.ReworkEffort - ProcessController.GetProjDataForGenAI → Andromeda.Core.Entities.Activity.Effort - ProcessController.GetProjDataForGenAI → Andromeda.Core.Extensions.LinqExtensions.GetTransfeModesName - ProcessController.GetProjDataForGenAI → Andromeda.Core.Extensions.LinqExtensions.getSkillScore - ProcessController.GetProjDataForGenAI → Andromeda.Core.Entities.Activity.GetNVAType - ProcessController.GetProjDataForGenAI → Andromeda.Core.Entities.Activity.getAutomationType

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_Effort["Andromeda.Core.Entities.Activity.Effort"]
    Andromeda_Core_Entities_Activity_GetNVAType["Andromeda.Core.Entities.Activity.GetNVAType"]
    Andromeda_Core_Entities_Activity_ReworkEffort["Andromeda.Core.Entities.Activity.ReworkEffort"]
    Andromeda_Core_Entities_Activity_getAutomationType["Andromeda.Core.Entities.Activity.getAutomationType"]
    Andromeda_Core_Entities_Actor_WorkEndTimeUTC["Andromeda.Core.Entities.Actor.WorkEndTimeUTC"]
    Andromeda_Core_Entities_Actor_WorkStartTimeUTC["Andromeda.Core.Entities.Actor.WorkStartTimeUTC"]
    Andromeda_Core_Extensions_LinqExtensions_GetTransfeModesName["Andromeda.Core.Extensions.LinqExtensions.GetTransfeModesName"]
    Andromeda_Core_Extensions_LinqExtensions_getSkillScore["Andromeda.Core.Extensions.LinqExtensions.getSkillScore"]
    ProcessController_GetProjDataForGenAI["ProcessController.GetProjDataForGenAI"]
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_Effort
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_GetNVAType
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_ReworkEffort
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Activity_getAutomationType
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Actor_WorkEndTimeUTC
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Entities_Actor_WorkStartTimeUTC
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Extensions_LinqExtensions_GetTransfeModesName
    ProcessController_GetProjDataForGenAI --> Andromeda_Core_Extensions_LinqExtensions_getSkillScore
Detailed Analysis

Key Flows - Summary: Retrieve project ID, fetch related activities and actors with locations, then aggregate additional project data into a comprehensive response. - Fetch all project activities via actorModel.getActivities, Fetch all project actors with locations via actorModel.GetActorsWithLocation - Retrieve current project ID from Registry, Retrieve and combine activity properties, transfer modes, NPA activities, and product factors from controlModel and actorModel

Error Flows - Summary: Handle null reference and add explicit exception handling. - Null reference risk from Registry.CurrentProject being null, Lack of explicit exception handling

Performance Issues - Summary: Excessive memory use and multiple database calls degrade performance. - Use of ToList() on large datasets causes high memory usage

Maintainability Issues - Summary: Improve method naming and simplify complex LINQ for better maintainability. - Non-descriptive method name, Complex anonymous types and LINQ reduce readability

UX Impact Notes - Summary: Screen variable controls user flow and JSON data shapes project display. - Screen variable controls user flow, JSON data structure determines project information display

Test Case Ideas - Summary: Verify method returns correct data and constructs data object accurately. - Return correct data for valid project ID

Dependencies & Called Services - Summary: Uses data models, LINQ extensions, and standard types for processing project data. - Activity data model, Actor data model, DateTime type, Enumerable utilities, IActorModel interface, IControlModel interface, LinqExtensions utilities, String type

UpdateGenAIData

Summary: UpdateGenAIData processes POST requests by extracting data, updating GenAI data, and returning JSON responses.

JsonResult ProcessController.UpdateGenAIData()

Routing

  • HTTP: POST
  • URL: /Process/UpdateGenAIData
Detailed Analysis

Key Flows - Summary: UpdateGenAIData processes POST requests by extracting data - and returning JSON responses. - Delegate data processing to InsertUpdateGenAIData method - Return JSON response

Security Issues - Summary: Directly converting request form data to string risks SQL injection and data tampering. - Lack of input validation, No data sanitization, SQL injection vulnerability, Data tampering risk

Maintainability Issues - Summary: Tight coupling reduces flexibility and complicates modifications. - Tight coupling with ProcessMapModel class, Tight coupling with Registry class

Test Case Ideas - Summary: Verify UpdateGenAIData processes valid POST requests and stores data correctly. - Invoke UpdateGenAIData on HTTP POST request - Process valid form data and return JSON response - Validate InsertUpdateGenAIData data processing and storage

Dependencies & Called Services - Summary: UpdateGenAIData uses Convert and IProcessModel services. - Convert service, IProcessModel interface

GetGenAIData

Summary: Retrieve the current project ID and return valid JSON data as a JsonResult.

JsonResult ProcessController.GetGenAIData(string ScreenFrom)

Routing

  • HTTP: GET
  • URL: /Process/GetGenAIData

Cross-layer call chain - ProcessController.GetGenAIData → Andromeda.Core.DataManager.ExecuteScalar2

Call Chain Diagram

flowchart TD
    Andromeda_Core_DataManager_ExecuteScalar2["Andromeda.Core.DataManager.ExecuteScalar2"]
    ProcessController_GetGenAIData["ProcessController.GetGenAIData"]
    ProcessController_GetGenAIData --> Andromeda_Core_DataManager_ExecuteScalar2
Detailed Analysis

Key Flows - Summary: Retrieve the current project ID and return valid JSON data as a JsonResult. - Return valid JSON data as JsonResult

Error Flows - Summary: Return false JSON result if GetGenAIData returns null - Return JSON result with boolean false

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

Maintainability Issues - Summary: Improve naming clarity and complete code for better maintainability. - Unclear method name reduces code understandability, Non-descriptive variable name hinders readability, Incomplete or truncated code impairs comprehension

UX Impact Notes - Summary: Returning invalid or false JSON data disrupts user flows and error handling. - Returning false JSON affects error message display and validation - Returning unformatted or error-containing JSON harms user experience

Test Case Ideas - Summary: Test method behavior with empty, whitespace, false, and valid JSON data. - Condition returning JSON result with false - Method returns expected valid JSON data

Dependencies & Called Services - Summary: Uses IProcessModel service and String data type. - IProcessModel service dependency, String data type usage

DirectToProcessMapRejections

Summary: DirectToProcessMapRejections calls ProcessMapRejections without parameters.

ActionResult ProcessController.DirectToProcessMapRejections()

Routing

  • URL: /Process/DirectToProcessMapRejections
Detailed Analysis

Key Flows - Summary: DirectToProcessMapRejections calls ProcessMapRejections without parameters. - Call ProcessMapRejections method without parameters

Error Flows - Summary: The method lacks explicit error handling and exception management. - Absence of error handling, No exception management

Maintainability Issues - Summary: The method is incomplete and uses its name as a string, risking inconsistencies. - Using method name as string for view return risks inconsistencies on renaming

UX Impact Notes - Summary: Empty method risks errors; users redirect to ProcessMapRejections view. - User redirects to ProcessMapRejections view after method execution

Test Case Ideas - Summary: Verify method calls ProcessMapRejections and returns correct ActionResult and view. - Return valid ActionResult - Return ProcessMapRejections view

Dependencies & Called Services - Summary: DirectToProcessMapRejections depends on the Process service. - Dependency on Process service

ProjectSOPImageReading

Summary: Uploads a valid file, saves it, sends image data to a PDF API, and returns validated JSON results.

JsonResult ProcessController.ProjectSOPImageReading(HttpPostedFileBase file)

Routing

  • HTTP: POST
  • URL: /Process/ProjectSOPImageReading

Cross-layer call chain - ProcessController.ProjectSOPImageReading → Andromeda.Core.LoggingManager.Info - ProcessController.ProjectSOPImageReading → Andromeda.Core.LoggingManager.Error

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Error["Andromeda.Core.LoggingManager.Error"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    ProcessController_ProjectSOPImageReading["ProcessController.ProjectSOPImageReading"]
    ProcessController_ProjectSOPImageReading --> Andromeda_Core_LoggingManager_Error
    ProcessController_ProjectSOPImageReading --> Andromeda_Core_LoggingManager_Info
Detailed Analysis

Key Flows - sends image data to a PDF API - and returns validated JSON results. - Send POST request to external PDF processing API - Receive and validate API response - Return JSON result

Error Flows - Summary: Handle null files - and catch all exceptions with logging and JSON responses. - Log errors and return JSON on API call failures or non-OK status - Return JSON with FileNull true for null or empty files - Catch all exceptions broadly - log info messages

Security Issues - Summary: The method exposes sensitive data and lacks input validation, risking security breaches. - Store sensitive configuration securely, not in plain text - Validate and sanitize configuration settings before use - Validate file type and content before API POST request

Performance Issues - Summary: Avoid inefficient HttpClient usage, blocking calls, excessive memory use, and repeated config access. - Using ConfigurationManager.AppSettings on each request causes performance issues

Maintainability Issues - Summary: Code uses unclear identifiers, hardcoded strings, and incomplete snippets, harming maintainability. - Use of magic strings reduces code clarity, Undefined or unclear object names reduce readability, Hardcoded API URLs lack encoding and validation, Incomplete and commented-out code increases technical debt

UX Impact Notes - Summary: The method's file handling and blocking calls degrade user experience and responsiveness. - Info-level logging may delay or expose user interactions

Test Case Ideas - Summary: Verify file handling, form value processing, async API wait, and resource disposal. - File upload with valid types and sizes, Directory creation if target folder missing, File saving with diverse names and extensions including special characters, Form value 'IMGSOPChkdType' processing for 'ImgFile' and others, Proper wait for asynchronous API responses, HttpClient disposal to prevent resource leaks

Dependencies & Called Services - Summary: Uses system utilities, file handling, logging, asynchronous tasks, and model interfaces. - Directory operations, Enumerable collections, HTTP file handling, Wizard model interface, Integer data type, File path manipulation, Stream handling, String operations, Asynchronous tasks, Time interval management - Logging management - Process control

FetchPDFStatus

Summary: Send a POST request with project details, handle the HTTP response synchronously, and return JSON based on status.

JsonResult ProcessController.FetchPDFStatus()

Routing

  • HTTP: GET
  • URL: /Process/FetchPDFStatus

Cross-layer call chain - ProcessController.FetchPDFStatus → Andromeda.Core.LoggingManager.Info

Call Chain Diagram

flowchart TD
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    ProcessController_FetchPDFStatus["ProcessController.FetchPDFStatus"]
    ProcessController_FetchPDFStatus --> Andromeda_Core_LoggingManager_Info
Detailed Analysis

Key Flows - Summary: Send a POST request with project details - handle the HTTP response synchronously - and return JSON based on status. - Log HTTP status code - Send POST request with project ID and instance name - Return JSON content if status is OK - Return JSON false with AllowGet if status is not OK

Error Flows - Summary: Return false JSON response on non-OK HTTP status. - Check HTTP response status - Return JSON false if status not OK

Security Issues - Summary: Empty X-API-Key header risks authentication failure; HttpClient not disposed causes resource leaks. - Empty X-API-Key header causes authentication and authorization failures, HttpClient instance not disposed properly leads to resource leaks

Performance Issues - Summary: Optimize HTTP client usage and avoid blocking calls to improve performance. - HttpClient instance created on every call causing socket exhaustion

Maintainability Issues - Summary: Improve configurability, resource management, code clarity, and use constants for strings. - Hardcoded URL and instance name reduce configurability, HttpClient instance not disposed causing resource leaks, Incomplete conditional statement reduces code clarity, Use constants or enums instead of magic string 'Json'

UX Impact Notes - Summary: Returning boolean false in JSON responses disrupts error and validation displays. - Boolean false JSON response, Disrupted error message display, Impaired validation result handling

Test Case Ideas - Summary: Verify FetchPDFStatus sends correct POST - handles responses - logs status - Handle various HTTP response status codes including OK and non-OK - Handle empty X-API-Key header - Log correct HTTP status code - Return JSON content on OK response - Return JSON false with AllowGet on non-OK response

Dependencies & Called Services - Summary: FetchPDFStatus uses logging - LoggingManager for logging - Task for asynchronous operations, TimeSpan for time intervals

ProcessPDFJSON

Summary: ProcessPDFJSON handles PDF data extraction and JSON conversion.

JsonResult ProcessController.ProcessPDFJSON()

Routing

  • HTTP: POST
  • URL: /Process/ProcessPDFJSON

Cross-layer call chain - ProcessController.ProcessPDFJSON → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    ProcessController_ProcessPDFJSON["ProcessController.ProcessPDFJSON"]
    ProcessController_ProcessPDFJSON --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
Detailed Analysis

Key Flows - Summary: ProcessPDFJSON handles PDF data extraction and JSON conversion. - Extract data from PDF, Convert extracted data to JSON format

Error Flows - Summary: Handle invalid JSON input securely and ensure code completeness to prevent errors. - Return JSON response with 'jsonArrayNull' true for invalid or empty JSON input - Validate JSON input before deserialization to prevent security vulnerabilities

Security Issues - Summary: ProcessPDFJSON risks JSON deserialization attacks from unvalidated input. - JSON deserialization vulnerability, Lack of input validation before JSON decoding

Performance Issues - Summary: Optimize data processing and string comparisons for better performance. - Inefficient LINQ usage inside loops for large datasets

Maintainability Issues - Summary: Rename method for clarity and replace magic values with constants to improve maintainability. - Misleading method name 'ProcessPDFJSON' not reflecting actual JSON processing, Use of magic strings and numbers without constants or enums, Complex nested conditions in LINQ queries reducing readability, Tight coupling between SwimLaneList and ShapeList collections, Unclear variable definitions such as 'Team' complicating code understanding

UX Impact Notes - Summary: The method's JSON responses and redirect URLs affect client handling and user navigation. - Redirect URL in JSON triggers client-side redirection - Response varies by request AcceptTypes

Test Case Ideas - location updates - Assign correct node_type for activities including Start and End - Call CreateOrUpdateErrorsVisio with correct parameters - Return correct redirect URL in JSON response - Handle empty JSON input - Process valid JSON with activities and arrows

Dependencies & Called Services - Summary: ProcessPDFJSON uses data conversion, collection handling, and string processing services. - Data conversion, Enumerable collections, LINQ extensions, List handling, String processing

ValidateVisioFromSOP

Summary: Transform JSON into diagram objects, validate them, adjust positions, handle errors, and save results.

List<VisioError> ProcessController.ValidateVisioFromSOP(string resultJSON)

Routing

  • URL: /Process/ValidateVisioFromSOP

Cross-layer call chain - ProcessController.ValidateVisioFromSOP → Andromeda.Validation.ProcessMapValidation.Validate - ProcessController.ValidateVisioFromSOP → Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone - ProcessController.ValidateVisioFromSOP → Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone["Andromeda.Core.Entities.EdgeInfo.EdgeEntityClone"]
    Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone["Andromeda.Core.Entities.ShapeInfo.ShapeEntityClone"]
    Andromeda_Validation_ProcessMapValidation_Validate["Andromeda.Validation.ProcessMapValidation.Validate"]
    ProcessController_ValidateVisioFromSOP["ProcessController.ValidateVisioFromSOP"]
    ProcessController_ValidateVisioFromSOP --> Andromeda_Core_Entities_EdgeInfo_EdgeEntityClone
    ProcessController_ValidateVisioFromSOP --> Andromeda_Core_Entities_ShapeInfo_ShapeEntityClone
    ProcessController_ValidateVisioFromSOP --> Andromeda_Validation_ProcessMapValidation_Validate
Detailed Analysis

Key Flows - validate them - handle errors - Assign swimlane midpoints and widths based on maximum values - Return processed swimlanes and shapes - Handle validation errors via CreateOrUpdateErrorsVisio - Update shape positions and align with matching actor names - Validate transformed data with ProcessMapValidation.Validate

Error Flows - Summary: Record Visio errors if present and handle validation-based early exits. - Record or update errors using CreateOrUpdateErrorsVisio when ListVisioError contains errors - Implement early returns or breaks based on validation or matching conditions

Performance Issues - Summary: LINQ usage and large collection iterations degrade performance in ValidateVisioFromSOP. - LINQ methods inside loops cause performance degradation with large datasets

Maintainability Issues - Summary: Complex code with unclear variables and unexplained constants reduces maintainability. - High complexity from multiple transformations, loops, and conditionals, Use of unexplained magic numbers reduces code clarity, Non-descriptive variable names hinder readability, Incomplete or truncated code risks compilation errors and unexpected behavior

UX Impact Notes - Summary: Validation errors and layout adjustments directly affect Visio diagram clarity and user feedback. - Error handling via CreateOrUpdateErrorsVisio and eErrorsVisio

Test Case Ideas - Summary: Validate positional calculations - conditional logic - and return values. - Positional variable assignment and increment - Correctness of returned swimlane and shape collections

Dependencies & Called Services - Summary: Uses conversion, process modeling, validation, and data structures for Visio validation. - Data conversion utilities, Edge and shape information handling, Enumerable collections, String manipulation - Process modeling interfaces, Process and process map validation

GetActivityFromJson

Summary: Parse JSON array to create ActivityTemplate objects with mapped properties and successors, then return the list.

List<ActivityTemplate> ProcessController.GetActivityFromJson(string jsonData)

Routing

  • URL: /Process/GetActivityFromJson
Detailed Analysis

Key Flows - Summary: Parse JSON array to create ActivityTemplate objects with mapped properties and successors - then return the list. - Collect and return populated ActivityTemplate list

Error Flows - Summary: Handle JSON decoding and data type conversion errors to prevent runtime exceptions. - Missing exception handling for invalid JSON decoding, Missing exception handling for data type conversion failures

Performance Issues - Summary: Optimize conversions and memory usage to improve performance and prevent runtime errors. - Repeated Convert.ToString and Convert.ToDouble cause boxing and unboxing overhead, Excessive memory allocation when processing many successors, Incomplete code risks compilation errors affecting runtime

Maintainability Issues - Summary: The method uses deprecated JSON namespace and has poor code structure, reducing maintainability. - Use of deprecated System.Web.Helpers namespace for JSON decoding, Large method size and fragmented code structure

Test Case Ideas - Summary: Validate JSON parsing - object property assignment - conditional logic - Assign valid JSON properties to ActivityTemplate - Verify conditional logic with 'a.succe' true and false

Dependencies & Called Services - Summary: Convert ICollection to List for easier manipulation. - ICollection conversion, List creation

UpdateIsProjectStarted

Summary: UpdateIsProjectStarted handles a POST request to mark a project as started and confirms the update.

JsonResult ProcessController.UpdateIsProjectStarted()

Routing

  • HTTP: POST
  • URL: /Process/UpdateIsProjectStarted

Cross-layer call chain - ProcessController.UpdateIsProjectStarted → Andromeda.Core.DataManager.Execute - ProcessController.UpdateIsProjectStarted → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.DataManager.Execute → Andromeda.Core.LoggingManager.Debug - Andromeda.Core.DataManager.Execute → Andromeda.Core.Database.helper.SqlParameters - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

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"]
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProcessController_UpdateIsProjectStarted["ProcessController.UpdateIsProjectStarted"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_UpdateIsProjectStarted --> Andromeda_Core_DataManager_Execute
    ProcessController_UpdateIsProjectStarted --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: UpdateIsProjectStarted handles a POST request to mark a project as started and confirms the update. - Set IsProjectStarted to true - Save updated project to registry - Return JsonResult confirmation

UX Impact Notes - Summary: Update changes project status visible to the user. - Project status update visible to user

Test Case Ideas - Summary: Verify UpdateIsProjectStarted updates project status and returns valid JsonResult on POST request. - Invoke UpdateIsProjectStarted on HTTP POST request - Set IsProjectStarted to true - Return valid JsonResult after update

Dependencies & Called Services - Summary: UpdateIsProjectStarted uses IProcessModel and Registry services. - IProcessModel service usage, Registry service usage

UpdateStartActsVolume

Summary: UpdateStartActsVolume processes a POST request to update activity volumes from JSON data and returns a JSON result.

JsonResult ProcessController.UpdateStartActsVolume()

Routing

  • HTTP: POST
  • URL: /Process/UpdateStartActsVolume
Detailed Analysis

Key Flows - Summary: UpdateStartActsVolume processes a POST request to update activity volumes from JSON data and returns a JSON result. - Return JsonResult with update outcome - Update activity volumes via control model

Error Flows - Summary: Handle JSON deserialization errors to prevent update failures. - Failed volume update due to invalid JSON

Security Issues - Summary: Direct JSON deserialization of request data risks injection attacks. - Direct deserialization of request form data, Lack of explicit input validation

Performance Issues - Summary: The method has no identified performance issues. - No performance issues

Maintainability Issues - Summary: The method's tight coupling reduces flexibility and testability. - Tight coupling with System.Web.Helpers.Json for JSON deserialization, Dependence on controlModel for updating activity volumes

UX Impact Notes - Summary: Returns JSON responses requiring client-side handling. - JsonResult return type

Test Case Ideas - Summary: Verify UpdateStartActsVolume handles HTTP POST with valid JSON input correctly. - Invoke UpdateStartActsVolume on HTTP POST - Process valid JSON activity volume updates

Dependencies & Called Services - Summary: UpdateStartActsVolume depends on IControlModel service. - Dependency on IControlModel service

ProceedFinalJSON

Summary: Extract and classify activities and actors, generate success paths, and asynchronously send enriched JSON data to an external API.

JsonResult ProcessController.ProceedFinalJSON()

Routing

  • HTTP: GET
  • URL: /Process/ProceedFinalJSON

Cross-layer call chain - ProcessController.ProceedFinalJSON → Andromeda.Core.Entities.Actor.GetLocation - ProcessController.ProceedFinalJSON → Andromeda.Core.LoggingManager.Info - 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"]
    Andromeda_Core_LoggingManager_Info["Andromeda.Core.LoggingManager.Info"]
    ProcessController_ProceedFinalJSON["ProcessController.ProceedFinalJSON"]
    Andromeda_Core_Entities_Actor_GetLocation --> Andromeda_Core_DataManager_GetData
    ProcessController_ProceedFinalJSON --> Andromeda_Core_Entities_Actor_GetLocation
    ProcessController_ProceedFinalJSON --> Andromeda_Core_LoggingManager_Info
Detailed Analysis

Key Flows - and asynchronously send enriched JSON data to an external API. - Create activity templates with actor names and activity types - Send JSON payload asynchronously to external API for enrichment

Error Flows - Summary: Handle null references and fix syntax errors to prevent runtime and compilation failures. - Null reference exceptions from missing arrow predecessor or successor objects, Runtime errors and compilation failures from incomplete or incorrect code syntax

Security Issues - Summary: Storing API key in plain text risks exposure if configuration lacks proper security. - API key stored in plain text, API key added to request headers, Risk of key exposure from insecure configuration

Performance Issues - Summary: Optimize database calls, collection iterations, memory usage, and HTTP timeout for better performance. - Uncached multiple database calls causing performance impact, Inefficient LINQ Any and First causing multiple collection iterations, Unnecessary ToList() calls inside loops causing memory overhead, Loops over large collections without optimization degrading performance, HttpClient 10-minute timeout risking slow API call delays

Maintainability Issues - Summary: Replace magic strings and fix typos to improve code clarity and maintainability. - Replace magic strings with constants or enums, Correct typographical errors in variable names, Avoid unnecessary use of Convert.ToString; use ToString() instead

UX Impact Notes - Summary: Ignoring asynchronous API response degrades user experience and disrupts UI updates. - Potential UI update failures

Test Case Ideas - Summary: Validate activity identification - and request flag updates. - Handle empty activities and arrows gracefully - Assign correct activity types based on start/end status - Populate ActorName from Actors collection or set empty - Construct and send JSON payload with correct headers - Update request flag correctly via wizard model

Dependencies & Called Services - Summary: Uses collections, interfaces, logging, and basic data types for final JSON processing. - Actor model usage, Data conversion utilities, Enumerable collections, IActorModel interface, ICollection interface, IFinalPlanModel interface, IWizardModel interface, Integer data type, List collection, String data type, TimeSpan data type - LoggingManager for logging

InsertFetchedData

Summary: InsertFetchedData handles an HTTP POST request to update project data using form input.

JsonResult ProcessController.InsertFetchedData()

Routing

  • HTTP: POST
  • URL: /Process/InsertFetchedData
Detailed Analysis

Key Flows - Summary: InsertFetchedData handles an HTTP POST request to update project data using form input. - Call WizardModel.UpdateFinalJSONData with project ID and form data

UX Impact Notes - Summary: Return JsonResult influences user flow by triggering redirects or messages. - JsonResult return - Trigger redirects

Test Case Ideas - and correct UpdateFinalJSONData call. - Return JsonResult on valid form data - Call WizardModel.UpdateFinalJSONData with correct project ID and form data

Dependencies & Called Services - Summary: Uses IWizardModel to manage wizard-related data during insertion. - IWizardModel dependency for wizard data management

UpdateVolumeFormula

Summary: UpdateVolumeFormula updates the volume formula when both ID and VolumeFormula are provided and returns a JSON response.

JsonResult ProcessController.UpdateVolumeFormula()

Routing

  • HTTP: POST
  • URL: /Process/UpdateVolumeFormula

Cross-layer call chain - ProcessController.UpdateVolumeFormula → 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"]
    ProcessController_UpdateVolumeFormula["ProcessController.UpdateVolumeFormula"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_UpdateVolumeFormula --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: UpdateVolumeFormula updates the volume formula when both ID and VolumeFormula are provided and returns a JSON response. - Return JSON response with update result - Update volume formula via IProcessModel.updatevolumeformula - Validate presence of ID and VolumeFormula in request

Error Flows - Summary: Handle missing 'ID' or 'VolumeFormula' by skipping update and returning JSON response. - No update operation performed - Return JSON response despite missing data

Security Issues - Summary: Direct use of Request.Form data risks SQL injection and data tampering. - Unvalidated Request.Form data

Maintainability Issues - Summary: The method uses unexplained magic strings and has a misleading name. - Misleading method name 'UpdateVolumeFormula' for JSON return

UX Impact Notes - Summary: Client-side handling of JSON response directly affects user experience. - Client-side JSON response handling, User experience impact

Test Case Ideas - Summary: Verify UpdateVolumeFormula handles input validation and returns correct JSON responses. - Handle missing ID in request - Handle missing VolumeFormula in request - Process requests with both ID and VolumeFormula - Return valid JSON object - Return expected JSON for various inputs

Dependencies & Called Services - Summary: UpdateVolumeFormula uses Convert and IProcessModel services. - Convert service, IProcessModel interface

UpdateFinalJSONto3Cubed

Summary: Load and update activities, arrows, and infrastructure; process forms, rules, objectives, risks; save updates and return results.

JsonResult ProcessController.UpdateFinalJSONto3Cubed()

Routing

  • HTTP: POST
  • URL: /Process/UpdateFinalJSONto3Cubed

Cross-layer call chain - ProcessController.UpdateFinalJSONto3Cubed → Andromeda.Core.Services.Registry.setProjectDetails - Andromeda.Core.Services.Registry.setProjectDetails → Andromeda.Core.Utility.Encrypt.DecryptString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_Registry_setProjectDetails["Andromeda.Core.Services.Registry.setProjectDetails"]
    Andromeda_Core_Utility_Encrypt_DecryptString["Andromeda.Core.Utility.Encrypt.DecryptString"]
    ProcessController_UpdateFinalJSONto3Cubed["ProcessController.UpdateFinalJSONto3Cubed"]
    Andromeda_Core_Services_Registry_setProjectDetails --> Andromeda_Core_Utility_Encrypt_DecryptString
    ProcessController_UpdateFinalJSONto3Cubed --> Andromeda_Core_Services_Registry_setProjectDetails
Detailed Analysis

Key Flows - Summary: Load and update activities - risks; save updates and return results. - Save wait types and finalize updates with JSON result - Load activities, actors, arrows, transfer modes, wait types - Process forms and business rules for activity and control updates - Update activity properties from JSON nodes - Update location infrastructure with office and salary details

Error Flows - Summary: Prevent null reference errors and skip processing invalid or inactive data during updates. - Handle null references for CurOfc and CurActivity - Return false if ProcessStatus is null or completed - Skip updates if actor or CurActor is null or inactive

Security Issues - Summary: Unvalidated inputs risk SQL injection and data corruption during database operations. - Unvalidated tms.id input - Unvalidated control type ID inputs

Performance Issues - Summary: Optimize database calls and LINQ usage to prevent performance degradation and memory issues. - Multiple database/model calls in one method, LINQ methods inside loops causing slowdowns, Repeated string conversions inside loops, Contains method in nested loops causing O(n^2) complexity, ToList() calls on large collections causing memory issues

Maintainability Issues - Summary: The method violates naming conventions, mixes concerns, uses unclear names, and lacks documentation. - Non-standard method naming, Multiple unrelated tasks in one method, Use of magic strings and numbers, Non-descriptive variable names, Incomplete and truncated code snippets, Tight coupling with models and dependencies, Anonymous types and complex LINQ without comments, Ternary operators and inline conditions reducing readability, Inconsistent or unclear collection and variable names, Undocumented custom or unclear methods

UX Impact Notes - Summary: Incorrect data handling and errors degrade user experience and disrupt flow. - Returning false JSON disrupts user flow

Test Case Ideas - processing logic - Handle incomplete or malformed input data - Process forms and business rules with empty and populated collections - Return JsonResult - and update products with various names and IDs - Save wait types and validate final JSON correctness - Ensure performance with large datasets for activities

Dependencies & Called Services - Summary: Use collections and interfaces for data conversion and model management. - Dictionary usage, Double type handling, Enumerable collections, IActorModel interface, IControlModel interface, IFinalPlanModel interface, IInfraModel interface, IProcessModel interface, IRiskModel interface, IWizardModel interface, List collections, Registry access, String manipulation, TimeSpan handling

UpdateAHTBetweenRange

Summary: The method decodes range data, updates activities with AHT outside limits, and bulk persists changes.

JsonResult ProcessController.UpdateAHTBetweenRange()

Routing

  • HTTP: POST
  • URL: /Process/UpdateAHTBetweenRange
Detailed Analysis

Key Flows - updates activities with AHT outside limits - Collect updated activities - Bulk update activities with UpdateBulkAHT - Update AHT if outside limits

Error Flows - Summary: Handle JSON deserialization - Malformed or incomplete conditional statements causing compilation or logic errors

Security Issues - Summary: The method risks JSON deserialization attacks from untrusted input without validation. - JSON deserialization vulnerability from System.Web.Helpers.Json.Decode on untrusted Request.Form input, Lack of input validation and sanitization for decoded range data

Performance Issues - Summary: Optimize JSON decoding and numeric conversions to improve large dataset processing. - Inefficient JSON decoding for large inputs, Repeated double conversions inside loops, Unoptimized looping over large collections

Maintainability Issues - and extracting repeated logic. - Repeated AHT calculation logic requires extraction into a separate method

UX Impact Notes - Summary: No visible user experience impact from backend data processing. - Returns JsonResult

Test Case Ideas - AHT update logic - bulk update calls - Handle empty and non-empty activities collections - Add activities with updated AHT to bulk update collection - Call UpdateBulkAHT only when activities exist to update - Validate AHT update logic for values below

Dependencies & Called Services - Summary: Uses collections and time types to process and convert data models. - Enumerable operations, IProcessModel interface, List collection, TimeSpan type conversion

DownloadErrorVisio

Summary: DownloadErrorVisio retrieves project data, parses XML to extract diagram info, generates a VSDX file, and returns it if available.

ActionResult ProcessController.DownloadErrorVisio()

Routing

  • HTTP: GET
  • URL: /Process/DownloadErrorVisio

Cross-layer call chain - ProcessController.DownloadErrorVisio → Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX - Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX → Andromeda.Core.Utility.Compress.CreateZip

Call Chain Diagram

flowchart TD
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX["Andromeda.Core.Services.VSDX.VSDXGenerate.ExportVSDX"]
    Andromeda_Core_Utility_Compress_CreateZip["Andromeda.Core.Utility.Compress.CreateZip"]
    ProcessController_DownloadErrorVisio["ProcessController.DownloadErrorVisio"]
    Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX --> Andromeda_Core_Utility_Compress_CreateZip
    ProcessController_DownloadErrorVisio --> Andromeda_Core_Services_VSDX_VSDXGenerate_ExportVSDX
Detailed Analysis

Key Flows - and returns it if available. - Check error Visio file existence; return 404 if missing - Check generated file existence and return with correct MIME type - Load XML document and initialize SwimlaneInfo, ShapeInfo, EdgeInfo lists - Convert project ID to ActorId and assign to objects - Assign ActorIds and query grouped shapes

Error Flows - Summary: Handle missing files and invalid conditions with HttpNotFoundResult and prevent null reference exceptions. - Return HttpNotFoundResult if initial error Visio file is missing - Return HttpNotFoundResult if variable 'th' condition is met - Return HttpNotFoundResult if generated temporary file is missing - Prevent null reference exceptions by adding null checks during XML parsing

Security Issues - Summary: DownloadErrorVisio risks security flaws from unvalidated config access and incomplete code. - Unvalidated access to configuration settings

Performance Issues - Summary: Parsing large XML files causes high memory use and inefficient data processing. - High memory consumption loading large XML files, Inefficient repeated Convert.ToInt32 and Convert.ToDecimal calls during XML parsing, Memory overhead from ToList() in grouping operations, Performance and correctness risks using ToLower() for case-insensitive grouping, Unclear loop termination causing potential performance degradation

Maintainability Issues - Summary: The method uses unclear naming, magic strings, incomplete code, and error-prone string concatenation. - File path construction via string concatenation risks errors on config or ID changes, Magic strings like 'SwimLane', 'Shape', 'Arrow', '01' reduce readability and maintainability, Incomplete and syntactically incorrect code fragments hinder understanding and maintenance, Similar variable names 'ac' and 'Ac' cause confusion, Undocumented use of magic methods (Trim, ToLower) obscures intent, Partial code lines and incomplete method calls cause compilation errors

UX Impact Notes - Summary: Users encounter errors when requested Visio files are missing or XML parsing fails. - 404 error for missing Visio or generated files, XML parsing errors degrade application functionality and user experience, Unexpected errors if initial file is absent

Test Case Ideas - grouping logic - Return HttpNotFoundResult on specific condition and continue execution otherwise - Return file with correct MIME type when file exists - Path traversal vulnerability checks with malicious file paths

Dependencies & Called Services - Summary: Uses file handling, XML processing, data conversion, and Visio generation services. - File handling, XML processing with XContainer and XElement, Data conversion with Convert and Enumerable, Visio file generation with VSDXGenerate, Basic data types Int32 and String

DownloadPeriodicActivitiesProp

Summary: DownloadPeriodicActivitiesProp fetches project data, calculates actor efforts and time zones, filters relevant activities and arrows, then serializes the data for JSON download.

ActionResult ProcessController.DownloadPeriodicActivitiesProp()

Routing

  • HTTP: GET
  • URL: /Process/DownloadPeriodicActivitiesProp

Cross-layer call chain - ProcessController.DownloadPeriodicActivitiesProp → Andromeda.Core.Entities.Activity.getFrequency - ProcessController.DownloadPeriodicActivitiesProp → Andromeda.Core.Entities.OutProcessProps.getDay - ProcessController.DownloadPeriodicActivitiesProp → Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone - ProcessController.DownloadPeriodicActivitiesProp → Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone - ProcessController.DownloadPeriodicActivitiesProp → Andromeda.Core.Entities.Actor.WorkStartTimeUTC - ProcessController.DownloadPeriodicActivitiesProp → Andromeda.Core.Entities.Actor.WorkEndTimeUTC - Andromeda.Core.Entities.OutProcessProps.getDay → Andromeda.Core.Extensions.LinqExtensions.ToOrdinalHtmlString - Andromeda.Core.Entities.OutProcessProps.getDay → Andromeda.Core.Extensions.LinqExtensions.ToOrdinalString - Andromeda.Core.Entities.OutProcessProps.getDay → Andromeda.Core.Extensions.LinqExtensions.ToNameString

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_Activity_getFrequency["Andromeda.Core.Entities.Activity.getFrequency"]
    Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkEndTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkEndTimeUTC["Andromeda.Core.Entities.Actor.WorkEndTimeUTC"]
    Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone["Andromeda.Core.Entities.Actor.WorkStartTimeInProjectZone"]
    Andromeda_Core_Entities_Actor_WorkStartTimeUTC["Andromeda.Core.Entities.Actor.WorkStartTimeUTC"]
    Andromeda_Core_Entities_OutProcessProps_getDay["Andromeda.Core.Entities.OutProcessProps.getDay"]
    Andromeda_Core_Extensions_LinqExtensions_ToNameString["Andromeda.Core.Extensions.LinqExtensions.ToNameString"]
    Andromeda_Core_Extensions_LinqExtensions_ToOrdinalHtmlString["Andromeda.Core.Extensions.LinqExtensions.ToOrdinalHtmlString"]
    Andromeda_Core_Extensions_LinqExtensions_ToOrdinalString["Andromeda.Core.Extensions.LinqExtensions.ToOrdinalString"]
    ProcessController_DownloadPeriodicActivitiesProp["ProcessController.DownloadPeriodicActivitiesProp"]
    Andromeda_Core_Entities_OutProcessProps_getDay --> Andromeda_Core_Extensions_LinqExtensions_ToNameString
    Andromeda_Core_Entities_OutProcessProps_getDay --> Andromeda_Core_Extensions_LinqExtensions_ToOrdinalHtmlString
    Andromeda_Core_Entities_OutProcessProps_getDay --> Andromeda_Core_Extensions_LinqExtensions_ToOrdinalString
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Activity_getFrequency
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkEndTimeInProjectZone
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkEndTimeUTC
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkStartTimeInProjectZone
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_Actor_WorkStartTimeUTC
    ProcessController_DownloadPeriodicActivitiesProp --> Andromeda_Core_Entities_OutProcessProps_getDay
Detailed Analysis

Key Flows - Summary: DownloadPeriodicActivitiesProp fetches project data, calculates actor efforts and time zones, filters relevant activities and arrows, then serializes the data for JSON download. - Calculate total effort per actor and compute time zone-specific work times and utilization - Retrieve project ID and fetch actors, activities, arrows, out-process properties, Generate periodic activities by joining activities with out-process properties and filtering, Filter arrows related to periodic activities, Serialize processed data into JSON for download

Security Issues - Summary: The method exposes sensitive data without authentication or authorization. - Lack of authentication checks

Performance Issues - Summary: Multiple database queries and repeated method calls degrade performance with large datasets. - Multiple database queries causing performance degradation, Use of ToList() materializing large query results, Repeated calls to WorkStartTimeInProjectZone and WorkEndTimeInProjectZone without caching, Use of ToList() when filtering arrows on large data

Maintainability Issues - Summary: The method uses magic strings, complex LINQ queries, and is tightly coupled to a specific serializer. - Use of magic strings and numbers reduces readability and maintainability, Complex LINQ queries hinder code understanding and maintenance, Tight coupling to System.Web.Script.Serialization.JavaScriptSerializer limits flexibility

UX Impact Notes - Summary: Returning JSON files requires proper client-side handling to avoid UX issues. - JSON file return

Test Case Ideas - Summary: Verify data retrieval, processing accuracy, time zone handling, and JSON output validity. - Validation of returned JSON data and format

Dependencies & Called Services - Summary: Uses serialization, date handling, collections, and activity-related models for processing periodic activities. - Activity model usage, Actor model usage, Data conversion utilities, DateTime handling, Encoding utilities, Enumerable collections, IActorModel interface, IProcessModel interface, JavaScript serialization, List collections, OutProcessProps usage

GetTeamsSimilarity

Summary: Process JSON input to identify duplicate teams by semantic similarity, generate new names, and return results as JSON.

JsonResult ProcessController.GetTeamsSimilarity()

Routing

  • HTTP: POST
  • URL: /Process/GetTeamsSimilarity
Detailed Analysis

Key Flows - and return results as JSON. - Return results as JSON

Error Flows - Summary: Handle JSON deserialization errors and collection index out-of-bounds exceptions. - JSON deserialization failure on invalid input, IndexOutOfRangeException from invalid collection access

Security Issues - Summary: Decode method risks JSON deserialization attacks from untrusted input. - JSON deserialization vulnerability in Decode method, Risk from untrusted input exploitation

Performance Issues - Summary: Optimize collection operations and loops to improve performance on large datasets. - High computational complexity in Compare method for large arrays, Inefficient searches using FirstOrDefault and Contains inside loops, Unoptimized repeated additions to MergeGroup causing memory and iteration overhead, Unnecessary memory allocation from ToList() during MergeGroup filtering, Lack of caching or optimization in loops over large collections

Maintainability Issues - Summary: Improve code clarity by replacing magic numbers, enhancing naming, and structuring data properly. - Replace magic number 0.3 with named constant, Use descriptive variable names instead of 'K', 'MergeGroup', 'NewName', 'NewTeamLists', Clarify and complete conditional statements, Replace Tuple with custom class or struct for team data

Test Case Ideas - Summary: Verify GetTeamsSimilarity handles input validation - logic branches - Verify logic correctness across conditional branches - Handle empty MergeGroup correctly - Validate normal operation with valid JSON input

Dependencies & Called Services - Summary: Uses collections and interfaces for processing and semantic similarity calculations. - Enumerable for collection operations, IProcessModel interface for processing, ISemanticSimilarity interface for similarity calculations, List collection for data storage

SavePDFData

Summary: Retrieve project data, validate JSON upload success and user errors, then redirect if valid.

JsonResult ProcessController.SavePDFData()

Routing

  • HTTP: POST
  • URL: /Process/SavePDFData
Detailed Analysis

Key Flows - validate JSON upload success and user errors - then redirect if valid. - Check IsSuccess.Val and user error count - Return JSON response with redirect URL if valid

Error Flows - Summary: Method returns early based on incomplete IsSuccess property checks causing potential errors. - Early return based on IsSuccess.HasV property with incomplete condition - Early return based on IsSuccess.Val property with incomplete condition causing compilation errors

Maintainability Issues - and return strongly-typed JSON objects. - Use named constants instead of magic strings for redirect URLs - Return strongly-typed objects in JSON responses instead of anonymous objects - Provide clear context when setting isSuccess flag to improve maintainability

UX Impact Notes - Summary: Redirect and JSON response require proper client handling to maintain smooth user flow. - JSON response requires client-side handling - Redirect URL affects user flow

Test Case Ideas - Summary: Test SavePDFData with varied inputs to verify success flags, JSON output, and condition handling. - Check for syntax errors in conditions - Method returns expected JSON object - Verify isSuccess set to true under correct conditions

Dependencies & Called Services - Summary: SavePDFData calls the Process service. - Process service call

PDFDataToNERModel

Summary: The method processes JSON nodes to create shapes, edges, swimlanes, updates the process map, and returns the result.

JsonResult ProcessController.PDFDataToNERModel()

Routing

  • HTTP: POST
  • URL: /Process/PDFDataToNERModel

Cross-layer call chain - ProcessController.PDFDataToNERModel → Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars

Call Chain Diagram

flowchart TD
    Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars["Andromeda.Core.Extensions.LinqExtensions.RemoveLineBreakChars"]
    ProcessController_PDFDataToNERModel["ProcessController.PDFDataToNERModel"]
    ProcessController_PDFDataToNERModel --> Andromeda_Core_Extensions_LinqExtensions_RemoveLineBreakChars
Detailed Analysis

Key Flows - Summary: The method processes JSON nodes to create shapes - updates the process map - and returns the result. - Create swimlanes from grouped shapes - Decode JSON and validate nodes presence - Iterate nodes to create shapes and edges - Return processed data as JsonResult - Update process map model

Error Flows - Summary: Handle invalid JSON and null nodes to prevent method failure and improve UX. - Return null if nodes collection is null

Security Issues - Summary: The method lacks input validation and contains incomplete security measures. - No validation or sanitization of 'data' field, Empty code block indicating incomplete security handling

Performance Issues - Summary: Optimize JSON decoding, data conversions, LINQ operations, and object creation for better performance. - Inefficient JSON decoding with System.Web.Helpers.Json.Decode on large datasets - Commented out FirstOrDefault code indicating unused logic that may affect performance if reused

Maintainability Issues - Summary: Code uses unclear variables, magic numbers, syntax errors, and unnecessary code reducing maintainability. - Use of magic numbers reduces code clarity, Undefined or unclear variables and functions, Syntax errors causing compilation failures, Commented out code should be removed, Empty code blocks confuse developers, Non-descriptive variable names

UX Impact Notes - Summary: Returning null for missing JSON nodes risks user experience if unhandled. - Returning null for null JSON nodes

Test Case Ideas - Summary: Verify correct initialization, data processing, grouping, method calls, and performance under load. - Create edges for nodes with multiple successors - Create SwimlaneInfo objects with correct properties and constants - Handle empty code blocks properly - Maintain performance with large datasets

Dependencies & Called Services - Summary: Uses data conversion, collection processing, and time measurement utilities. - Data conversion, Enumerable collections, LINQ extensions, List collections, String manipulation, TimeSpan for durations - Process model interface

SavePDFFinalData

Summary: Process JSON data to build swimlanes, shapes, and edges collections, update Visio errors, and redirect to validation page.

JsonResult ProcessController.SavePDFFinalData()

Routing

  • URL: /Process/SavePDFFinalData
Detailed Analysis

Key Flows - update Visio errors - and redirect to validation page. - Create SwimlaneInfo objects from swimlanes data - Create ShapeInfo objects from shapes data - Create EdgeInfo objects from edges data - Return JSON redirect to CheckVisioValidations with visioErrors=1 - Update Visio errors with created collections

Error Flows - Summary: Handle exceptions from JSON deserialization - Exceptions from invalid or malformed JSON deserialization, Exceptions from failed data conversions using Convert.ToInt32 and Convert.ToDouble, NullReferenceExceptions from missing or null deserialized object properties

Security Issues - Summary: Prevent JSON deserialization attacks by validating input before decoding. - Unvalidated JSON deserialization using System.Web.Helpers.Json.Decode

Performance Issues - Summary: Optimize JSON decoding and LINQ usage to improve request processing performance. - Multiple calls to Json.Decode degrade performance with large form data, LINQ Any() and Equals() on Request.AcceptTypes cause minor performance overhead

Maintainability Issues - Summary: Magic strings and repeated conversions reduce code clarity and maintainability. - Use of magic strings for request form keys, Hardcoded content types and URLs reduce flexibility, Repeated conversions lack centralized error handling

UX Impact Notes - Summary: Redirect user to CheckVisioValidations page on validation errors. - Redirect user on validation errors - Set visioErrors value to 1

Test Case Ideas - Summary: Validate JSON deserialization - Accurate assignment of 'iqID' from shape data - Proper invocation of CreateOrUpdateErrorsVisio with correct parameters - Validation of JSON response properties and redirect URL correctness

Dependencies & Called Services - Summary: SavePDFFinalData calls services to convert, list, and process data. - Convert service, List service - Process service

ReviewProcessMap

Summary: Load and parse project XML to extract process map elements, prepare view data, and retrieve input files for review.

ActionResult ProcessController.ReviewProcessMap()

Routing

  • HTTP: GET
  • URL: /Process/ReviewProcessMap

Cross-layer call chain - ProcessController.ReviewProcessMap → Andromeda.Core.Services.VdxTraversal.BuildGraph - ProcessController.ReviewProcessMap → Andromeda.Core.Entities.ShapeInfo.Clone - ProcessController.ReviewProcessMap → Andromeda.Core.Entities.EdgeInfo.Clone - Andromeda.Core.Services.VdxTraversal.BuildGraph → Andromeda.Validation.ShapeEntity.isConnector - Andromeda.Core.Services.VdxTraversal.BuildGraph → Andromeda.Core.Entities.ShapeInfo.Clone

Call Chain Diagram

flowchart TD
    Andromeda_Core_Entities_EdgeInfo_Clone["Andromeda.Core.Entities.EdgeInfo.Clone"]
    Andromeda_Core_Entities_ShapeInfo_Clone["Andromeda.Core.Entities.ShapeInfo.Clone"]
    Andromeda_Core_Services_VdxTraversal_BuildGraph["Andromeda.Core.Services.VdxTraversal.BuildGraph"]
    Andromeda_Validation_ShapeEntity_isConnector["Andromeda.Validation.ShapeEntity.isConnector"]
    ProcessController_ReviewProcessMap["ProcessController.ReviewProcessMap"]
    Andromeda_Core_Services_VdxTraversal_BuildGraph --> Andromeda_Core_Entities_ShapeInfo_Clone
    Andromeda_Core_Services_VdxTraversal_BuildGraph --> Andromeda_Validation_ShapeEntity_isConnector
    ProcessController_ReviewProcessMap --> Andromeda_Core_Entities_EdgeInfo_Clone
    ProcessController_ReviewProcessMap --> Andromeda_Core_Entities_ShapeInfo_Clone
    ProcessController_ReviewProcessMap --> Andromeda_Core_Services_VdxTraversal_BuildGraph
View Metadata
  • View: ReviewProcessMap (Andromeda.Web\Views\Process\ReviewProcessMap.cshtml)
Detailed Analysis

Key Flows - Summary: Load and parse project XML to extract process map elements, prepare view data, and retrieve input files for review. - Check XML file existence and load into XElement - Process shapes with stack and call dRange on graph vertices - Set ViewData with populated lists and project folder path - Return ActionResult to render process map review view

Error Flows - Summary: Handle missing XML files and prevent null reference exceptions in list operations. - Check XML file existence before processing - Return sioError object on error conditions - Validate apeList before using FirstOrDefault

Security Issues - Summary: Fix path traversal and XML injection vulnerabilities in file handling and XML parsing. - Path traversal vulnerability in file path construction, XML injection vulnerability from unsanitized XML parsing

Performance Issues - Summary: Repeated configuration access, multiple LINQ queries, and large collection operations degrade performance. - Repeated ConfigurationManager.AppSettings access causes overhead

Maintainability Issues - Summary: Replace magic strings with constants, fix syntax errors, define variables, and improve code clarity. - Use constants or enums instead of magic strings for file paths and XML elements, Fix incomplete code and syntax errors, Define variable 'Sh' before use, Add whitespace and line breaks in conditionals for readability, Avoid hardcoded file name patterns to increase flexibility, Remove unnecessary empty code blocks

UX Impact Notes - Summary: Returning errors or redirecting to view pages impacts user flow and error handling. - Returning sioError triggers error messages or redirects

Test Case Ideas - Summary: Verify configuration handling, file operations, data initialization, collection processing, and correct view rendering. - AppSettings configuration handling - File existence checks and XML loading - Method returns expected ActionResult and renders correct view

Dependencies & Called Services - Summary: Uses various system and custom types for data handling and XML processing. - System types: Int32, String, List, Enumerable, File and Path operations, XML processing: XContainer, XElement, Custom types: Convert, Directory, EdgeInfo, ShapeInfo, VdxTraversal

LoadPDFMap

Summary: LoadPDFMap retrieves the project folder, finds 'Input_' files, and returns the first file with its MIME type.

ActionResult ProcessController.LoadPDFMap()

Routing

  • URL: /Process/LoadPDFMap
Detailed Analysis

Key Flows - and returns the first file with its MIME type. - Return first file path and MIME type if files exist

Error Flows - Summary: Return HttpNotFound if no matching files are found in the folder. - Return HttpNotFound

Security Issues - Summary: Sanitize file paths to prevent directory traversal vulnerabilities. - Unsanitized 'ProjectFolder' configuration path, Unsanitized first file path from files array

Performance Issues - Summary: Using Directory.GetFiles slows down performance in large directories. - Directory.GetFiles slow in large directories

Maintainability Issues - Summary: Use of unclear magic strings and incomplete file length checks reduce maintainability. - Incomplete file length check lacks clear purpose

UX Impact Notes - Summary: Redirect users to 'Not Found' page when no matching files exist. - Redirect to 'Not Found' page on missing files

Test Case Ideas - Summary: Verify LoadPDFMap returns correct files - handles missing data - and sets MIME types. - Handle missing project ID in registry - Handle non-existent folder paths - Return correct file list for project ID - Return HttpNotFound when no files match - Return correct file when files exist - Correctly determine MIME type for returned file

Dependencies & Called Services - Summary: LoadPDFMap uses system utilities for file handling and MIME type mapping. - Directory operations, Integer processing, MIME type mapping, File path handling

HormonizeTeams

Summary: Load and parse project XML to populate UI data and update ViewData with NER results based on anonymization.

ActionResult ProcessController.HormonizeTeams()

Routing

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

Key Flows - Summary: Load and parse project XML to populate UI data and update ViewData with NER results based on anonymization. - Check XML file existence - Load XML into XElement - Retrieve project ID and XML file path, Initialize lists for swimlanes, shapes, edges, errors, Parse XML to populate lists, Populate ViewData with lists, Run NER model for project words - Update ViewData based on anonymization

Error Flows - Summary: Handle missing or malformed XML files to prevent unhandled exceptions and empty data. - Incomplete or undefined file path variables during file checks

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

Performance Issues - Summary: Repeated conversions and nested Any() calls degrade performance during XML parsing and data checks. - Repeated Convert.ToInt32 and Convert.ToDecimal calls without error handling, Nested Any() inside Select() causing multiple database queries

Maintainability Issues - Summary: Refactor code to improve readability, reduce coupling, and clarify variable naming. - High complexity in LINQ queries with many property assignments

UX Impact Notes - Summary: ViewData population indirectly affects user interface rendering and behavior. - Indirect UI rendering impact, ViewData influences interface behavior

Test Case Ideas - Summary: Verify file handling, data initialization, NER execution, and performance under various conditions. - File path construction with valid project IDs, Graceful handling of missing XML files, Initialization and population of data lists, Correct ViewData population with lists and NER data, NER model execution and anonymized word handling, Performance impact of repeated conversions and database queries, Prevention of runtime errors from incomplete file path variables

Dependencies & Called Services - Summary: Uses data conversion, file handling, XML processing, and project model interfaces. - Data conversion utilities, File handling operations, XML processing with XContainer and XElement, Project and process model interfaces

UpdateNERWordstoActsTms

Summary: Process JSON input to update XML and Visio elements by replacing words with 'ORG' and updating related models.

JsonResult ProcessController.UpdateNERWordstoActsTms()

Routing

  • HTTP: POST
  • URL: /Process/UpdateNERWordstoActsTms
Detailed Analysis

Key Flows - Summary: Process JSON input to update XML and Visio elements by replacing words with 'ORG' and updating related models. - Decode JSON from HTTP POST to get checked and unchecked words - Invoke methods to create/update Visio errors and insert NER words into process map model - Update shapes and text elements by replacing words with 'ORG' - Update swimlane texts with new replacement names

Error Flows - Summary: The method lacks exception handling and null checks for XML element access. - No null checks on XML elements

Security Issues - Summary: User input from Request.Form lacks validation, risking injection vulnerabilities. - Unvalidated user input from Request.Form

Performance Issues - Summary: Optimize JSON decoding, LINQ usage, and collection iteration to improve performance. - Inefficient JSON decoding with System.Web.Helpers.Json.Decode on large datasets

Maintainability Issues - Summary: Refactor code to improve readability, reduce coupling, and remove dead code. - Tight coupling to ProcessMapModel and CreateOrUpdateErrorsVisio limits flexibility

UX Impact Notes - Summary: Updates data that changes swimlane and shape texts visible to users. - Indirect UX impact via updated swimlane texts - Indirect UX impact via updated shape texts

Test Case Ideas - text updates - Iteration over IsCheckedWords for performance and correctness - Replace method updates on shape texts and DistTms with 'ORG' - Swimlane text updates with new names

Dependencies & Called Services - Summary: Utilizes data processing, XML handling, and file operations dependencies. - Enumerable for data manipulation, File operations, IProcessModel interface, String handling, XContainer for XML structures, XElement for XML elements - Process management

SaveAllStartVolumes

Summary: Retrieve project ID, parse start volume actions, create Activity objects, update volumes, and return JSON response.

JsonResult ProcessController.SaveAllStartVolumes()

Routing

  • HTTP: POST
  • URL: /Process/SaveAllStartVolumes
Detailed Analysis

Key Flows - create Activity objects - update volumes - and return JSON response. - Create Activity objects from actions - Return JsonResult response - Update activity volumes via controlModel

Error Flows - Summary: Handle exceptions during JSON deserialization and integer conversion. - Exceptions from invalid JSON deserialization, Exceptions from invalid integer conversion of act.ID or act.Volume

Security Issues - Summary: Prevent JSON deserialization attacks by validating input before decoding. - JSON deserialization vulnerability, Lack of input validation before Json.Decode

Performance Issues - Summary: Optimize JSON decoding and integer conversion to improve performance. - Inefficient use of System.Web.Helpers.Json.Decode, Repeated Convert.ToInt32 calls in loops

Maintainability Issues - Summary: The method's tight coupling and missing error handling reduce modularity and maintainability. - Incomplete return statement causing compilation errors

Test Case Ideas - and return handling. - Performance with large datasets and repeated Convert.ToInt32 calls - Correct UpdateActivityVolumes call with activity list - Response and return value handling after UpdateActivityVolumes

Dependencies & Called Services - Summary: Uses IControlModel to convert and list start volumes. - IControlModel dependency, Convert operation, List operation

UpdateIsNERModelExecuted

Summary: The method updates the NER model execution status to true for the current project and returns a JSON response.

JsonResult ProcessController.UpdateIsNERModelExecuted()

Routing

  • HTTP: POST
  • URL: /Process/UpdateIsNERModelExecuted

Cross-layer call chain - ProcessController.UpdateIsNERModelExecuted → 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"]
    ProcessController_UpdateIsNERModelExecuted["ProcessController.UpdateIsNERModelExecuted"]
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_Database_helper_SqlParameters
    Andromeda_Core_DataManager_Execute --> Andromeda_Core_LoggingManager_Debug
    ProcessController_UpdateIsNERModelExecuted --> Andromeda_Core_DataManager_Execute
Detailed Analysis

Key Flows - Summary: The method updates the NER model execution status to true for the current project and returns a JSON response. - Call ProcessMapModel.UpdateIsNERModelExecuted with project ID and status true - Return JsonResult indicating update completion

UX Impact Notes - Summary: JsonResult return influences user flow based on method call context. - JsonResult return affects user flow

Test Case Ideas - Summary: Verify UpdateIsNERModelExecuted executes correctly on HTTP POST with valid project ID and returns JsonResult. - Return successful JsonResult

Dependencies & Called Services - Summary: Uses IProcessModel service to update NER model execution status. - IProcessModel service dependency

UpdateActivityBRSkills

Summary: Process valid JSON input to update each activity's BR skills and return a JSON response.

JsonResult ProcessController.UpdateActivityBRSkills()

Routing

  • HTTP: POST
  • URL: /Process/UpdateActivityBRSkills
Detailed Analysis

Key Flows - Summary: Process valid JSON input to update each activity's BR skills and return a JSON response. - Return JSON response - Update each activity's BR skills via ProcessMapModel.UpdateActivityBRSkill

Error Flows - Summary: Handle JSON deserialization errors and add explicit exception handling. - Lack of explicit exception handling for JSON decoding and update errors

Security Issues - Summary: Prevent JSON deserialization vulnerabilities by validating and sanitizing input data. - JSON deserialization vulnerability, Lack of input validation and sanitization

Performance Issues - Summary: Updating each activity individually degrades performance with large collections. - Individual updates for each activity

Maintainability Issues - Summary: The method name lacks clarity and tightly couples with ProcessMapModel, reducing flexibility. - Unclear method name, Tight coupling with ProcessMapModel class

UX Impact Notes - Summary: The method returns a JSON response affecting user experience. - JSON response return

Test Case Ideas - Summary: Validate method handles valid data - and returns valid JSON response. - Handle missing or empty request form data - Process valid JSON with multiple ActivityProperty items - Return valid JSON response after processing

Dependencies & Called Services - Summary: Uses IProcessModel service for business rule skill updates. - IProcessModel service dependency

Helper Methods

Initialize

Summary: Initialize processes HTTP GET requests and preserves existing MembershipService instances.

void ProcessController.Initialize(RequestContext requestContext)

Routing

  • HTTP: GET
  • URL: /Process/Initialize
Detailed Analysis

Key Flows - Summary: Initialize processes HTTP GET requests and preserves existing MembershipService instances. - Preserve existing MembershipService if set

Maintainability Issues - Summary: The method tightly couples to AccountMembershipService, reducing flexibility and testability. - Tight coupling to AccountMembershipService, Reduced flexibility, Complicated testing and future changes

Test Case Ideas - Summary: Ensure Initialize handles HTTP GET requests - and avoids redundant MembershipService setup. - Prevent MembershipService reinitialization if already set