Workflow Designer SDK
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.
📘 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:
Import the package in your app, use it as a component, and provide all the required props.
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):
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):
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.
Follow the steps below to incorporate dynamic values into Form ET.
Select the desired input field, (e.g., Drop Down) for your workflow
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
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.
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.
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.
Maximum z-index used is z-index: 10.