Relationships
#504 Allow global arguments in direct type execution (workflow fan-out)
Opened by nblair2 · 5/31/2026· Shipped 6/2/2026
Problem
Workflows can fan out over a list with forEach, but each per-item model instance still needs a pre-created model definition. Direct type execution (the stepTask modelType + modelName form) accepts only method inputs — there is no field for global arguments. So when each item needs its own connection/config global args (e.g. a per-item base path or credential reference), you must hand-create one definition per item (or generate them externally), which defeats the point of a data-driven forEach.
Proposed solution
Allow supplying global arguments in direct type execution — e.g. a globalArgs map on the model_method step task — so a forEach step can instantiate a typed, fully-configured instance per item (distinct modelName → distinct lock) without a persisted definition. Alternatively, a native "instance set / template" that materializes N instances from a list parameter.
Alternatives considered
- Pre-creating N model definitions (works, but the workflow's list is no longer the single source of truth; adding an item means creating more definitions).
- An external script generator (a tool to maintain; not swamp-native).
Shipped
Click a lifecycle step above to view its details.