| | | 1 | | using System.ComponentModel.DataAnnotations.Schema; |
| | | 2 | | using System.Text.Json.Serialization; |
| | | 3 | | using Elsa.Common; |
| | | 4 | | using Elsa.Common.Entities; |
| | | 5 | | using Elsa.Workflows.State; |
| | | 6 | | |
| | | 7 | | namespace Elsa.Workflows.Runtime.Entities; |
| | | 8 | | |
| | | 9 | | /// <summary> |
| | | 10 | | /// Represents a single activity execution of an activity instance. |
| | | 11 | | /// </summary> |
| | | 12 | | public partial class ActivityExecutionRecord : Entity, ILogRecord |
| | | 13 | | { |
| | | 14 | | /// <summary> |
| | | 15 | | /// Gets or sets the workflow instance ID. |
| | | 16 | | /// </summary> |
| | 10145 | 17 | | public string WorkflowInstanceId { get; set; } = null!; |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Gets or sets the activity ID. |
| | | 21 | | /// </summary> |
| | 10180 | 22 | | public string ActivityId { get; set; } = null!; |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// Gets or sets the activity node ID. |
| | | 26 | | /// </summary> |
| | 10145 | 27 | | public string ActivityNodeId { get; set; } = null!; |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// The type of the activity. |
| | | 31 | | /// </summary> |
| | 10211 | 32 | | public string ActivityType { get; set; } = null!; |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// The version of the activity type. |
| | | 36 | | /// </summary> |
| | 10145 | 37 | | public int ActivityTypeVersion { get; set; } |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// The name of the activity. |
| | | 41 | | /// </summary> |
| | 10145 | 42 | | public string? ActivityName { get; set; } |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// The state of the activity at the time this record is created or last updated. |
| | | 46 | | /// </summary> |
| | 9108 | 47 | | public IDictionary<string, object?>? ActivityState { get; set; } |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// Any additional payload associated with the log record. |
| | | 51 | | /// </summary> |
| | 7760 | 52 | | public IDictionary<string, object>? Payload { get; set; } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// Any outputs provided by the activity. |
| | | 56 | | /// </summary> |
| | 9040 | 57 | | public IDictionary<string, object?>? Outputs { get; set; } |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// Any properties provided by the activity. |
| | | 61 | | /// </summary> |
| | 11475 | 62 | | public IDictionary<string, object>? Properties { get; set; } |
| | | 63 | | |
| | | 64 | | /// <summary> |
| | | 65 | | /// Lightweight metadata associated with the activity execution. |
| | | 66 | | /// This information will be retained as part of the activity execution summary record. |
| | | 67 | | /// </summary> |
| | 11529 | 68 | | public IDictionary<string, object>? Metadata { get; set; } |
| | | 69 | | |
| | | 70 | | /// <summary> |
| | | 71 | | /// Gets or sets the exception that occurred during the activity execution. |
| | | 72 | | /// </summary> |
| | 11561 | 73 | | public ExceptionState? Exception { get; set; } |
| | | 74 | | |
| | | 75 | | /// <summary> |
| | | 76 | | /// Gets or sets the time at which the activity execution began. |
| | | 77 | | /// </summary> |
| | 10145 | 78 | | public DateTimeOffset StartedAt { get; set; } |
| | | 79 | | |
| | | 80 | | /// <summary> |
| | | 81 | | /// Gets or sets whether the activity has any bookmarks. |
| | | 82 | | /// </summary> |
| | 10145 | 83 | | public bool HasBookmarks { get; set; } |
| | | 84 | | |
| | | 85 | | /// <summary> |
| | | 86 | | /// Gets or sets the status of the activity. |
| | | 87 | | /// </summary> |
| | 10145 | 88 | | public ActivityStatus Status { get; set; } |
| | | 89 | | |
| | | 90 | | /// <summary> |
| | | 91 | | /// Gets or sets the aggregated count of faults encountered during the execution of the activity instance and its de |
| | | 92 | | /// </summary> |
| | 10145 | 93 | | public int AggregateFaultCount { get; set; } |
| | | 94 | | |
| | | 95 | | /// <summary> |
| | | 96 | | /// Gets or sets the time at which the activity execution completed. |
| | | 97 | | /// </summary> |
| | 10153 | 98 | | public DateTimeOffset? CompletedAt { get; set; } |
| | | 99 | | } |
| | | 100 | | |
| | | 101 | | public partial class ActivityExecutionRecord |
| | | 102 | | { |
| | 6313 | 103 | | [NotMapped] [JsonIgnore] public ActivityExecutionRecordSnapshot? SerializedSnapshot { get; set; } |
| | | 104 | | } |