Skip to main content
← Back to list
01Issue
BugClosedSwamp Club
AssigneesNone

Workflow step task.inputs not forwarded as method arguments at runtime

Opened by swampadmin · 11/22/2024

Description

When a workflow step defines task.inputs to pass arguments to a model_method, the inputs are correctly resolved during swamp workflow evaluate but are not forwarded as method arguments during swamp workflow run. The method receives undefined for all input fields, causing argument validation to fail.

Steps to Reproduce

  1. Create a workflow with a step that passes inputs to a method:
steps:
  - name: get-service
    task:
      type: model_method
      modelIdOrName: ${{ inputs.serviceModel }}
      methodName: get
      inputs:
        serviceName: ${{ inputs.serviceName }}
  1. Evaluate the workflow — expressions resolve correctly:
swamp workflow evaluate service-diagnose --json   --input '{"serviceModel":"my-svc","serviceName":"backend-svc"}'

Output shows task.inputs.serviceName: "backend-svc" as expected.

  1. Run the workflow:
swamp workflow run service-diagnose --last-evaluated --json

Step fails with:

Method arguments validation failed: Invalid input: expected string, received undefined at "serviceName"

Expected Behavior

task.inputs values should be forwarded as method arguments when executing the step, matching what evaluate produces.

Actual Behavior

The method is invoked with no arguments — task.inputs is ignored at runtime. Steps that call argument-free methods (e.g., list, getWarnings) work fine in the same workflow.

Environment

  • swamp version: 20260226.174314.0-sha.0a12c9ff
  • OS: macOS (Darwin 22.6.0)

Summary

This bug affects the workflow execution service when dispatching model_method steps that define task.inputs. The fix would involve ensuring the step runner reads task.inputs from the evaluated step definition and passes them as method arguments when invoking the model method. The schema already declares inputs as a valid field on model_method tasks, and evaluation resolves expressions within it correctly — only the runtime dispatch is missing the forwarding.

02Bog Flow
OPENTRIAGEDIN PROGRESSCLOSED

Closed

No activity in this phase yet.

03Sludge Pulse

Sign in to post a ripple.