Skip to content

Commit 0e225b5

Browse files
author
Peter Amstutz
committed
Merge branch 'master' of https://github.com/michael-kotliar/common-workflow-language into michael-kotliar-master
2 parents c50c150 + 961986b commit 0e225b5

File tree

3 files changed

+60
-1
lines changed

3 files changed

+60
-1
lines changed

v1.0/conformance_test_v1.0.yaml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,4 +995,10 @@
995995
args: [-A,'2',-B,baz,-C,'10','9','8','7','6','5','4','3','2','1']
996996
job: v1.0/empty.json
997997
tool: v1.0/inline-js.cwl
998-
doc: Test InlineJavascriptRequirement with multiple expressions in the same tool
998+
doc: Test InlineJavascriptRequirement with multiple expressions in the same tool
999+
1000+
- job: v1.0/sum-job.json
1001+
output:
1002+
result: 12
1003+
tool: v1.0/sum-wf.cwl
1004+
doc: Test step input with multiple sources with multiple types

v1.0/v1.0/sum-job.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"int_1": 5,
3+
"int_2": 7
4+
}

v1.0/v1.0/sum-wf.cwl

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
cwlVersion: v1.0
2+
class: Workflow
3+
4+
requirements:
5+
- class: StepInputExpressionRequirement
6+
- class: MultipleInputFeatureRequirement
7+
- class: InlineJavascriptRequirement
8+
9+
inputs:
10+
int_1:
11+
type:
12+
- int
13+
- string
14+
int_2:
15+
type:
16+
- int
17+
- string
18+
19+
outputs:
20+
result:
21+
type: int
22+
outputSource: sum/result
23+
24+
steps:
25+
sum:
26+
in:
27+
data:
28+
source: [int_1, int_2]
29+
valueFrom: |
30+
${
31+
var sum = 0;
32+
for (var i = 0; i < self.length; i++){
33+
sum += self[i];
34+
};
35+
return sum;
36+
}
37+
out:
38+
- result
39+
run:
40+
class: ExpressionTool
41+
inputs:
42+
data:
43+
type: int
44+
outputs:
45+
result: int
46+
expression: |
47+
${
48+
return {"result": inputs.data};
49+
}

0 commit comments

Comments
 (0)