Understanding Subflows

What Is a Subflow?

Within a process flow, you could have subflows. These subflows contain one or more objects. The advantage to creating a subflow is that you can easily run the nodes within a subflow without running the entire process flow. If the subflow links to another node in the entire process flow, the subflow must run to completion before SAS Studio runs the subsequent node.
In this example, there are three nodes: a programming node called PROC PRINT, a node for a subflow, and a query node called CLASS=F. All of the nodes in the subflow node must run before SAS Studio runs the CLASS=F node. By default, the node for a subflow is white.
Example of a Subflow in a Process Flow
Note: SAS Studio cannot run a process flow that contains an empty subflow. An error message appears instead.

Create a New Subflow

To add a subflow to a process flow:
  1. Click Add button and select Sub-Flow. A node for the subflow appears in the process flow.
  2. Select the subflow node and click Open button. Use the breadcrumbs to verify that you are working in the subflow.
    Process Flow 1 > Sub-Flow Breadcrumb
  3. Add the content for the subflow. A subflow can contain other subflows.
  4. To name the subflow node, to provide a brief description for the subflow, and to include any notes, click the Node tab.
    After you enter this information, the subflow node in the process flow contains the name and description that you specified on the Node tab.

Create a Subflow from an Existing Process Flow

You might want to add an existing process flow as a subflow to another process flow.
To add an existing process flow as a subflow:
  1. In the navigation pane, click the Folders section.
  2. Expand the folders in the Folders section until you find the program that you want to add.
  3. Select the process that you want to add, and then drag it in the process flow. (A green check mark indicates that you can add this file to the process flow.)
    In this example, you are adding the existing PF_Example.cpf file to the process flow in SAS Studio.
    Query_CLASSFIT Node in the Process Flow