Workflows
A Workflow is an automation you build on the Catalytic platform. It is a template of the process you want to run each time your Workflow is started.
The workflows
client allows you to access your Workflows definitions. These can then be used to start Instances. It provides the following methods:
Lean More About Workflows
In you're interested in learning more about what Workflows are or how they work on the Catalytic platform, see The Catalytic Help Docs Section on Workflows
Creating or Editing Workflows
Currently, the SDK does not support creating or editing Workflow definitions. Instead, you must create and edit your Workflows through the Catalytic Web App. Future versions of the SDK will support creating and editing Workflows.
Quickstart Example
<?php
/*
* This example demonstrates getting Workflows by ID and by name
*/
require_once(__DIR__ . '/vendor/autoload.php');
use Catalytic\SDK\CatalyticClient;
use Catalytic\SDK\Search\Where;
$catalytic = new CatalyticClient();
$workflowById = $catalytic->workflows()->get("c9f2beec-10c0-4f2f-b4e0-1d884c7e053c");
$where = (new Where())->text()->is('SDK Example');
$results = $catalytic->workflows()->find($where);
$workflows = $results->getWorkflows();
// Loop through all the pages of results
while(!empty($results->getNextPageToken())) {
$results = $catalytic->workflows()->find($where, $results->getNextPageToken());
$workflows = array_merge($workflows, $results->getWorkflows());
}
echo "Found " . count($workflows) . "Workflows by name and 1 by Id";
Updated over 2 years ago