<p>I have a workflow template which outputs an artifact, this artifact has to be passed to another workflow template as an input. how we can do that? I'm following the way below which is not working</p>
<p>Here is <code>WorflowTemplate1.yaml</code></p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: arfile
spec:
  entrypoint: main
  templates:
    - name: main
      volumes:
        - name: vol
          emptyDir: {}
      inputs:
        parameters:

      script:
        image: &quot;ubuntu&quot;
        volumeMounts:
          - name: vol
            mountPath: &quot;{{inputs.parameters.Odir}}&quot;
        command: [&quot;bash&quot;]
        source: |
          #!/usr/bin/env bash
          echo &quot;This is artifact testing&quot; &gt; /tmp/arfile

      outputs:
        parameters:
          - name: arfile
            path: &quot;{{inputs.parameters.Odir}}/arfile&quot;
</code></pre>
<p>Here is the <code>WorkflowTemplate2.yaml</code></p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
  name: bfile
spec:
  entrypoint: main
  templates:
      - name: main
        volumes:
          - name: vol
            emptyDir: {}
        inputs:
          parameters:
            - name: image
              value: &quot;ubuntu&quot;
            - name: Odir
              value: &quot;/tmp&quot;
          artifacts:
            - name: arfile
              path: /tmp/arfile
        container:
          image: &quot;ubuntu&quot;
          command: [&quot;cat&quot;]
          args:
           - /tmp/arfile
</code></pre>
<p>Here is the workflow which is calling the above two workflow templates.I'm unable to pass artifacts of workflowtemplate1 to workflowtemplate2 from this workflow.</p>
<pre><code>apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
  generateName: apr-
spec:
  entrypoint: main
  templates:
    - name: main
      outputs:
        artifacts:
          - name: arfile
            from: &quot;tasks['dfile'].outputs.artifacts.arfile&quot;

      dag:
        tasks:
          - name: dfile
            templateRef:
              name: arfile
              template: main
            arguments:
              parameters:
                - name: bimg
                  value: &quot;ubuntu&quot;

          - name: bci
            depends: dfile
            templateRef:
              name: bfile
              template: main
            arguments:
              parameters:
                - name: img
                  value: &quot;ubuntu&quot;
              artifacts:
                - name: arfile
                  from: &quot;{{tasks.dfile.outputs.artifacts.arfile}}&quot;
</code></pre>
<p>What's wrong I'm doing here?</p>

<p>I think I found the issue. I need to use <code>artifacts</code> instead of <code>parameters</code> in <code>WorkflowTemplate1.yaml</code> in outputs code block</p>
<p>here's the fix</p>
<pre><code>outputs:
  artifacts:
    - name: arfile
      path: &quot;{{inputs.parameters.Odir}}/arfile&quot;
</code></pre>
