Skip to content

Python Workflows: How to implement a ForEach / Iterate edge for processing collections? #4267

@cs609

Description

@cs609

hi @eavanvalkenburg, @markwallace-microsoft
I'm looking for guidance on how to implement a foreach / iterate pattern in Python
workflows — i.e., iterating over each element in a collection and executing a sequence
of actions for every item.

Context

I've reviewed the Edges documentation
which covers:

  • Conditional Edges — binary routing (if/else)
  • Switch-Case Edges — multi-branch routing
  • Multi-Selection Edges — fan-out to multiple targets
  • Fan-in Edges — aggregation

However, there is no documented foreach / iterate edge pattern for Python workflows
that allows looping over a collection and running a sub-workflow per item.

  1. What is the recommended pattern for implementing foreach in Python workflows today?
  2. Is a built-in foreach edge type planned for the Python SDK ?

Metadata

Metadata

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions