Spawn Sub Flow

Last updated on
7 May 2019

Some workflow patterns require the creation of separate workflows from the main or "parent" workflow.  When designing workflows, spawning a sub-flow may be a cleaner workflow solution than to expand the size and scope of a parent process.  Included in Masetro RC3 Release, the Spawn Sub Flow task allows Maestro administrators to create a new unmanaged Maestro process via a simple-to-use task. 

Use cases:

  • A parent workflow requires an exception management process to be started to manage an event that has occurred.  The exception process is used by many other workflows.
  • A parent workflow needs to create N-number of the same processes in a loop. 
  • A parent workflow needs to branch to a different workflow to manage a gated approval.

Maestro-Managed vs. Unmanaged Sub-Flows

Maestro RC3 does not yet contain the capability to have a Maestro-managed process.  Managed Maestro Processes will appear in later versions of Maestro and this documentation will be updated accordingly. However, it is important to understand what a Maestro-managed sub-flow will be capable of doing vs. an unmanaged sub-flow. 

A Maestro-managed sub-flow:

  • The parent process spawns the configured Maestro template and passes selected process variables to the child.
  • The parent process passes special control process variables to the child.
  • The child process is able to signal the parent of completion.
  • The parent process is able to force a child process to terminate.
  • The parent process is able to stall operation until all child processes are completed.
  • The parent process is able to spawn N number of the same child processes and manage which child processes are complete.
  • The parent process is able to retain the completion status of a child process for further processing.

An unmanaged sub-flow:

  • The parent process spawns the configured Maestro template and passes selected process variables to the child.
  • The child process executes with no further involvement from or with the parent.

Configuring the Spawn Sub Flow Task

In the Template Builder, add a new task of type Spawn Sub Flow to your workflow. Once it's added, click on the Edit menu icon on the top left corner of the task. The following image is the edit dialog for setting the Spawn Sub Flow task properties.

Maestro Spawn Sub Flow Task Edit Options

The configuration options for this task are:

Choose the Maestro Template:  Choose which Maestro Template you wish to spawn as a new sub-flow.

Variable Selection: You are able to choose which variables from your current template you wish to inject into the sub-flow process.  The spawned child process' variables are untouched and will not have parent process variables added to its template variable definitions.  Rather, upon spawning of the child process, the selected parent's variables are injected into the child's process variables on-the-fly, allowing you to use those variable values within your child process.

For example, if you choose the initiator variable from the variable selection:

  • The selected Maestro Template will not have any new template variables added to its definition.
  • Upon this Spawn Sub Flow task executing, the selected Maestro Template will be put into production and the parent's initiator variable will be auto-create in the child process, prefixed with "maestro_parent_". 
  • The resulting variable in the child will be maestro_parent_initiator.

Help improve this page

Page status: No known problems

You can: