Run Flow For List Step
  • Updated on 27 Jun 2016
  • 2 minutes to read
  • Print
  • Dark
    Light

Run Flow For List Step

  • Print
  • Dark
    Light

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 a Run Behavior: Synchronous, Thread Job, Thread Job Async, Work Queue, Async and Wait . This is a huge advantage for processing large sets of Data.

Steps:

  • GetAll: Integrations > Internal Services > AccountService
  • Run Flow for List: Data > List

Flow Example:
In this example use the Run Flow For List step to batch process a list of Accounts within the Decisions system. The completed flow will look like the below image.
2019-01-24_111250-1.png

Configure the Steps:
Begin in a Designer Folder and Create Flow on the Folder Actions Panel. In the Create Flow dialog name the Flow and select Create to proceed to the Flow Designer.
In the Flow Designer add a Get All step from All Integrations > Internal Services > Account Service .
2019-01-24_101528.png

Add a Run Flow For List step from Data > List category. Configure the Run Flow For List step.
In the Data section of step configurations under Input Type picker select Account as the type. Using the Output Type picker chose String type. The end result is outputting Email Address from the Account type.
In the Flow section of the step configuration, there is an option to build a Item Workflow and chose a Run Behavior .
For the Run Behavior there are the following options:

  • Synchronous: runs in real time on the current flow or thread. Similar to how in-session forms display to the current user immediately.
  • ThreadJob : runs in a synchronous fashion, but uses multiple threads on the machine to execute faster.
  • WorkQueue: runs of these flows across multiple queues, splitting the load.
  • ThreadJobAsync: runs the flow Async and doesn't wait for any return data.
  • AsyncAndWait: runs the processes and pauses the parent flow until the parent has finished executing all of the items in the array. It can also receive an array of returned data from the individual list of flows ran.

For this example use Synchronous. Then, check theExpose All Flow Data checkbox to be able to use all our Flow Data in the Flow For List .
2019-01-24_101839.png

Next, Select Value for Input List Input asGetAll_Output .
2019-01-24_102716.png

Finally, select the Edit icon for the Item Workflow to build the Item Workflow .
2018-01-05_141956-2.png

In the FlowDesigner, 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 navigate to Input and chose Input.EmailAddress for the OutputData . Save and close.
2019-01-24_111056.png

In the main Flow Designer, connect the outcome from the Run Flow For List step to the End step in the Flow . This completes the main Flow .
On the top action panel of theFlow Designer select Debug.
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.
The Outcome data for this step is a list ofEmail Addresses from the input collection Accounts.
2019-01-24_111420.png

Was this article helpful?