Extend ActivityExecutionRecordSnapshot and update DefaultActivityExecutionMapper to include additional activity execution details.
This commit is contained in:
parent
61179bcb53
commit
9b1a76d047
|
|
@ -2,6 +2,19 @@ namespace Elsa.Workflows.Runtime;
|
|||
|
||||
public class ActivityExecutionRecordSnapshot
|
||||
{
|
||||
public string Id { get; set; } = null!;
|
||||
public string? TenantId { get; set; }
|
||||
public string WorkflowInstanceId { get; set; } = null!;
|
||||
public string ActivityId { get; set; } = null!;
|
||||
public string ActivityNodeId { get; set; } = null!;
|
||||
public string ActivityType { get; set; } = null!;
|
||||
public int ActivityTypeVersion { get; set; }
|
||||
public string? ActivityName { get; set; }
|
||||
public DateTimeOffset StartedAt { get; set; }
|
||||
public bool HasBookmarks { get; set; }
|
||||
public ActivityStatus Status { get; set; }
|
||||
public int AggregateFaultCount { get; set; }
|
||||
public DateTimeOffset? CompletedAt { get; set; }
|
||||
public string? SerializedActivityState { get; set; }
|
||||
public string? SerializedOutputs { get; set; }
|
||||
public string? SerializedProperties { get; set; }
|
||||
|
|
|
|||
|
|
@ -58,6 +58,19 @@ public class DefaultActivityExecutionMapper(
|
|||
var serializedMetadata = record.Metadata != null ? payloadSerializer.Serialize(record.Metadata) : null;
|
||||
record.SerializedSnapshot = new()
|
||||
{
|
||||
Id = record.Id,
|
||||
TenantId = record.TenantId,
|
||||
WorkflowInstanceId = record.WorkflowInstanceId,
|
||||
ActivityId = record.ActivityId,
|
||||
ActivityNodeId = record.ActivityNodeId,
|
||||
ActivityType = record.ActivityType,
|
||||
ActivityTypeVersion = record.ActivityTypeVersion,
|
||||
ActivityName = record.ActivityName,
|
||||
StartedAt = record.StartedAt,
|
||||
HasBookmarks = record.HasBookmarks,
|
||||
Status = record.Status,
|
||||
AggregateFaultCount = record.AggregateFaultCount,
|
||||
CompletedAt = record.CompletedAt,
|
||||
SerializedActivityState = compressedSerializedActivityState,
|
||||
SerializedActivityStateCompressionAlgorithm = compressionAlgorithm,
|
||||
SerializedOutputs = record.Outputs?.Any() == true ? safeSerializer.Serialize(record.Outputs) : null,
|
||||
|
|
|
|||
Loading…
Reference in a new issue