-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6375 from elsa-workflows/feature/incidents
Exposed incidents in the Elsa.Api.Client
- Loading branch information
Showing
2 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
51 changes: 51 additions & 0 deletions
51
src/clients/Elsa.Api.Client/Resources/WorkflowInstances/Models/ActivityIncident.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System.Text.Json.Serialization; | ||
|
||
namespace Elsa.Api.Client.Resources.WorkflowInstances.Models; | ||
|
||
/// <summary> | ||
/// Holds information about an activity incident. | ||
/// </summary> | ||
public class ActivityIncident | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ActivityIncident"/> class. | ||
/// </summary> | ||
[JsonConstructor] | ||
public ActivityIncident() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ActivityIncident"/> class. | ||
/// </summary> | ||
/// <param name="activityId">The ID of the activity that caused the incident.</param> | ||
/// <param name="activityType">The type of the activity that caused the incident.</param> | ||
/// <param name="message">The message of the incident.</param> | ||
/// <param name="exception">The exception that caused the incident.</param> | ||
/// <param name="timestamp">The timestamp of the incident.</param> | ||
public ActivityIncident(string activityId, string activityType, string message, ExceptionState? exception, DateTimeOffset timestamp) | ||
{ | ||
ActivityId = activityId; | ||
ActivityType = activityType; | ||
Message = message; | ||
Exception = exception; | ||
Timestamp = timestamp; | ||
} | ||
|
||
/// <summary>The ID of the activity that caused the incident.</summary> | ||
public string ActivityId { get; init; } = default!; | ||
|
||
/// <summary>The type of the activity that caused the incident.</summary> | ||
public string ActivityType { get; init; } = default!; | ||
|
||
/// <summary>The message of the incident.</summary> | ||
public string Message { get; init; } = default!; | ||
|
||
/// <summary>The exception that caused the incident.</summary> | ||
public ExceptionState? Exception { get; init; } | ||
|
||
/// <summary> | ||
/// The timestamp of the incident. | ||
/// </summary> | ||
public DateTimeOffset Timestamp { get; init; } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters