Skip to main content
← Back to list
01Issue
FeatureShippedSwamp CLI
Assigneesstack72

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).
02Bog Flow
OPENTRIAGEDIN PROGRESSSHIPPED+ 1 MOREASSIGNED+ 2 MOREREVIEW+ 3 MOREPR_MERGED+ 1 MORECONTRIBUTOR_NOTIFIED

Shipped

6/2/2026, 6:02:42 PM

Click a lifecycle step above to view its details.

03Sludge Pulse
stack72 assigned stack726/2/2026, 9:44:57 AM
Editable. Press Enter to edit.

stack72 commented 6/2/2026, 6:02:49 PM

Thanks @nblair2 for reporting this! The fix has been merged and a release is on its way. We appreciate your contribution to swamp.

Sign in to post a ripple.