Add workflow name property to workflow instance filter.
Add the name property to the workflow instance filter to make use of the name property that can be used in the Request class for the list endpoint. This allows us to filter purely on workflow instance name without using the SearchTerm
This commit is contained in:
parent
965a67c62f
commit
1c9328597f
|
|
@ -38,6 +38,7 @@ internal class List(IWorkflowInstanceStore store) : ElsaEndpoint<Request, Respon
|
|||
{
|
||||
IsSystem = request.IsSystem,
|
||||
SearchTerm = request.SearchTerm,
|
||||
Name = request.Name,
|
||||
DefinitionId = request.DefinitionId,
|
||||
DefinitionIds = request.DefinitionIds?.Any() == true ? request.DefinitionIds : null,
|
||||
Version = request.Version,
|
||||
|
|
|
|||
|
|
@ -25,6 +25,11 @@ public class WorkflowInstanceFilter
|
|||
/// Filter workflow instances that match the specified search term.
|
||||
/// </summary>
|
||||
public string? SearchTerm { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Filter workflow instances that match the specified name.
|
||||
/// </summary>
|
||||
public string? Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Filter workflow instances by definition ID.
|
||||
|
|
@ -125,6 +130,7 @@ public class WorkflowInstanceFilter
|
|||
if (filter.WorkflowSubStatuses != null) query = query.Where(x => filter.WorkflowSubStatuses.Contains(x.SubStatus));
|
||||
if (filter.HasIncidents != null) query = filter.HasIncidents == true ? query.Where(x => x.IncidentCount > 0) : query.Where(x => x.IncidentCount == 0);
|
||||
if (filter.IsSystem != null) query = query.Where(x => x.IsSystem == filter.IsSystem);
|
||||
if (filter.Name != null) query = query.Where(x => x.Name!.Contains(filter.Name, StringComparison.InvariantCultureIgnoreCase));
|
||||
|
||||
if (TimestampFilters != null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue