Workflow instance API client updates
This commit is contained in:
parent
77b1a97682
commit
2a5891322d
|
|
@ -16,6 +16,24 @@ public interface IWorkflowInstancesApi
|
|||
[Get("/workflow-instances")]
|
||||
Task<PagedListResponse<WorkflowInstanceSummary>> ListAsync(ListWorkflowInstancesRequest request, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a workflow instance.
|
||||
/// </summary>
|
||||
/// <param name="id">The ID of the workflow instance to return.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
[Get("/workflow-instances/{id}")]
|
||||
Task<WorkflowInstance> GetAsync(string id, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Returns a workflow instance.
|
||||
/// </summary>
|
||||
/// <param name="workflowInstanceId">The ID of the workflow instance for which to return the journal.</param>
|
||||
/// <param name="page">The page number.</param>
|
||||
/// <param name="pageSize">The page size.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
[Get("/workflow-instances/{workflowInstanceId}/journal")]
|
||||
Task<PagedListResponse<ExecutionLogRecord>> GetJournalAsync(string workflowInstanceId, int? page = default, int? pageSize = default, CancellationToken cancellationToken = default);
|
||||
|
||||
/// <summary>
|
||||
/// Deletes a workflow instance.
|
||||
/// </summary>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ namespace Elsa.Api.Client.Resources.WorkflowInstances.Models;
|
|||
/// <summary>
|
||||
/// A simplified, serializable model representing an exception.
|
||||
/// </summary>
|
||||
public record ExceptionState(Type Type, string Message, string? StackTrace, ExceptionState? InnerException)
|
||||
public record ExceptionState(string Type, string Message, string? StackTrace, ExceptionState? InnerException)
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="ExceptionState"/> class.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
namespace Elsa.Api.Client.Resources.WorkflowInstances.Models;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a single execution log record.
|
||||
/// </summary>
|
||||
/// <param name="Id">The ID of the execution log record.</param>
|
||||
/// <param name="ActivityInstanceId">The ID of the activity instance associated with the execution log record.</param>
|
||||
/// <param name="ParentActivityInstanceId">The ID of the parent activity instance associated with the execution log record.</param>
|
||||
/// <param name="ActivityId">The ID of the activity associated with the execution log record.</param>
|
||||
/// <param name="ActivityType">The type of the activity associated with the execution log record.</param>
|
||||
/// <param name="NodeId">The ID of the node associated with the execution log record.</param>
|
||||
/// <param name="Timestamp">The timestamp of the execution log record.</param>
|
||||
/// <param name="EventName">The name of the event associated with the execution log record.</param>
|
||||
/// <param name="Message">The message associated with the execution log record.</param>
|
||||
/// <param name="Source">The source of the execution log record.</param>
|
||||
/// <param name="ActivityState">The state of the activity associated with the execution log record.</param>
|
||||
/// <param name="Payload">The payload associated with the execution log record.</param>
|
||||
public record ExecutionLogRecord(
|
||||
string Id,
|
||||
string ActivityInstanceId,
|
||||
string? ParentActivityInstanceId,
|
||||
string ActivityId,
|
||||
string ActivityType,
|
||||
string NodeId,
|
||||
DateTimeOffset Timestamp,
|
||||
string? EventName,
|
||||
string? Message,
|
||||
string? Source,
|
||||
IDictionary<string, object>? ActivityState,
|
||||
object? Payload);
|
||||
Loading…
Reference in a new issue