A Sub-Flow is any Flow that is referenced from within another Flow. The Flow that uses the Sub-Flow is called a parent Flow. 

While building the parent Flow, you add the Sub-Flow navigation logic step to call the Sub-Flow that you need. A Sub-Flow is indicated on the Flow Map by the icon.

On the Flow Map, the details of a Sub-Flow are hidden – only the exit elements of the Sub-Flow will appear. You can view detailed steps of a Sub-Flow at anytime by right-clicking on it and selecting Open.

Why Use Sub-Flows?

Sub-Flows are helpful for making very large or complex Flows easier to work with and understand by dividing them into smaller, more managable parts. A Sub-Flow is often used as a workflow that is referenced by many other Flows.

You can also perform common or repetitive tasks using a Sub-Flow, for example:

  • Gathering customer contact information 
  • Referencing an external product inventory or manufacturer's database
  • Performing complex processes, such as sending and verifying data with external CRM systems, or providing a cross over from one team to another

Note: Use a Concurrent Flow if you need a Sub-Flow to perform (asynchronous) background processing, independently of the parent Flow.

Mapping Variables in Sub-Flows

When adding a Sub-Flow, you perform a mapping of System and User variables to enable the sharing of data between a parent Flow and a Sub-Flow.

The mapping is used at runtime to:

  • supply data from the parent Flow as input to the Sub-Flow, and
  • pass data that is output from the external Sub-Flow back to the parent Flow.

After the Sub-Flow executes, its parent Flow can then proceed with the new, updated or post-processed information.

Creating a Sub-Flow

  1. From the Flow map, right-click anywhere and select Add a Step, or hover over the step where you want to add the Sub-Flow. The Navigation Logic menu is displayed.
  2. Hover over the Navigation Logic icon and click Sub-Flow. The Sub-Flow Editor opens.

  3. In the Sub-Flow Name field, enter a unique name for the reference.
  4. From the drop-down list, select a Sub-Flow. Only Sub-Flows that are relevant to the current Flow will be available.
  5. From the Input Variables Mapping panel, click the plus icon to map any required User variables from the selected Sub-Flow:
    1. From the Sub-Flow Variables field, select a variable.

    2. From the Parent Variable field, enter a hard-coded value or enter @ and then select or add a variable from the Variable list.



    Click the plus icon to map additional User variables, as needed.
  6. From the Input Variables Mapping panel, click the right angle icon to expand the System Variables List and modify any required System variable values:



    Locate the variable that you want to change, then in its Parent Variable field on the right side of the list, enter a new value, enter '@' to select an existing System variable, or create a new User variable that will be used to supply the input value at runtime.
  7. From the Output Variables Mapping panel, click the plus icon to map any required User variables from the selected Sub-Flow:
    1. From the Parent Variable field, enter '@' to select an existing System variable, or create a new User variable select to receive the Sub-Flow value.

    2. From the Sub-Flow Variables field, select the variable that will contain the Sub-Flow value.



    Click the plus icon to map additional User variables, as needed.
  8. From the Output Variables Mapping panel, click the right angle icon to expand the System Variables List and modify any required System variable values:



    Locate the variable that you want to change, then in its Sub-Flow Variables field on the right side of the list, enter a new value, enter '@' to select an existing System variable, or create a new User variable that will be used to supply the input value at runtime.
  9. Click Create Sub-Flow. The Sub-Flow step appears on the Flow Map.
    Note: When you make changes to a Sub-Flow, we recommend that you Refresh its active parent Flow to update it with the new information and redraw it in the Web Designer. Use the Refresh button in the main toolbar of the Web Designer. For more information, click here.

 

Revision:

Comments