diff --git a/src/modules/persistence/Elsa.Persistence.MongoDb/Helpers/ExpressionHelpers.cs b/src/modules/persistence/Elsa.Persistence.MongoDb/Helpers/ExpressionHelpers.cs index 42a9e255..8c7c977d 100644 --- a/src/modules/persistence/Elsa.Persistence.MongoDb/Helpers/ExpressionHelpers.cs +++ b/src/modules/persistence/Elsa.Persistence.MongoDb/Helpers/ExpressionHelpers.cs @@ -5,10 +5,10 @@ namespace Elsa.Persistence.MongoDb.Helpers; -internal class ExpressionHelpers +internal static class ExpressionHelpers { public static readonly Expression> WorkflowDefinitionSummary = - workflowDefinition => new WorkflowDefinitionSummary + workflowDefinition => new() { Id = workflowDefinition.Id, DefinitionId = workflowDefinition.DefinitionId, @@ -18,11 +18,14 @@ internal class ExpressionHelpers IsLatest = workflowDefinition.IsLatest, IsPublished = workflowDefinition.IsPublished, MaterializerName = workflowDefinition.MaterializerName, - CreatedAt = workflowDefinition.CreatedAt + CreatedAt = workflowDefinition.CreatedAt, + IsReadonly = workflowDefinition.IsReadonly, + ProviderName = workflowDefinition.ProviderName, + ToolVersion = workflowDefinition.ToolVersion }; public static readonly Expression> WorkflowInstanceSummary = - workflowInstance => new WorkflowInstanceSummary + workflowInstance => new() { Id = workflowInstance.Id, DefinitionId = workflowInstance.DefinitionId, @@ -34,16 +37,17 @@ internal class ExpressionHelpers Name = workflowInstance.Name, CreatedAt = workflowInstance.CreatedAt, UpdatedAt = workflowInstance.UpdatedAt, - FinishedAt = workflowInstance.FinishedAt + FinishedAt = workflowInstance.FinishedAt, + IncidentCount = workflowInstance.IncidentCount, }; - public static readonly Expression> WorkflowInstanceId = workflowInstance => new WorkflowInstanceId + public static readonly Expression> WorkflowInstanceId = workflowInstance => new() { Id = workflowInstance.Id }; public static readonly Expression> ActivityExecutionRecordSummary = - workflowInstance => new ActivityExecutionRecordSummary + workflowInstance => new() { Id = workflowInstance.Id, Status = workflowInstance.Status, @@ -53,6 +57,11 @@ internal class ExpressionHelpers ActivityTypeVersion = workflowInstance.ActivityTypeVersion, ActivityName = workflowInstance.ActivityName, StartedAt = workflowInstance.StartedAt, - HasBookmarks = workflowInstance.HasBookmarks + HasBookmarks = workflowInstance.HasBookmarks, + CompletedAt = workflowInstance.CompletedAt, + AggregateFaultCount = workflowInstance.AggregateFaultCount, + Metadata = workflowInstance.Metadata, + WorkflowInstanceId = workflowInstance.WorkflowInstanceId, + TenantId = workflowInstance.TenantId, }; -} \ No newline at end of file +}