Skip to content

Subflows

A subflow is a set of nodes which can be bundled together for re-using later like a function. The subflows can be used in multiple larger flows as a single node which in turn reduces the complexity in a flow.

The subflow feature in VFC is an adaptation of the "subflow" in Node-RED. For more information, refer to Node-RED subflows.

The following graphic shows the subflows user interface:

ui-subflow

① Node palette where subflow nodes are created under "subflows"

② Working area to design subflows

③ Sidebar

④ Tools menu

The subflow nodes are designed in the following methods:

The subflow option is available in the menu bar menu bar.

Create a subflow

To create a subflow, follow these steps:

  1. Click menu bar, navigate to "Subflows" and select "Create Subflow".

    create-subflow-window

  2. To set the name and description of the subflow, click edit properties.

A new subflow is created and will be visible in the node palette under "subflows" section. You can now use the created subflow as a single node in other flows.

subflow-section

Selection to subflow

To create a subflow while designing a flow, follow these steps:

  1. From the node palette, drag and drop the following nodes to the working area:

    • Inject node
    • Generate node
    • Filter node
    • Map node
    • Debug node
  2. Connect the nodes in a flow as shown below:

    timestamp-generate-array

  3. Double click on "inject" node to edit the properties. For more information, refer to Editing nodes.

  4. Select the "generate" and "filter" nodes.

  5. Click menu bar, navigate to "Subflows" and select "Selection to Subflows".

    selection-to-subflow

    Note

    The "Selection to subflow" option will be visible only when you select the nodes in your working space.

  6. Double click on the created subflow to edit the properties. Enter the "Name" and click "Done".

Note

Clicking delete button removes the subflow from your current working space and not from the node palette.
To delete subflows from the node palette, refer to Delete subflows.

The selected nodes will automatically be converted to a subflow.

input-subflow-map-array

The newly created subflow will be visible in the node palette.

subflow2

Edit a subflow

To edit the properties of a subflow, refer to following methods:

Edit from Node Palette

Double click on the node from the palette under "subflow" section. To edit the subflow properties, click edit properties.

Edit from currently opened subflow

Open the working subflow and click edit properties to edit the subflow properties.

Inputs and outputs

You have the option of designing flows at most with one input input.

But flows can be designed with as many outputs as required Output.

Delete a subflow

You can delete a subflow when it is no longer required.

Double click the required subflow from the node palette and select delete subflow from the subflow working space. Once you delete the subflow, it will no longer be visible in the node palette.


Last update: August 7, 2024