Run Flow For List Step

Last Updated: 03/27/2018 Introduced in Version:

This tutorial demonstrates how to use the Run Flow For List step. This step works in a similar manner to the For Each step. The main difference with this step is that it is able to create a Flow to process a collection of items. Moreover, with this step, a designer is able to pick Run Behavior: Synchronous, Thread Job, Thread Job Async or Work Queue. This is a huge advantage for processing large sets of Data.

Example

In this example we are going to use the Run Flow For List step to batch process a list of Accounts within 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 a Get All step from All Integrations > Internal Services > Account Service.

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

Next we are going to configure the Run Flow For List step. In the Data section of step configurations we need to pick Input Type and Output Type. First, using Input Type picker we select Account type. Using the 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, Thread Job Async, and Work Queue. For this example we are going to use Synchronous Run Behavior.  Then, we check the 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 the Edit icon for the Item Workflow to build our Flow For List.

In the Flow Designer, we can use any Decisions steps from the Steps panel to process each item from the List input. In this example we simply connect the Start Step to the End Step. With the End Step selected on the workspace we Edit Input Mappings for this step.

In the Mapping Editor we expand Input on the lefthand 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 the Debug 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