Run Flow For List Step

Last Updated: 07/26/2016 Introduced in Verision:

This tutorial demonstrates how to use Run Flow For List step. This step was implemented in Decisions 3.5. This step works in the similar manner as For Each loop step, except with this step designer is able to create a Flow to process collection of Items. Moreover, with this step, designer is able to pick Run Behavior: Synchronous, Thread Job or Work Queue. This is a huge advantage for processing large sets of Data.



In this example we are going to use Run Flow For List step to batch process list of Accounts in the Decisions system.

We begin in Designer Folder with clicking Create Flow on the Folder Actions Panel.


In the resulting window we Name the Flow and click Create to proceed to the Flow Designer.


In the Flow Designer we add Get All step from Integration > Internal Services > Account Service category.


Next to Get All step we add Run Flow For List step from Data > List category in the Toolbox.


Then, we are going to set up Run Flow For List step. In Data section of step configurations we need to pick Input Type and Output Type. First, using Input Type picker we select Account type.


Next, using Output Type picker we pick String type. We are going to output Email Address from the Account type.


In the Flow section of the step configuration we can build a Flow itself for List processing and pick Run Behavior. For the Run Behavior we have following options: Synchronous, Thread Job, Work Queue. For this example we are going to use Synchronous Run Behavior.


Then, we check Expose All Flow Data checkbox to be able to use all our Flow Data in the Flow For List.


Next, we Select Value of the Get All Result for Input List Input to this step.


Finally, we click Edit icon for the Item Workflow to build our Flow For List.


Flow Designer opens and here we can use any Decisions steps from the Toolbox to process each item from the List input. In this example we simply connect Start Step to the End Step. With End Step selected on the workspace we Show Mapping Editor for this step.


In the Mapping Editor we expand Input on the left-hand side (our Item from the list) and connect EmailAddress field to OutputData. Save and close Mapping Editor.


This completes our Flow For List. We can save and close Flow Designer.


In the main Flow Designer we connect the outcome from the Run Flow For List step to the End step in the Flow. This completes our main Flow. On the top panel of the Flow Designer we click Test Flow link.


The Flow executes in the Debugger with no errors. Input Data for the Run Flow For List step indicates that the step accepted a List of Accounts.


And, the Outcome data for this step is a list of Email Addresses from the input collection Accounts.


Additional Resources