Hi there
For a workflow I’m writing, I have a step that produces a File output and a following step that consumes a File[]. Currently it is an error to connect these steps directly together so I used an expression. Here is a working example:
#!/usr/bin/env cwl-runner
cwlVersion: v1.2
class: Workflow
requirements:
InlineJavascriptRequirement: {}
StepInputExpressionRequirement: {}
inputs:
infile:
type: File
outputs:
output_value:
type: File
outputSource: step2/outfile
steps:
step1:
in:
infile: infile
out:
- outfile
run:
class: CommandLineTool
inputs:
infile:
type: File
outputs:
outfile:
type: stdout
baseCommand: cat
step2:
in:
infiles:
source: step1/outfile
valueFrom: $([self])
out:
- outfile
run:
class: CommandLineTool
inputs:
infiles:
type: File[]
outputs:
outfile:
type: stdout
baseCommand: cat
This seems some needlessly complicated. Is there a better way to do this?