Add ActivityNodeIds filter to journal requests (#5741)

This commit introduces the ActivityNodeIds filter to the journal request models. This enhancement allows filtering logs based on specific activity node IDs, providing more granular control over workflow instance logs. Additionally, unnecessary summary comments have been removed for clarity.
This commit is contained in:
Sipke Schoorstra 2024-07-10 11:38:09 +02:00 committed by GitHub
parent 558486920b
commit dc89caefe8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 7 additions and 24 deletions

View file

@ -1,22 +1,17 @@
namespace Elsa.Api.Client.Resources.WorkflowInstances.Requests;
/// <summary>
/// Represents a request to list journal records.
/// </summary>
public class JournalFilter
{
/// <summary>
/// Gets or sets the activity IDs to filter by.
/// </summary>
public ICollection<string>? ActivityIds { get; set; }
/// <summary>
/// Gets or sets the activity node IDs to filter by.
public ICollection<string>? ActivityNodeIds { get; set; }
/// Gets or sets the activity types to filter out.
/// </summary>
public ICollection<string>? ExcludedActivityTypes { get; set; }
/// <summary>
/// Gets or sets the event types to filter by.
/// </summary>
public ICollection<string>? EventNames { get; set; }
}

View file

@ -39,6 +39,7 @@ internal class Get : ElsaEndpoint<Request, Response>
{
WorkflowInstanceId = request.WorkflowInstanceId,
ActivityIds = request.Filter?.ActivityIds,
ActivityNodeIds = request.Filter?.ActivityNodeIds,
ExcludeActivityTypes = request.Filter?.ExcludedActivityTypes,
EventNames = request.Filter?.EventNames,
};

View file

@ -5,45 +5,32 @@ using FastEndpoints;
namespace Elsa.Workflows.Api.Endpoints.WorkflowInstances.Journal.FilteredList;
/// <summary>
/// Represents a request for a page of workflow execution log records.
/// </summary>
internal class Request
{
/// <summary>
/// The ID of the workflow instance to get the execution log for.
/// </summary>
[BindFrom("id")] public string WorkflowInstanceId { get; set; } = default!;
/// <summary>
/// The filter to apply.
/// </summary>
public JournalFilter? Filter { get; set; }
/// <summary>
/// The zero-based page number to get.
/// </summary>
public int? Page { get; set; }
/// <summary>
/// The size of the page to get.
/// </summary>
public int? PageSize { get; set; }
/// <summary>
/// The number of records to skip.
/// </summary>
public int? Skip { get; set; }
/// <summary>
/// The number of records to take.
/// </summary>
public int? Take { get; set; }
}
internal class JournalFilter
{
public ICollection<string>? ActivityIds { get; set; }
public ICollection<string>? ActivityNodeIds { get; set; }
public ICollection<string>? ExcludedActivityTypes { get; set; }
public ICollection<string>? EventNames { get; set; }
}