Branch ForEach Step Avoid Unexpected Validation Warnings
- Updated on 05 Mar 2019
- 2 minutes to read
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.
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.
- Start Step: Favorites> Show Form
- Sign Waiver Form: Favorites> Show Form
On the Start Step define theFlow Input Data by adding a data name called emailaddress and choose the Type as Account.
On the Sign Waiver Form, this example shows a simple Form is used with a submit button.
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.
- 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.
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.
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.
This completes theFlow example describing how to fix unexpected errors on a Branch ForEach step.