Find Instance Steps
Find Instance steps within an Instance or across all Instances of a Workflow.
Permissions Required
You must have Find permissions to the Instance for this request to succeed.
Method Signature
findSteps(Filter $filter = null, string $pageToken = null, int $pageSize = null): InstanceStepsPage
Parameters
Parameter | Type | Description |
---|---|---|
$filter | Filter | The filter criteria to search by, or null to fetch all Instance Steps. |
$pageToken | string | The token of the page to fetch |
$pageSize | int | The number of Instances to return per page |
returns | InstanceStepsPage | The requested page of Instance Steps |
You can search for matches among the following attributes
Name | Type | Description |
---|---|---|
text | string | Fuzzy matches text attributes of an Instance Step, including Name and Description. |
workflowId | string | Find Instance Steps for a specific Workflow |
assignee | string | Find Steps assigned to a specific user by email or username. Results will include Steps assigned to a Group to which the user belongs. |
Example
<?php
/*
* This example demonstrates finding Steps across all Instances
* assigned to a specific user. Note that this will include Steps
* assigned to a Group to which the User belongs.
*/
require_once(__DIR__ . '/vendor/autoload.php');
use Catalytic\SDK\CatalyticClient;
$catalytic = new CatalyticClient();
// Query for all Instance Steps assigned to Alice
$where = (new Where())->assignee()->is('alice');
$results = $catalytic->instances()->findSteps($where);
$steps = $results->getInstanceSteps();
// While there are more pages, fetch the next page
while(!empty($results->getNextPageToken()))
{
// Fetch the next page of workflows
$results = $catalytic->instances()->findSteps($where, $results->getNextPageToken());
// Merge all the instance steps into $steps
$steps = array_merge($steps, $results->getInstanceSteps());
}
Updated almost 3 years ago