Find Workflows
Finds Workflows that match your criteria. The Workflows.Find
method supports a fluent style where you can chain together your search criteria.
Permissions Required
Matching Workflows will only be included in the results if you have Find permissions to that Workflow. Workflows that you do not have permissions to will be excluded from the results.
Method Signature
WorkflowsPage Find(Search.Filter filter = null, PagingOptions pagingOptions = null);
async Task<WorkflowsPage> FindAsync(Search.Filter filter = null, PagingOptions pagingOptions = null);
Parameters
Parameter | Type | Description |
---|---|---|
filter | Search.Filter | The filter criteria to search by, or null to fetch all Workflows. |
pagingOptions | PagingOptions | paging options including Size and PageToken |
returns | WorkflowsPage | The requested page of Workflows |
You can search for matches among the following attributes of the Where
class.
Name | Type | Description |
---|---|---|
Text | string | Fuzzy matches text attributes of a Workflow, including Name and Description. |
Owner | string | Search for Workflows owned by a specific team member. The email address of the owner of the Workflow must match exactly, apart from casing. |
Category | string | Find all Workflows in a specific category |
Example
/*
* This example demonstrates finding all WorkflowsWorkflow owned by a
* particular user and having a name that matches particular text.
* This also demonstrates paging through results to collect all
* matches into a single list.
*/
using Catalytic.Sdk.Entities;
using System.Collections.Generic;
namespace Catalytic.Sdk.Examples
{
class Program
{
static void Main(string[] args)
{
var catalytic = new Catalytic.Sdk.Client(Credentials.Default);
var workflows = new List<Workflow>();
var paging = new PagingOptions { Size = 25 };
while(paging != null)
{
var result = catalytic.Workflows.Find(
Where.Text.Matches("SDK Example")
.And.Owner.Is("[email protected]"),
paging
);
workflows.AddRange(result.Workflows);
paging = result.NextPageOptions;
}
// workflows now contains all matching Workflows
}
}
}
Updated almost 3 years ago