Connecting Steps and Changing Flow Execution Paths
  • Updated on 16 Sep 2014
  • 4 minutes to read
  • Print
  • Dark
    Light

Connecting Steps and Changing Flow Execution Paths

  • Print
  • Dark
    Light

This article describes how Flow Designer Wizard helps to simplify Flow Design process. Next, this article briefly describes using GoTo step to jump between flow steps and Catch Exception step to catch exception and provide user with error information instead of crashing the flow if exception occurs.

Example

We begin in Designer Folder by clicking Create Flow to create new flow.
2018-01-17_100510.png

We give our flow a name and click Create to proceed to the Flow Designer .
2018-01-17_100619.png

Flow Designer opens with Flow Designer Wizard on the workspace. We expand Flows, Rules, Forms and Reports > Forms[Interaction] category and select [Pick or Create Form] item. We click Add to place this step to the workspace.
2018-01-17_100703-1024x768.png

In the resulting pop-up window Wizard allows us to set up this form. We click Pick or Create Form link at the top of this pop-up window.
2018-01-17_100729-1024x251.png

In the left side panel we name our new form and click Create to proceed to the Form Designer .
2018-01-17_100807.png

Our form is designed as follow...
2018-01-17_101241.png

We save and close Form Designer to return to the Flow Designer. In the Flow Designer we hover on the outcome from our Form step.
2018-01-17_101341.png

Next, select Send Email step from All Steps[Catalog] > Communication category and click Add to add it to the workspace.
2018-01-17_101427-1024x773.png

From Send Email step's options select Show Mapping Editor .
2018-01-17_101454-1024x770.png

Map our Form's outcomes to Send Email inputs as follow. When finished we click Ok to save and close mapping editor.
2018-01-17_101848-1024x304.png

Back in the Flow Designer we calling the Wizard back by dragging Send Email's outcome somewhere on the workspace. Next, we add new Form by locating [Pick or Create Form] step and clicking Add button.
2018-01-17_101942-1024x766.png

This form has only two buttons and designed to provide the user with a control over the flow. When Form's design completed we save and close the Form Designer to return back to our Flow Designer .
2018-01-17_102130.png

We call our Flow Designer Wizard back again by dragging Send Another Email outcome from our Another Task Form . To add next step to our flow we are going to use Wizard's Search Bar this time. Type “goto” into Wizard's Search Bar and hit Enter on the keyboard. Select the GoTo step found by Wizard and click Add to add it to the workspace. Read more about using GoTo Step here: Jumping Position in a Flow with the GoTo Step.
2018-01-17_102222-1024x767.png

Next, our Wizard allows us to configure GoTo step in the resulting pop-up window. GoToStepName dropdown list provides us with all Flow's steps we can jump to when the flow reaches this GoTo step. We select Send Email Form here because we want our user to be able to send another Email.
2018-01-17_102302-1024x772.png

Another Task Form has second outcome Done that is not currently connected. We are going to use this outcome to throw exception. We are going to use ToolBox this time to find the desirable step for this operation. Type “exception” in the Search Bar in TooBox and hit Enter on the keyboard. From the shown results drag and drop onto the workspace Throw Exception step.
2018-01-17_102357-1024x765.png

We connect Another Task Form's Done outcome to Throw Exception step. Next we configure Throw Exception step the following way... For its message Mapping Type – Constant and “Exit Flow” for the Value .
2018-01-17_102359.png

Mention that Throw Exception step does not have outcome. And our end step remains unconnected. We drag and drop Catch Exception step to the workspace from the search results in the ToolBox from the previous step of this tutorial. Read more about handling exceptions here: Catching All Unhandled Exceptions.
2018-01-17_102500.png

Next, we use Catch Exception's outcome to call Flow Designer Wizard by dragging it like we did previously in this tutorial. In the Wizard we locate [Pick or Create Form] step. Click Add ...
2018-01-17_102538-1024x770.png

We create a new Form that is designed as following... It asks the user if he or she is sure to exit. And it is going to have two outcomes: “Yes” and “No” .
2018-01-17_102934.png

Next, we connect this Form Step's “Yes” outcome to our flow's end step. We use “No” outcome step to call the Wizard again. In the Wizard we are going to use Search Bar to search for GoTo step and click Add to add it to our workspace.
2018-01-17_103152-1024x773.png

In the resulting pop-up window we configure our GoTo step to jump to Another Task Form . We use GoToStepName dropdown list for this. We click Done when our GoTo step is configured.
2018-01-17_103405-1024x780.png

This completes our flow. We can click Debug Flow link from the top Flow Designer's panel to test our flow.

2018-01-17_103432.png

When debugger is running Send Email Form opens first time. We fill it up and click Send to send first Email.
2018-01-17_103554.png

Next, our Another Task Form opens and we click Send Another Email to test our first GoTo step.
2018-01-17_103566.png

And our Send Email Form opens again as expected.
2018-01-17_103567.png

This time when Another Task Form opens again we click Done to test our Catch Exception step.
2018-01-17_103832.png

The exception was caught and we click Yes to complete the Flow . Mention that if we click No the flow jumps back to Another Task Form where we can click Send Another Email and jump back to the first form.
2018-01-17_103833.png

After we click “Yes” our flow runs to the end step and the debugger's diagram opens... We can see that the flow ran with no errors even though we intentionally threw an exception.
2018-01-17_103934.png

Was this article helpful?