Creating Your First FlowLast 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.
In the example, we will:
- Create a Designer Folder.
- Create a flow in the Designer Folder that sends a notification to an administrator.
- Run the flow to see the notification display.
Our example flow will display a pop-up notification containing the message “Test Notification.”
We’ll begin in the portal by creating a Designer Folder to contain our flow. From the Actions menu, select Add > Designer Folder [Root].
In the resulting Add Root Folder pop-up, enter “My First Designer Project” in the Input Folder Name field and click OK.
Inside the new Designer Folder, click the Create Flow button.
In the resulting New Flow window, name the flow “Send Notification” and click OK to open the Flow Designer.
In the Flow Designer Start-up window panel, expand the All Steps[Catalog] > Communication category select a Send Notification component and click Add.
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.
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.
In the resulting Select Account pop-up, select your current user and click OK.
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 firstname.lastname@example.org 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.
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.”
Click on Save Flow.
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.