| | | 1 | | using Elsa.Workflows.Runtime.Entities; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Workflows.Runtime; |
| | | 4 | | |
| | | 5 | | /// <inheritdoc /> |
| | 437 | 6 | | public class WorkflowExecutionLogRecordExtractor(IIdentityGenerator identityGenerator) : ILogRecordExtractor<WorkflowExe |
| | | 7 | | { |
| | | 8 | | /// <inheritdoc /> |
| | | 9 | | public Task<IEnumerable<WorkflowExecutionLogRecord>> ExtractLogRecordsAsync(WorkflowExecutionContext context) |
| | | 10 | | { |
| | 7732 | 11 | | var records = context.ExecutionLog.Select(x => new WorkflowExecutionLogRecord |
| | 7732 | 12 | | { |
| | 7732 | 13 | | Id = identityGenerator.GenerateId(), |
| | 7732 | 14 | | ActivityInstanceId = x.ActivityInstanceId, |
| | 7732 | 15 | | ParentActivityInstanceId = x.ParentActivityInstanceId, |
| | 7732 | 16 | | ActivityNodeId = x.NodeId, |
| | 7732 | 17 | | ActivityId = x.ActivityId, |
| | 7732 | 18 | | ActivityType = x.ActivityType, |
| | 7732 | 19 | | ActivityTypeVersion = x.ActivityTypeVersion, |
| | 7732 | 20 | | ActivityName = x.ActivityName, |
| | 7732 | 21 | | Message = x.Message, |
| | 7732 | 22 | | EventName = x.EventName, |
| | 7732 | 23 | | WorkflowDefinitionId = context.Workflow.Identity.DefinitionId, |
| | 7732 | 24 | | WorkflowDefinitionVersionId = context.Workflow.Identity.Id, |
| | 7732 | 25 | | WorkflowInstanceId = context.Id, |
| | 7732 | 26 | | WorkflowVersion = context.Workflow.Version, |
| | 7732 | 27 | | Source = x.Source, |
| | 7732 | 28 | | Payload = x.Payload, |
| | 7732 | 29 | | Timestamp = x.Timestamp, |
| | 7732 | 30 | | Sequence = x.Sequence |
| | 7732 | 31 | | }); |
| | | 32 | | |
| | 466 | 33 | | return Task.FromResult(records); |
| | | 34 | | } |
| | | 35 | | } |