Merge branch '8784-dir-listings'
[arvados.git] / sdk / cwl / tests / wf / scatter2.cwl
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 class: Workflow
6 cwlVersion: v1.0
7 $namespaces:
8   arv: "http://arvados.org/cwl#"
9 inputs:
10   sleeptime:
11     type: int[]
12     default: [5]
13 outputs:
14   out:
15     type: string[]
16     outputSource: scatterstep/out
17 requirements:
18   SubworkflowFeatureRequirement: {}
19   ScatterFeatureRequirement: {}
20   InlineJavascriptRequirement: {}
21   StepInputExpressionRequirement: {}
22 steps:
23   scatterstep:
24     in:
25       sleeptime: sleeptime
26     out: [out]
27     scatter: sleeptime
28     hints:
29       - class: arv:RunInSingleContainer
30     run:
31       class: Workflow
32       id: mysub
33       inputs:
34         sleeptime: int
35       outputs:
36         out:
37           type: string
38           outputSource: sleep1/out
39       steps:
40         sleep1:
41           in:
42             sleeptime: sleeptime
43             blurb:
44               valueFrom: |
45                 ${
46                   return String(inputs.sleeptime) + "b";
47                 }
48           out: [out]
49           run:
50             class: CommandLineTool
51             id: subtool
52             inputs:
53               sleeptime:
54                 type: int
55                 inputBinding: {position: 1}
56             outputs:
57               out:
58                 type: string
59                 outputBinding:
60                   outputEval: "out"
61             baseCommand: sleep