cwlVersion: v1.2 $namespaces: s: https://schema.org/ cwltool: http://commonwl.org/cwltool# s:softwareVersion: 1.0.0 $graph: - class: Workflow id: pipeline-tree doc: ... inputs: dir: type: Directory doc: Directory to list files steps: step_1: run: '#tree' in: dir: dir out: - file_tree - metadata step_2: run: '#2stac2' in: file1: step_1/file_tree metadata: step_1/metadata out: - results outputs: - id: wf_outputs outputSource: - step_2/results type: Directory - class: CommandLineTool baseCommand: tree id: tree arguments: - --dir - valueFrom: $( inputs.dir ) inputs: dir: type: Directory doc: directory outputs: file_tree: type: File outputBinding: glob: "result/file_tree.txt" doc: tree list s:fileFormat: "application/text" metadata: type: File outputBinding: glob: "result/metadata.json" doc: tree list s:fileFormat: "application/json" requirements: NetworkAccess: networkAccess: true ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/tree:1.0.0 - class: CommandLineTool baseCommand: 2stac id: 2stac2 arguments: - valueFrom: $( function () { var files_array = []; Object.keys(inputs).forEach(element => { if(element != 'metadata') { files_array.push('--files'); files_array.push(inputs[element]); } else { files_array.push('--metadata'); files_array.push(inputs[element]); } }); return files_array; }()) inputs: file1: type: File doc: List directory tree metadata: type: File doc: The resulting metadata of the previous model to insert in STAC s:name: Input metadata file s:description: The resulting metadata of the previous model to insert in STAC s:keywords: - metadata - File s:fileFormat: "application/json" outputs: results: outputBinding: glob: . type: Directory doc: STAC output requirements: EnvVarRequirement: envDef: PATH: /srv/conda/envs/model-env/bin:/srv/conda/bin:/srv/conda/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ResourceRequirement: {} InlineJavascriptRequirement: {} DockerRequirement: dockerPull: iliad-repository.inesctec.pt/2stac2:1.0.0