Create a Flow
  • 11 Oct 2022
  • 5 Minutes to read
  • Dark
    Light

Create a Flow

  • Dark
    Light

Article Summary

Overview

A Flow (or Workflow) is the Designer Element visually representing logic used to execute a business process within Decisions. Flows can move and manipulate data, perform various actions, and provide the functionality to other Designer Elements throughout the product. Such actions may include tasking a user, making an API call to update an external system, looking up data in a database, etc... 

These actions are defined by adding, chaining, and configuring functions referred to as Flow Steps. Steps are a graphical way to represent each individual point within a Flow. Steps can be added to Flows via the Flow Designer from the step catalog known as the Toolbox.

For more information on Flows, see About Flows.

Example

This example will help understand Flow fundamentals by guiding the reader to create a simple Flow with one step. The step used in the Flow will take two values and add them together.

Creating the Flow

  1. Begin in a Designer Folder and click the CREATE FLOW button on the Global Action Bar at the top of the screen.
  2. The Create Flow window will appear with several different options for choosing the template or function of the Flow. Categories on the left side of the window contain several different Flow options for certain behaviors or object references.
  3. A smaller window will appear; enter a Flow name in the text box provided. Click CREATE once a name has been designated.


Adding Input Data

Flow Input Data is data that is passed into the Flow for use with Flow steps. Input Data can be defined with values but will otherwise expect an input from the end-user or another Flow (if referenced as a Sub Flow). 

The Data Definitions window is where a user can define what data will be passed through the Flow. This window presents three fields per line that can be configured for each piece of data. Users can enter a Name for the data, select the Type of data it is, and define whether or not it Is a List of data.

  1. At the top of the Flow Designer, click EDIT INPUT DATA to display the Data Definitions window. Click DEFINE under Define Input Data.
  2. Enter "Value 1" in the Name field on the first line. Expand the drop-down list for Type and select Decimal [Number]. Leave the 'Is List' option unchecked.
  3. Once the first line has been configured, add another new line with the data name "Value 2" with the Type Decimal [Number], which is not a list. Click Save and then close the Data Definitions window.
    Adding Input Data via Design Pattern
    Input data for a Flow can also be set using a Data Designer/Design Pattern. To learn more, see Data Designer and Design Pattern Overview.

Adding Steps

Flow Steps are used to perform a specific function. The Flow consists of a sequence of steps that run with the configured properties. Flow Steps can be accessed with the Toolbox or the Add After window. Most steps have an outcome path that extends from their icon; this is used to connect it to other steps in the workspace.


Step Toolbox

The first method of adding a step is by clicking and dragging a step into the workspace of the Flow Designer from the Toolbox tab on the left. This tab is open by default when the Flow Designer is launched, and it starts by showcasing the FAVORITE STEPS category.

To learn more about the Toolbox, see Searching the Step Toolbox.


Add After 

The second method of adding a step is using the Add After feature that is initiated by clicking the arrow on the end of an outcome path, dragging the arrow to white space on the workspace, after hovering the cursor over the line that connects two steps together and selecting the plus icon.

  1.  Click the Done path of the Start step to open the Add After window.
  2. Navigate to All Steps [Catalog] > Data > Numbers and select the Add step. Click ADD.


Completing The Build

In the step properties, all of the expected pieces of data that the step needs to function will be listed in the INPUTS category section. Next to each input is a drop-down list that defaults to Uknown. This drop-down represents the Mapping Type for an input value. 

For more detailed information on each Mapping Type, visit  Mapping Type Overview.
  1. Select the Add step icon to populate the properties for this step in the Properties panel and locate the INPUTS section.
  2. Click Unknown next to the Value1 field and select the Select From Flow mapping type option. A window will appear that displays the available input data in the Flow. Select Value 1 and click DONE. Do the same for the Value2 field and select Value 2 from the Flow. 
  3. Connect the Done path to the End step. Click Save at the top to save changes to the Flow.
    Flow/Step Exceptions
    In the Flow Designer, a red exclamation mark will appear whenever a new Flow is created or new steps are inserted that have not been configured yet. This indicates an Exception within the Flow that would need to be resolved before the Flow/Steps can function. This can usually be done by connecting steps or appropriately configuring each step with all the required parameters. The example below clears the red exception icon once the step inputs have been defined.


Debugging The Flow

The Debugger is a tool within Decisions that allows the user to test the Flow and confirm that the logic is working as expected. It will show the number of times a step was reached, the path it took, and inputs and outputs to see how the data flows from step to step.

  1. At the top of the Flow Designer is the action bar. Click Debug from this bar to enter the Flow Debugger. In the Debugging window, enter a number for Value 1 and Value 2. Click START DEBUGGING once the values have been defined.
  2. Select the Add step icon, and a small information box will appear that shows the number of times the step was executed in green, and the number of exceptions caught will be in red. In this case, the Add step was executed once and saw zero exceptions.
  3. Click Execution 1, so the small action menu appears, then select View Input/Output Data. This shows that the Flow calculated the results of the two values added together. Exit out of the Debugger, then save and close the Flow.

Was this article helpful?