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
InstanceStepsPage find();
InstanceStepsPage find(Filter filter);
InstanceStepsPage find(String pageToken);
InstanceStepsPage find(Filter filter, String pageToken);
InstanceStepsPage find(Filter filter, String pageToken, Integer pageSize);
Parameters
Parameter | Type | Description |
---|---|---|
filter | Filter | The filter criteria to search by, or null to fetch all Instances. |
pageToken | String | The token of the page to fetch |
pageSize | Integer | 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 of the Where
class.
Name | Type | Description |
---|---|---|
text | String | Fuzzy matches text attributes of an Instance Step, including Name and Description. |
workflowId | String | Find Instances of 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
/*
* 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.
*/
import org.catalytic.sdk.CatalyticClient;
import org.catalytic.sdk.entities.InstanceStepsPage;
import org.catalytic.sdk.entities.InstanceStep;
import java.util.List;
import java.util.ArrayList;
public class Program {
public static void main(String[] args) throws Exception {
// Create and initialize CatalyticClient
CatalyticClient catalytic = new CatalyticClient();
// Find all steps where [email protected] is assigned
Where where = new Where().assignee().is("[email protected]");
InstanceStepsPage results = catalytic.instances().findSteps(where);
List<InstanceStep> steps = new ArrayList<>();
steps.addAll(results.getInstanceSteps());
// Get all pages of results and add all the steps to `steps`
while(results.getNextPageToken() != null) {
results = catalytic.instances().findSteps(where, results.getNextPageToken());
instanceSteps.addAll(results.getInstanceSteps());
}
}
}
Updated almost 4 years ago