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

ParameterTypeDescription
$filterFilterThe filter criteria to search by, or null to fetch all Instance Steps.
$pageTokenstringThe token of the page to fetch
$pageSizeintThe number of Instances to return per page
returnsInstanceStepsPageThe requested page of Instance Steps

You can search for matches among the following attributes

NameTypeDescription
textstringFuzzy matches text attributes of an Instance Step, including Name and Description.
workflowIdstringFind Instance Steps for a specific Workflow
assigneestringFind 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());
}