The Workflow Entity

Summary of Properties and Methods

Common Workflow Properties

These are the most commonly used properties of a Workflow.

NameTypeDescription
idstringThe unique ID of the Workflow
namestringThe descriptive name of the Workflow
descriptionstringA description of what the Workflow does
categorystringA descriptive grouping for your Workflow
inputFieldsField[]A collection of the required and optional input fields
that can be passed to this Workflow when starting it.

Permission and Visibility Workflow Properties

These are the properties that determine how users can find, edit, start or access a Workflow.

NameTypeDescription
isPublishedboolIndicates whether the Workflow is published or is in draft mode
isArchivedboolIndicates whether is Archived and no longer available for users
to find, start or edit.
fieldVisibilityFieldVisibilityThe default visibility level of fields for this Workflow
public, internal, confidential or highlyConfidential
instanceVisibilityInstanceVisibilityThe visibility level of this Workflow
open or restricted
adminUsersstring[]The users or groups who who may view, start, and edit
this Workflow. Users will be represented by their email,
groups by their group name (starting with g_).
standardUsersstring[]The users or groups who who may view and start
this Workflow. Users will be represented by their email,
groups by their group name (starting with g_).
createdBystringThe email address of the user who created this Workflow
ownerstringThe email address of the user who is the primary admin
for this Workflow. This user will receive fix tasks when there is
a problem in an Instance of this Workflow

Constructors

Workflows should not be created directly via the constructor. Instead they should be created in the Web UI. Future versions will support creating new Workflows via the SDK.

Methods

๐Ÿšง

Workflow methods not yet implemented

The setInput Method

Supports setting inputs in a chaining style and then passing those to an instances.start() call to start an Instance of this Workflow with the specified inputs.

Method Signature

setInput(name: string, value: any): StartInstanceRequest;
ParameterTypeDescription
namestringThe name of the Workflow's input parameter
valueobjectThe value of the Workflow's input parameter
returnsStartInstanceRequestA request that can be passed to instances.start()

Example

/*
 * This example demonstrates starting a Workflow with inputs
 */
const { CatalyticClient } = require('@catalytic/sdk');

const catalytic = new CatalyticClient();

// Search for Workflows containing "Sdk Example Workflow" in their title or description
const matches = await catalytic.workflows.find({
    query: 'Sdk Example Workflow'
});
// Grab the first match
const workflow = matches.workflows[0];

// Define some fields to pass to the Workflow
const fields = [
    { name: 'Age', value: 42 },
    { name: 'Name', value: 'Alice' }
];
// Start a new Instance of the Workflow with the provided name and fields
const instance = await catalytic.instances.start(workflowId.id, 'My new Instance', fields);

console.log(`Instance started successfully with ID '${instance.id}'`);