| | | 1 | | using System.Text.Json.Serialization; |
| | | 2 | | using Elsa.Workflows.State; |
| | | 3 | | |
| | | 4 | | namespace Elsa.Workflows.Models; |
| | | 5 | | |
| | | 6 | | /// <summary> |
| | | 7 | | /// Holds information about an activity incident. |
| | | 8 | | /// </summary> |
| | | 9 | | public class ActivityIncident |
| | | 10 | | { |
| | | 11 | | /// <summary> |
| | | 12 | | /// Initializes a new instance of the <see cref="ActivityIncident"/> class. |
| | | 13 | | /// </summary> |
| | | 14 | | [JsonConstructor] |
| | 0 | 15 | | public ActivityIncident() |
| | | 16 | | { |
| | 0 | 17 | | } |
| | | 18 | | |
| | | 19 | | /// <summary> |
| | | 20 | | /// Initializes a new instance of the <see cref="ActivityIncident"/> class. |
| | | 21 | | /// </summary> |
| | | 22 | | /// <param name="activityId">The ID of the activity that caused the incident.</param> |
| | | 23 | | /// <param name="activityNodeId">The Node ID of the activity that caused the incident.</param> |
| | | 24 | | /// <param name="activityType">The type of the activity that caused the incident.</param> |
| | | 25 | | /// <param name="message">The message of the incident.</param> |
| | | 26 | | /// <param name="exception">The exception that caused the incident.</param> |
| | | 27 | | /// <param name="timestamp">The timestamp of the incident.</param> |
| | 15 | 28 | | public ActivityIncident(string activityId, string activityNodeId, string activityType, string message, ExceptionStat |
| | | 29 | | { |
| | 15 | 30 | | ActivityId = activityId; |
| | 15 | 31 | | ActivityNodeId = activityNodeId; |
| | 15 | 32 | | ActivityType = activityType; |
| | 15 | 33 | | Message = message; |
| | 15 | 34 | | Exception = exception; |
| | 15 | 35 | | Timestamp = timestamp; |
| | 15 | 36 | | } |
| | | 37 | | |
| | | 38 | | /// <summary>The ID of the activity that caused the incident.</summary> |
| | 20 | 39 | | public string ActivityId { get; init; } = default!; |
| | | 40 | | /// <summary>The Node ID of the activity that caused the incident.</summary> |
| | 20 | 41 | | public string ActivityNodeId { get; init; } = default!; |
| | | 42 | | |
| | | 43 | | /// <summary>The type of the activity that caused the incident.</summary> |
| | 20 | 44 | | public string ActivityType { get; init; } = default!; |
| | | 45 | | |
| | | 46 | | /// <summary>The message of the incident.</summary> |
| | 22 | 47 | | public string Message { get; init; } = default!; |
| | | 48 | | |
| | | 49 | | /// <summary>The exception that caused the incident.</summary> |
| | 26 | 50 | | public ExceptionState? Exception { get; init; } |
| | | 51 | | |
| | | 52 | | /// <summary> |
| | | 53 | | /// The timestamp of the incident. |
| | | 54 | | /// </summary> |
| | 20 | 55 | | public DateTimeOffset Timestamp { get; init; } |
| | | 56 | | } |