| | | 1 | | using Elsa.Workflows.Memory; |
| | | 2 | | |
| | | 3 | | namespace Elsa.Workflows.State; |
| | | 4 | | |
| | | 5 | | /// <summary> |
| | | 6 | | /// A serializable shape of <see cref="ActivityExecutionContext"/>. |
| | | 7 | | /// </summary> |
| | | 8 | | public class ActivityExecutionContextState |
| | | 9 | | { |
| | | 10 | | // ReSharper disable once EmptyConstructor |
| | | 11 | | // Required for JSON serialization configured with reference handling. |
| | | 12 | | /// <summary> |
| | | 13 | | /// Constructor. |
| | | 14 | | /// </summary> |
| | 779 | 15 | | public ActivityExecutionContextState() |
| | | 16 | | { |
| | 779 | 17 | | } |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// The ID of the activity instance. |
| | | 21 | | /// </summary> |
| | 1460 | 22 | | public string Id { get; set; } = default!; |
| | | 23 | | |
| | | 24 | | /// <summary> |
| | | 25 | | /// The ID of the parent of the activity instance. |
| | | 26 | | /// </summary> |
| | 1412 | 27 | | public string? ParentContextId { get; set; } |
| | | 28 | | |
| | | 29 | | /// <summary> |
| | | 30 | | /// The node ID of the scheduled activity. |
| | | 31 | | /// </summary> |
| | 1368 | 32 | | public string ScheduledActivityNodeId { get; set; } = default!; |
| | | 33 | | |
| | | 34 | | /// <summary> |
| | | 35 | | /// The node ID of the activity that owns the scheduled activity. |
| | | 36 | | /// </summary> |
| | 1154 | 37 | | public string? OwnerActivityNodeId { get; set; } |
| | | 38 | | |
| | | 39 | | /// <summary> |
| | | 40 | | /// A bag of properties. |
| | | 41 | | /// </summary> |
| | 2156 | 42 | | public IDictionary<string, object> Properties { get; set; } = new Dictionary<string, object>(); |
| | | 43 | | |
| | | 44 | | /// <summary> |
| | | 45 | | /// A bag of metadata. |
| | | 46 | | /// </summary> |
| | 2147 | 47 | | public IDictionary<string, object> Metadata { get; set; } = new Dictionary<string, object>(); |
| | | 48 | | |
| | | 49 | | /// <summary> |
| | | 50 | | /// The evaluated values of the activity's properties. |
| | | 51 | | /// </summary> |
| | 1501 | 52 | | public IDictionary<string, object>? ActivityState { get; set; } |
| | | 53 | | |
| | | 54 | | /// <summary> |
| | | 55 | | /// A list of dynamically created variables. |
| | | 56 | | /// </summary> |
| | 2147 | 57 | | public ICollection<Variable> DynamicVariables { get; set; } = new List<Variable>(); |
| | | 58 | | |
| | | 59 | | /// <summary> |
| | | 60 | | /// The status of the activity. |
| | | 61 | | /// </summary> |
| | 1368 | 62 | | public ActivityStatus Status { get; set; } |
| | | 63 | | |
| | | 64 | | /// <summary> |
| | | 65 | | /// Gets or sets a value indicating whether the activity is actively executing. |
| | | 66 | | /// </summary> |
| | 1368 | 67 | | public bool IsExecuting { get; set; } |
| | | 68 | | |
| | | 69 | | /// <summary> |
| | | 70 | | /// The number of faults recorded by this activity for itself and descendants. |
| | | 71 | | /// </summary> |
| | 1368 | 72 | | public int FaultCount { get; set; } |
| | | 73 | | |
| | | 74 | | /// <summary> |
| | | 75 | | /// The time at which the activity execution began. |
| | | 76 | | /// </summary> |
| | 1368 | 77 | | public DateTimeOffset StartedAt { get; set; } |
| | | 78 | | |
| | | 79 | | /// <summary> |
| | | 80 | | /// The time at which the activity execution completed. |
| | | 81 | | /// </summary> |
| | 1194 | 82 | | public DateTimeOffset? CompletedAt { get; set; } |
| | | 83 | | |
| | | 84 | | /// <summary> |
| | | 85 | | /// An optional tag to associate with the activity execution. |
| | | 86 | | /// </summary> |
| | 1163 | 87 | | public object? Tag { get; set; } |
| | | 88 | | } |