Intro
By using Sub Flow in Domo Workflows, you can integrate one workflow into another, allowing for modular and reusable components in your automations. This article guides you through configuring and utilizing subflows effectively.- Required Grants
- Configure outputs for your subflow
- Add a subflow to your workflow
- Manage your assigned subflow
- Choose an execution mode for your subflow
- Map inputs and outputs
- Map subflow metadata
Required Grants
You can create subflows as long as you have at least an Editor system role or a custom rule with the Create Workflows grant enabled. Learn about system and custom roles.Note: If you can’t access the Sub Flow feature in Workflows, even with the appropriate grant, contact your Domo account team to enable the feature.
Configure Outputs for Your Subflow
Before using a workflow as a subflow, you must define output parameters. These outputs enable the subflow to pass values back to the parent workflow for use in subsequent steps.
- Open the workflow editor and locate the Variable List on the left panel.
- Hover over the variable you want to use as an output.
- Select the three-dot menu (…) next to the variable.
-
Select Output from the menu.
The variable appears in the Outputs section, indicating it’s set as an output.
Note: You can add multiple outputs of any variable type.
- In the Outputs section, hover over the output variable you want to remove.
- Select the trash can icon to delete the output.
Add a Subflow to Your Workflow
After configuring your outputs, you can integrate the Sub flow into your main workflow.
Note: The subflow must be deployed before it can be used. A subflow must also be deployed to use it in a parent workflow.
- Add or edit a step in your workflow canvas.
- Open the Action Menu and select Sub Flow.
- In the configuration panel, select Add Sub Flow. The subflow selection modal opens.
- Use the dropdown or search bar to find the subflow you want to use. The list only shows deployed subflows that are accessible to you.
- Select your desired workflow. Details about your workflow display, such as:
- Description
- Inputs and Outputs
- Workflow preview
- Select Add Sub Flow to insert it into your workflow.
Manage Your Assigned Subflow
After you’ve added a subflow, you can manage it—whether that means changing it, viewing its details, or testing it. Follow these steps to manage your subflow:- In the configuration panel, locate the Sub Flow Designation Tile.
- Select the three-dot menu (…) on the tile to access options.
- You can:
- Change the selected subflow.
- View the subflow details.
- Remove the subflow.
- Test-run the subflow.
Choose an Execution Mode for Your Subflow
When configuring the subflow, you need to decide how it behaves when called from the parent workflow.
- In the Sub Flow Configuration Panel, find the two radio buttons for execution modes:
- Run and Wait
- Run and Continue
- Select the execution mode based on whether you require the subflow’s results before proceeding with the parent workflow.
Map Inputs and Outputs
To ensure your data flows correctly between the parent workflow and the subflow, you must map the inputs and outputs. Follow these steps to map inputs:- Map the required input variables from the parent workflow to the subflow’s input parameters.
- Ensure that the types of these input variables match or are compatible with the Sub flow’s expected inputs.
- Map the output variables from the Sub flow to variables in the parent workflow to capture the results.
- If needed, create new variables in the parent workflow to receive these outputs.