Skip to main content

Runspace Workflows

Synopsis

Runspace Workflows allow easily architecting a set of steps that will be execute in parallel:

  • For Each step of a workflow, define how many times it should be executed in parallel
  • The results of one step become the input for the next step
  • No need to deal with the details - just provide the business logic for each step

Description

The fundamental system of Runspace Workflow consists of three main components: The Workflow Object, the Worker and the Queue:

  • Workflow Object: Represents the entire workflow and hosts all the interna, including the Workers and the Queues.
  • Worker: An individual step in the workflow, the worker contains the business logic of that step, the configuration and the runspaces actually executing it.
  • Queue: A workflow can have as many queues as desired. They ensure data gets exchanged between steps, usually the output of one step becoming the input of the next step.

Conference Recording

This feature was extensively explained and demonstrated at the PowerShell Summit 2024:

PowerShell Summit 2024: Runspace Workflows

Core Concepts

Examples

While the details on the components may provide value, this system benefits most from some examples: