SDKs & Sample Apps
SDKs

Workflow Designer SDK

16min

The Workflow Designer SDK is used to create Workflow Service and Macros. This SDK is built with React, Javascript, Tailwind, and Diagram-js.

The following document describes the necessary steps to Objectives install the SDK. With that, we’ll discuss the SDK usages and methods provided by the SDK.

Installation

Text


Usage

📘 NOTE

Add a JSON file in the public folder of the application named expressionConfig.json containing all the fields with default expression($expr) field values. An example is provided below:

JSON


Import

Import the package in your app, use it as a component, and provide all the required props.

JS


Interface for baseUrl

JS


Interface for headers

JS


Interface for Tag

JS


Samples

Objective Workflow

An Objective is one or more execution tasks to be performed as a workflow for a Container or set of Containers at a given location. For more information, see .

Sample for Objective Workflow (type object):

JS


Job Workflow

A Job is the sequence of workflows to be executed to complete a single leg of an expected path of an order (point to point). For more information, see Jobs.

Sample for Job Workflow (type array of objects):

JS


Dynamic Values in Form Execution Tasks

Form Execution Tasks (ET) in Workflow Designer enable admin users to incorporate various input fields such as text boxes, radio buttons, and more into their workflows. These fields prove useful for gathering real-time input data when the workflow requires it. As admins design the flow, they can configure Form ET to accept dynamic values.

Incorporating Dynamic Values

Follow the steps below to incorporate dynamic values into Form ET.

Choose the Input Field

Select the desired input field, (e.g., Drop Down) for your workflow

Configure 'Unique Key' Parameter

The unique key parameter in the configuration section of Form ET contains the identifier for the data expected to come at runtime. For example, if the unique key = phoneNumbers, you can include the same parameter in the input from the Dispatch SDK

Set up the Choices Parameter

Use the choices parameter to define the path that identifies the values. The path should start with $.meta.phoneNumbers in the choices parameter. This ensures that the data is properly resolved when accessing the path during runtime.

Methods

The Workflow Designer SDK provides the following methods:

Save the workflows as draft or publish:

  • saveAsDraft: Save the workflow as a draft that can be fetched afterward.
  • publish: Publish the workflow so that it can be used in a live workflow.
JS


Validate the workflow before publishing:

  • validate: Validate the workflow to know whether the flow made on the canvas is valid or not. Workflow can be published only if it is valid.
JS


UI Notes

Maximum z-index used is z-index: 10.

Updated 18 Nov 2024
Did this page help you?