Branch ForEach Step Avoid Unexpected Validation Warnings
  • Updated on 05 Mar 2019
  • 2 minutes to read
  • Print
  • Dark
    Light

Branch ForEach Step Avoid Unexpected Validation Warnings

  • Print
  • Dark
    Light

When using a Branch For Each Step , a common error can be avoided which occurs only whenForms are added into the flow following the Branch ForEach Step. If you run into a validation warning for this reason, a message will read "A linked Flow Step must Follow the Branch For Each" . What this means is that any Form following a Branch For Each Step must not be in the flow. The Forms either need to beencapsulated into alinked flow or a sub-flow and then called by the Flow using the Branch For Each.

Example: Encapsulating Forms into a Linked Flow

Start by creating aFlow for any Form orForms that are being used in a flow following the Branch ForEach Step. This Flow can be added into the main flow using a subflow.

Scenario:

The Form is assigned to all employees requesting each employee to agree for "Travel to be booked for a ski trip". Each employee must agree before the flow can merge and continue.

Steps

  • Start Step: Favorites> Show Form
  • Sign Waiver Form: Favorites> Show Form

waiver.jpg

Start Step

On the Start Step define theFlow Input Data by adding a data name called emailaddress and choose the Type as Account.
14.jpg

Form

On the Sign Waiver Form, this example shows a simple Form is used with a submit button.
2018-10-30_143129.jpg

Next, connect the pathways and save and exit the flow. After a flow has been created and the Branch ForEach Step has been added, add a subflow with any Forms that need to be used in the Flow.

Steps:

  • GetAll: Integrations > Internal Services > Account Service> Get All.
  • BranchForEach: All Steps [Catalog] > Flow Management
  • Subflow1: Flows, Rules, Forms, and Reports > [Current Folder]
  • Merge Step: All Steps [Catalog]> Flow Management

Encapsulating Forms into a Linked Flow: "Alinked Flow Step must follow theBranch ForEach Step.

2018-10-29_144750.jpg

Add a Linked Flow/ Subflow

Now use the Linked Flow/ Subflow created containing theForms that are needed for the flow and save. In the designer Folder, locate theMain Flow and then, on the For Each outcome path from the Branch For Each step add the Linked Flow from the Flows, Rules, Forms, and Reports > [Current Folder] category.

2018-10-29_144151.jpg

Connect the Done outcome from the Linked Flow to the Merge Step . Select Linked Flow Step Select Value of Item outcome from the Branch Step as Account Input to this step. In the Inputs section choose Select From Flow and chooseItem. This Item contains the Accounts and email address that are being called. 
item-2.jpg

This completes theFlow example describing how to fix unexpected errors on a Branch ForEach step.

Was this article helpful?