Add support for listing workflow instances by multiple definition IDs

This commit is contained in:
Sipke Schoorstra 2023-07-07 19:06:39 +02:00
parent 8bf20732be
commit fa4943a068
4 changed files with 5 additions and 1 deletions

View file

@ -6,4 +6,4 @@ namespace Elsa.Api.Client.Resources.WorkflowDefinitions.Models;
/// A summary of a workflow definition.
/// </summary>
[PublicAPI]
public record WorkflowDefinitionSummary(string Id, string DefinitionId, string? Name, string? Description, int? Version, bool IsLatest, bool IsPublished, string MaterializerName, DateTimeOffset CreatedAt);
public record WorkflowDefinitionSummary(string Id, string DefinitionId, string Name, string? Description, int? Version, bool IsLatest, bool IsPublished, string MaterializerName, DateTimeOffset CreatedAt);

View file

@ -1,5 +1,6 @@
using Elsa.Api.Client.Resources.WorkflowInstances.Enums;
using Elsa.Api.Client.Shared.Models;
using Refit;
namespace Elsa.Api.Client.Resources.WorkflowInstances.Requests;
@ -9,6 +10,7 @@ public class ListWorkflowInstancesRequest
public int? PageSize { get; set; }
public string? SearchTerm { get; set; }
public string? DefinitionId { get; set; }
[Query(CollectionFormat.Multi)] public ICollection<string>? DefinitionIds { get; set; }
public string? CorrelationId { get; set; }
public int? Version { get; set; }
public WorkflowStatus? Status { get; set; }

View file

@ -33,6 +33,7 @@ internal class List : ElsaEndpoint<Request, Response>
{
SearchTerm = request.SearchTerm,
DefinitionId = request.DefinitionId,
DefinitionIds = request.DefinitionIds,
Version = request.Version,
CorrelationId = request.CorrelationId,
WorkflowStatus = request.Status,

View file

@ -11,6 +11,7 @@ public class Request
public int? PageSize { get; set; }
public string? SearchTerm { get; set; }
public string? DefinitionId { get; set; }
public ICollection<string>? DefinitionIds { get; set; }
public string? CorrelationId { get; set; }
public int? Version { get; set; }
public WorkflowStatus? Status { get; set; }