title: What is the output of loop task in argo?
body: <p>As per the <a href="https://github.com/argoproj/argo/blob/release-3.0/docs/variables.md#dag-templates" rel="nofollow noreferrer">Argo DAG template documentation</a>.</p>
  <blockquote>
  <p><code>tasks.&lt;TASKNAME&gt;.outputs.parameters</code>: When the previous task uses
  'withItems' or 'withParams', this contains a JSON array of the output
  parameter maps of each invocation</p>
  </blockquote>
  <p>When trying with the following simple workflow:</p>
  <pre class="lang-yaml prettyprint-override"><code>apiVersion: argoproj.io/v1alpha1
  kind: Workflow
  metadata:
    generateName: test-workflow-
  spec:
    entrypoint: start
    templates:
    - name: start
      dag:
        tasks:
          - name: with-items
            template: hello-letter
            arguments:
              parameters:
              - name: input-letter
                value: &quot;{{item}}&quot;
            withItems:
            - A
            - B
            - C
          - name: show-result
            dependencies:
            - with-items
            template: echo-result
            arguments:
              parameters:
              - name: input
                value: &quot;{{tasks.with-items.outputs.parameters}}&quot;
  
    - name: hello-letter
      inputs:
        parameters:
        - name: input-letter
      outputs:
        parameters:
        - name: output-letter
          value: &quot;{{inputs.parameters.input-letter}}&quot;
      script:
        image: alpine
        command: [&quot;sh&quot;]
        source: |
          echo &quot;{{inputs.parameters.input-letter}}&quot;
  
    - name: echo-result
      inputs:
        parameters:
        - name: input
      outputs:
        parameters:
        - name: output
          value: &quot;{{inputs.parameters.input}}&quot;
      script:
        image: alpine
        command: [&quot;sh&quot;]
        source: |
          echo {{inputs.parameters.input}}
  </code></pre>
  <p>I get the following error :
  <em><code>Failed to submit workflow: templates.start.tasks.show-result failed to resolve {{tasks.with-items.outputs.parameters}}</code></em></p>
  <p>Argo version (running in a minikube cluster)</p>
  <pre class="lang-yaml prettyprint-override"><code>argo: v2.10.0+195c6d8.dirty
    BuildDate: 2020-08-18T23:06:32Z
    GitCommit: 195c6d8310a70b07043b9df5c988d5a62dafe00d
    GitTreeState: dirty
    GitTag: v2.10.0
    GoVersion: go1.13.4
    Compiler: gc
    Platform: darwin/amd64
  </code></pre>
  <p>Same error in Argo 2.8.1, although, using <code>.result</code> instead of <code>.parameters</code> in the show-result task worked fine (result was <code>[A,B,C]</code>), but doesn't work in 2.10 anymore</p>
  <pre class="lang-yaml prettyprint-override"><code>        - name: show-result
            dependencies:
            - with-items
            template: echo-result
            arguments:
              parameters:
              - name: input
                value: &quot;{{tasks.with-items.outputs.result}}&quot;
  </code></pre>
  <p>The result:</p>
  <pre class="lang-yaml prettyprint-override"><code>STEP                                TEMPLATE      PODNAME                                     DURATION  MESSAGE
   ⚠ test-workflow-parallelism-xngg4  start                                                                                                                     
   ├-✔ with-items(0:A)                hello-letter  test-workflow-parallelism-xngg4-3307649634  6s                                                              
   ├-✔ with-items(1:B)                hello-letter  test-workflow-parallelism-xngg4-768315880   7s                                                              
   ├-✔ with-items(2:C)                hello-letter  test-workflow-parallelism-xngg4-2631126026  9s                                                              
   └-⚠ show-result                    echo-result                                                         invalid character 'A' looking for beginning of value
  </code></pre>
  <p>I also tried to change the show-result task as:</p>
  <pre class="lang-yaml prettyprint-override"><code>        - name: show-result
            dependencies:
            - with-items
            template: echo-result
            arguments:
              parameters:
              - name: input
                value: &quot;{{tasks.with-items.outputs.parameters.output-letter}}&quot;
  </code></pre>
  <p>Executes without no errors:</p>
  <pre class="lang-yaml prettyprint-override"><code>STEP                                TEMPLATE      PODNAME                                     DURATION  MESSAGE
   ✔ test-workflow-parallelism-qvp72  start                                                                 
   ├-✔ with-items(0:A)                hello-letter  test-workflow-parallelism-qvp72-4221274474  8s          
   ├-✔ with-items(1:B)                hello-letter  test-workflow-parallelism-qvp72-112866000   9s          
   ├-✔ with-items(2:C)                hello-letter  test-workflow-parallelism-qvp72-1975676146  6s          
   └-✔ show-result                    echo-result   test-workflow-parallelism-qvp72-3460867848  3s 
  </code></pre>
  <p>But the parameter is not replaced by the value:</p>
  <pre class="lang-sh prettyprint-override"><code>argo logs test-workflow-parallelism-qvp72
  test-workflow-parallelism-qvp72-1975676146: 2020-08-25T14:52:50.622496755Z C
  test-workflow-parallelism-qvp72-4221274474: 2020-08-25T14:52:52.228602517Z A
  test-workflow-parallelism-qvp72-112866000: 2020-08-25T14:52:53.664320195Z B
  test-workflow-parallelism-qvp72-3460867848: 2020-08-25T14:52:59.628892135Z {{tasks.with-items.outputs.parameters.output-letter}}
  </code></pre>
  <p>I don't understand what to expect as the output of a loop! What did I miss? Is there a way to find out what's happening?</p>