private List <WorkStatusMessage> CreateWorkStatusMessages(AnalyticsSummary analyticsSummary, string taProgressPercentage, int progressPercentage) { var workMessages = new List <WorkStatusMessage>(); var memberSummaryContent = $@"Members Processed: {analyticsSummary.MembersProcessed}, Total Members: {analyticsSummary.TotalMembers }, Failed Members: {analyticsSummary.FailedMembers}, Skipped Members: {analyticsSummary.SkippedMembers }."; _logging.Log($"XL ui ta progress - {taProgressPercentage}; Status api ta progress - {progressPercentage};"); _logging.Log(memberSummaryContent); // Customer level member summary message var customerMemberSummaryMessage = new WorkStatusMessage { Content = memberSummaryContent, Severity = TraceEventType.Information, ViewLevelProperty = WorkStatusMessage.ViewLevel.Customer }; workMessages.Add(customerMemberSummaryMessage); // Internal member and claim/event summary work messages var internalMemberSummaryMessage = new WorkStatusMessage { Content = memberSummaryContent, Severity = TraceEventType.Information, ViewLevelProperty = WorkStatusMessage.ViewLevel.Internal }; workMessages.Add(internalMemberSummaryMessage); var claimEventContent = $@"Claims Processed: {analyticsSummary.ClaimsProcessed}, Events Generated: {analyticsSummary.EventsGenerated}."; var internalClaimEventWorkMessage = new WorkStatusMessage { Content = claimEventContent, Severity = TraceEventType.Information, ViewLevelProperty = WorkStatusMessage.ViewLevel.Internal }; workMessages.Add(internalClaimEventWorkMessage); return(workMessages); }
public IActionResult LogMreMessage([FromBody] MreMessage mreMessage) { var workMessages = new List <WorkStatusMessage>(); _logging.Log($"Logging MRE Message with Content: {mreMessage.Content}, JobID: {mreMessage.JobId},", Orchestration.Shared.Domain.Log.LogLevels.Info); var logMreSummaryInternalMessage = new WorkStatusMessage { Content = mreMessage.Content, Severity = TraceEventType.Information, ViewLevelProperty = WorkStatusMessage.ViewLevel.Internal }; workMessages.Add(logMreSummaryInternalMessage); if (!mreMessage.IsError) { var logMreSummaryCustomerMessage = new WorkStatusMessage { Content = mreMessage.Content, Severity = TraceEventType.Information, ViewLevelProperty = WorkStatusMessage.ViewLevel.Customer }; workMessages.Add(logMreSummaryCustomerMessage); } var logMreWorkStatus = new WorkStatus(mreMessage.JobId, 0, AnalyticsRunStatus.Running) { LoggableMessages = workMessages }; _workStatusProxy.Add(logMreWorkStatus); _logging.Log($"Successfully logged Mre Message for the JobId: {mreMessage.JobId}", Orchestration.Shared.Domain.Log.LogLevels.Info); return(Ok(true)); }