Creating Your First Flow

Last Updated: 08/17/2016 Introduced in Verision: 2.0

A Flow is a diagram of interconnected components that sequentially execute steps to accomplish a task. Almost all steps result in an outcome, such as true or false, and most output some type of data. Outcomes in a flow are represented as arrows that connect components together. These outcome paths determine the direction of a flow which can be built in the Flow Designer.

Every flow begins with a Start Step and ends with at least one End Step. Between these two steps, flows can be built with unlimited size and complexity, and can even be nested within one-another as sub-flows. Many common or complex tasks have dedicated components already designed for use in a flow, and they can be found in the Toolbox panel of the Flow Designer.

Almost all flow components collect some kind of input data and generate output data. As a flow progresses, each subsequent step has access to all of the outputs created in the steps preceding it.

To ensure maximum flexibility, all inputs and outputs can also be recreated, rebuilt and transformed before and after the component is executed through the use of mappings.

Example

In the example, we will:

  1. Create a Designer Folder.
  2. Create a flow in the Designer Folder that sends a notification to an administrator.
  3. Run the flow to see the notification display.

Our example flow will display a pop-up notification containing the message “Test Notification.”

Expected Result

 

We’ll begin in the portal by creating a Designer Folder to contain our flow. From the Actions menu, select Add > Designer Folder [Root].

DesignerFolder Screenshot

 

In the resulting Add Root Folder pop-up, enter “My First Designer Project”  in the Input Folder Name field and click OK.

03.-add_root_folder.png

Inside the new Designer Folder, click the Create Flow button.

04.-create_flow_button.png

In the resulting New Flow window, name the flow “Send Notification” and click OK to open the Flow Designer.

05.-new_flow.png

In the Flow Designer Start-up window panel, expand the All Steps[Catalog] > Communication category select a Send Notification component and click Add.

flowStarts

 

To complete the structure of the flow, connect the outcome paths of the steps. Connect Send Notification 1’s sole outcome, Done, to the End Step.

 
ConnectedPaths.png

When the Flow Designer believes that a component is not configured correctly, it highlights the invalid component with an alert icon – a red rounded square with a white exclamation mark. In the example flow, the Send Notification 1 step is still considered invalid.

Send Notification 1 will become valid once its properties are configured in the Properties panel for the step. Click on the Send Notification 1 step. In the Properties panel, under the Notify To section, add groups and users to receive the notification. Click the Add button under Notify To > NotifyUser.

AddUser.png

In the resulting Select Account pop-up, select your current user and click OK.

SelectAcct.png

Back in the Properties panel, configure the details of the notification. The Send Notification components builds a notification from three inputs – Accounts and Groups, Message and Subject. Because we already set up admin@decisions.com to be notified, leave the Mapping type of Accounts and Groups set to Ignore.

To define Message, first change its Mapping type. Every type of data allows certain mapping operations to be performed which can alter or create the input as needed. Because we know the exact value that Message should contain, set its Mapping type to Constant.

If we wanted our message to be the output of an earlier flow step, we could select Select Value for the Mapping Type. We could also nullify this input, ignore it, transform some other input into the required type with a conversion flow, or even construct in plain text or HTML.

11.-message_mapping_type_constant.png

Under Inputs > Message, fill in Value with the message, “Test Notification.” Under Inputs > Subject, select a Mapping type of Constant and fill in Value with “My First Notification.”

12.-mappings_complete.png

Click on Save Flow.

13.-save_flow.png

Click on Debug Flow to run the flow in the debugger. Notice a pop-up notification appears in the upper-right corner of the screen. Its subject reads “My First Notification” and the message reads “Test Notification.”

Note that in Decisions version 3.5 and above, you will need to click Test Flow rather than Debug Flow.

3.5 Test Flow Shot

 

14.-debugger_notification.png

Additional Resources