Understanding Wrapper Flows in Power Automate Desktop

Blueprint users who export to Power Automate may see that some additional subflows are added to their process. These subflows starting with a "w" are referred to as Wrapper Flows.

In Power Automate Desktop, when a call is made to a subflow (i.e. action "Run Subflow"), there is no way to send arguments. A wrapper flow is created for subflow calls that meet certain conditions to allow migrated processes to work.

For example, in the below image. If the Main flow is calling A, and A is calling B, there will be two Wrapper Flows made.

Wrapper Functions

Wrapper Flows will be run before the subflow being called. When you call a subflow, the wrapper flow initializes internal variables and sets arguments for the latest subflow call. The wrapper flow is isolated and should rely only on the output arguments within the subflow being called.

Wrappers server 3 important functions

  1. Variable Initialization - internal variable initialization from source RPA tool
    1. If there is no default value, will be set to NULL
  2. Arguments (Input/Output) - Assigns values
  3. Final step calls the subflow
Naming Conventions

Wrapper Flows have a prefix based on context of the flow that is making the call to the subflow.

  • All wrapper names start with "w".
  • Following the "w", the prefix is based on the flow name making the call
    • If Main is calling a subflow, there is no letter prefix added
    • If the name is multiple words separated by special characters, like underscores, will use the first 2 or 3 letters of each word as prefix
    • If the name is a single word with camel case, it will use the first 2 or 3 uppercase letters as prefix
    • If the name is has only 1 upper case character or is all lower case, will use the first 3 letters of the process name as prefix
    • If first letter is a special character or number, will add underscore as prefix

For example:

  • If Subflow_A is calling Subflow_B, the wrapper would be named wSA_SubflowB.
    • If subflow_a is calling subflow_b, the wrapper would be named wSA_SubflowB.
  • If subflowa is calling subflowb, the wrapper would be named wSUB_subflowb
  • If Main is calling _5550 Subflow, the wrapper would be named w__5550 Subflow
  • is _5550_Main_Process is calling Extract_Data, wrapper would be named wMP__Extract_Data