Skip to content
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@

namespace Elsa.Persistence.MongoDb.Helpers;

internal class ExpressionHelpers
internal static class ExpressionHelpers
{
public static readonly Expression<Func<WorkflowDefinition, WorkflowDefinitionSummary>> WorkflowDefinitionSummary =
workflowDefinition => new WorkflowDefinitionSummary
workflowDefinition => new()
{
Id = workflowDefinition.Id,
DefinitionId = workflowDefinition.DefinitionId,
Expand All @@ -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<Func<WorkflowInstance, WorkflowInstanceSummary>> WorkflowInstanceSummary =
workflowInstance => new WorkflowInstanceSummary
workflowInstance => new()
{
Id = workflowInstance.Id,
DefinitionId = workflowInstance.DefinitionId,
Expand All @@ -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<Func<WorkflowInstance, WorkflowInstanceId>> WorkflowInstanceId = workflowInstance => new WorkflowInstanceId
public static readonly Expression<Func<WorkflowInstance, WorkflowInstanceId>> WorkflowInstanceId = workflowInstance => new()
{
Id = workflowInstance.Id
};

public static readonly Expression<Func<ActivityExecutionRecord, ActivityExecutionRecordSummary>> ActivityExecutionRecordSummary =
workflowInstance => new ActivityExecutionRecordSummary
workflowInstance => new()
{
Id = workflowInstance.Id,
Status = workflowInstance.Status,
Expand All @@ -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,
};
}
}
Loading