<p>I have broken down my workflow scenario into 2 separate <code>WorkflowTemplates</code>. <code>outer-template</code> would just define the steps and <code>inner-template</code> would hold that <code>job</code> definition that will spin up desired container, with all other fancy stuff. Now when I submit a request <code>request.yaml</code>, it does pass the parameter <code>message</code> down to outer and inner template and fails with this error:</p>
<pre><code>    hello-59jg8-394098346:
      Boundary ID:  hello-59jg8-1953291600
      Children:
        hello-59jg8-534805352
      Display Name:    [0]
      Finished At:     2021-06-15T00:41:45Z
      Id:              hello-59jg8-394098346
      Message:         child 'hello-59jg8[0].init-step[0].step-1' errored
      Name:            hello-59jg8[0].init-step[0]
      Phase:           Error
      Started At:      2021-06-15T00:41:45Z
      Template Name:   HelloWorld
      Template Scope:  namespaced/outer-template
      Type:            StepGroup
    hello-59jg8-534805352:
      Boundary ID:   hello-59jg8-1953291600
      Display Name:  step-1
      Finished At:   2021-06-15T00:41:45Z
      Id:            hello-59jg8-534805352
      Message:       inputs.parameters.message was not supplied
      Name:          hello-59jg8[0].init-step[0].step-1
      Phase:         Error
      Started At:    2021-06-15T00:41:45Z
      Template Ref:
        Name:          inner-template
        Template:      InnerJob
      Template Scope:  namespaced/outer-template
      Type:            Skipped
  Phase:               Failed
  Started At:          2021-06-15T00:41:45Z
  Stored Templates:
</code></pre>
<p>Below 2 are <code>WorkflowTemplate</code>s and third one is the request.</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: inner-template
  namespace: cali
  labels:
    workflows.argoproj.io/controller-instanceid: cali
spec:
  templates:
    - name: InnerJob
      metadata:
        annotations:
          sidecar.istio.io/inject: &quot;false&quot;
      inputs:
        parameters:
          - name: message
          - name: stepName
            value: &quot;&quot;
      resource:
        action: create
        successCondition: status.succeeded &gt; 0
        failureCondition: status.failed &gt; 0
        manifest: |
          apiVersion: batch/v1
          kind: Job
          metadata:
            generateName: hello-pod-
            annotations:
              sidecar.istio.io/inject: &quot;false&quot;
          spec:
            template:
              metadata:
                annotations:
                  sidecar.istio.io/inject: &quot;false&quot;
              spec:
                containers:
                  - name: hellopods
                    image: centos:7
                    command: [sh, -c]
                    args: [&quot;echo ${message}; sleep 5; echo done; exit 0&quot;]
                    env:
                      - name: message
                        value: &quot;{{inputs.parameters.message}}&quot;
                      - name: stepName
                        value: &quot;{{inputs.parameters.stepName}}&quot;
                restartPolicy: Never
      outputs:
        parameters:
          - name: job-name
            valueFrom:
              jsonPath: '{.metadata.name}'
          - name: job-obj
            valueFrom:
              jqFilter: '.'
</code></pre>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: outer-template
  namespace: cali
  labels:
    workflows.argoproj.io/controller-instanceid: cali
spec:
  entrypoint: HelloWorld
  templates:
    - name: HelloWorld
      inputs:
        parameters:
          - name: message
      steps:
        - - name: step-1
            templateRef:
              name: inner-template
              template: InnerJob
            arguments:
              parameters:
                - name: message
                - name: stepName
                  value: &quot;this is step 1&quot;
        - - name: step-2
            templateRef:
              name: inner-template
              template: InnerJob
            arguments:
              parameters:
                - name: message
                - name: stepName
                  value: &quot;this is step 2&quot;
</code></pre>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: hello-
  namespace: cali
  labels:
    workflows.argoproj.io/controller-instanceid: cali
spec:
  entrypoint: HelloWorld
  serviceAccountName: argo
  templates:
      - name: HelloWorld
        steps:
          - - arguments:
                parameters:
                  - name: message
                    value: &quot;Hello World.....&quot;
              name: init-step
              templateRef:
                name: outer-template
                template: HelloWorld
</code></pre>

colossal
<p>When passing an argument to a template in a step, you have to explicitly set the argument value.</p>
<p>In the <code>outer-template</code> WorkflowTemplate, you invoke <code>inner-template</code> twice. In each case you have half-specified the <code>message</code> argument. You have to also set the <code>value</code> for each parameter.</p>
<p>You should set <code>value: &quot;{{inputs.parameters.message}}&quot;</code> in <code>step-1</code> and <code>step-2</code>. That will pull the <code>message</code> input parameter from <code>outer-template.HelloWorld</code>.</p>
<pre class="lang-yaml prettyprint-override"><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: outer-template
  namespace: cali
  labels:
    workflows.argoproj.io/controller-instanceid: cali
spec:
  entrypoint: HelloWorld
  templates:
    - name: HelloWorld
      inputs:
        parameters:
          - name: message
      steps:
        - - name: step-1
            templateRef:
              name: inner-template
              template: InnerJob
            arguments:
              parameters:
                - name: message
                  value: &quot;{{inputs.parameters.message}}&quot;
                - name: stepName
                  value: &quot;this is step 1&quot;
        - - name: step-2
            templateRef:
              name: inner-template
              template: InnerJob
            arguments:
              parameters:
                - name: message
                  value: &quot;{{inputs.parameters.message}}&quot;
                - name: stepName
                  value: &quot;this is step 2&quot;
</code></pre>
