Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix/40688 Empty Report Email issue #3883

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Ginger/Ginger/Ginger.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -707,7 +707,7 @@
<PackageReference Include="Ginger.AccountReport.Contracts" Version="2024.4.1" />
<PackageReference Include="Ginger.ExecuterService.Contracts" Version="24.3.1" />
<PackageReference Include="HtmlAgilityPack" Version="1.11.58" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="LiteDB" Version="5.0.21" />
<PackageReference Include="LiveCharts.Wpf.NetCore3" Version="0.9.7" />
<PackageReference Include="log4net" Version="2.0.15" />
<PackageReference Include="Magick.NET-Q16-AnyCPU" Version="13.5.0" />
Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerCoreCommon/GingerCoreCommon.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

<ItemGroup>
<PackageReference Include="Ginger.External" Version="1.0.0" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="LiteDB" Version="5.0.21" />
<PackageReference Include="Microsoft.CodeAnalysis" Version="3.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.Common" Version="3.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.7.0" />
Expand Down
2 changes: 1 addition & 1 deletion Ginger/GingerCoreNET/GingerCoreNET.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@
<PackageReference Include="InputSimulatorStandard" Version="1.0.0" />

<PackageReference Include="LibGit2Sharp.NativeBinaries" Version="2.0.278" />
<PackageReference Include="LiteDB" Version="5.0.17" />
<PackageReference Include="LiteDB" Version="5.0.21" />

<PackageReference Include="DocumentFormat.OpenXml" Version="3.0.1" />

Expand Down
6 changes: 3 additions & 3 deletions Ginger/GingerCoreNET/LiteDBFolder/LiteDbConnector.cs
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ public void SetCollection<T>(ILiteCollection<T> baseColl, List<T> updateData)
}
catch (Exception ex)
{
Console.WriteLine("SetCollection Error - " + ex.Message);
Reporter.ToLog(eLogLevel.ERROR, "An error occurred while attempting to insert data into LiteDB.", ex);
}
}

Expand All @@ -173,7 +173,7 @@ public void SaveImage(string imagePath, string imageName)
}
catch (Exception ex)
{
Console.WriteLine("SaveImage - " + ex.Message);
Reporter.ToLog(eLogLevel.ERROR, "An error occurred while attempting to save image.", ex);
}
}

Expand All @@ -191,7 +191,7 @@ public void GetImage(string imagePath)
}
catch (Exception ex)
{
Console.WriteLine("GetImage - " + ex.Message);
Reporter.ToLog(eLogLevel.ERROR, "An error occurred while attempting to get image.", ex);
}
}
}
Expand Down
53 changes: 30 additions & 23 deletions Ginger/GingerCoreNET/Run/RunListenerLib/LiteDBRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -401,35 +401,42 @@ private void SetBfobjects(Context context, eExecutedFrom executedFrom)

public override void SetReportRunner(GingerExecutionEngine gingerRunner, GingerReport gingerReport, ParentGingerData gingerData, Context mContext, string filename, int runnerCount)
{
base.SetReportRunner(gingerRunner, gingerReport, gingerData, mContext, filename, runnerCount);
LiteDbRunner runner = new LiteDbRunner();
runner.AllBusinessFlowsColl.AddRange(liteDbBFList);
if (lastRunnertStatus == eRunStatus.Stopped && gingerRunner.RunsetStatus != eRunStatus.Stopped && runner.BusinessFlowsColl.Count > gingerRunner.BusinessFlows.Count)
try
{
runner.AllBusinessFlowsColl.RemoveRange(0, gingerRunner.BusinessFlows.Count);
}
base.SetReportRunner(gingerRunner, gingerReport, gingerData, mContext, filename, runnerCount);
LiteDbRunner runner = new LiteDbRunner();
runner.AllBusinessFlowsColl.AddRange(liteDbBFList);
if (lastRunnertStatus == eRunStatus.Stopped && gingerRunner.RunsetStatus != eRunStatus.Stopped && runner.BusinessFlowsColl.Count > gingerRunner.BusinessFlows.Count)
{
runner.AllBusinessFlowsColl.RemoveRange(0, gingerRunner.BusinessFlows.Count);
}

SetRunnerChildCounts(runner, gingerRunner.BusinessFlows);
SetRunnerChildCounts(runner, gingerRunner.BusinessFlows);

runner.SetReportData(gingerReport);
SaveObjToReporsitory(runner, liteDbManager.NameInDb<LiteDbRunner>());
if (ExecutionLoggerManager.RunSetReport == null)
{
ExecutionLoggerManager.RunSetReport = new RunSetReport();
ExecutionLoggerManager.RunSetReport.GUID = Guid.NewGuid().ToString();
}
if (lastRunnertStatus == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Stopped)
{
var runnerItem = ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Find(x => x.Name == runner.Name);
ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Remove(runnerItem);
runner.SetReportData(gingerReport);
SaveObjToReporsitory(runner, liteDbManager.NameInDb<LiteDbRunner>());
if (ExecutionLoggerManager.RunSetReport == null)
{
ExecutionLoggerManager.RunSetReport = new RunSetReport();
ExecutionLoggerManager.RunSetReport.GUID = Guid.NewGuid().ToString();
}
if (lastRunnertStatus == Amdocs.Ginger.CoreNET.Execution.eRunStatus.Stopped)
{
var runnerItem = ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Find(x => x.Name == runner.Name);
ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Remove(runnerItem);
}
if (runner.RunStatus != eRunStatus.Stopped.ToString())
{
liteDbBFList.Clear();
}
ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Add(runner);
lastRunnertStatus = gingerRunner.RunsetStatus;
ClearSeq();
}
if (runner.RunStatus != eRunStatus.Stopped.ToString())
catch (Exception ex)
{
liteDbBFList.Clear();
Reporter.ToLog(eLogLevel.ERROR, "An error occurred while attempting to set Report runner.", ex);
}
ExecutionLoggerManager.RunSetReport.liteDbRunnerList.Add(runner);
lastRunnertStatus = gingerRunner.RunsetStatus;
ClearSeq();
}
private void SetRunnerChildCounts(LiteDbRunner runner, ObservableList<BusinessFlow> businessFlows)
{
Expand Down
Loading