Skip to content

Commit 345c449

Browse files
author
Peter Amstutz
committed
Clarify that default values apply prior to scattering and evaluating valueFrom.
1 parent d200b3f commit 345c449

File tree

3 files changed

+13
-8
lines changed

3 files changed

+13
-8
lines changed

v1.0/CommandLineTool.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -203,11 +203,14 @@ $graph:
203203
If `valueFrom` is an expression, evaluate the expression to yield the
204204
actual value to use to build the command line and apply the binding
205205
rules above. If the inputBinding is associated with an input
206-
parameter, the value of `self` in the expression will be the value of the
207-
input parameter.
206+
parameter, the value of `self` in the expression will be the value of
207+
the input parameter. Input parameter defaults (as specified by the
208+
`InputParameter.default` field) must be applied before evaluating the
209+
expression.
208210
209211
When a binding is part of the `CommandLineTool.arguments` field,
210212
the `valueFrom` field is required.
213+
211214
- name: shellQuote
212215
type: boolean?
213216
doc: |

v1.0/Process.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,8 @@ $graph:
569569
doc: |
570570
The default value to use for this parameter if the parameter is missing
571571
from the input object, or if the value of the parameter in the input
572-
object is `null`.
572+
object is `null`. Default values are applied before evaluating expressions
573+
(e.g. dependent `valueFrom` fields).
573574
574575
- name: type
575576
type:

v1.0/Workflow.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,8 @@ $graph:
261261
type: ["null", Any]
262262
doc: |
263263
The default value for this parameter to use if either there is no
264-
`source` field, or the value produced by the `source` is `null`.
264+
`source` field, or the value produced by the `source` is `null`. The
265+
default must be applied prior to scattering or evaluating `valueFrom`.
265266
jsonldPredicate:
266267
_id: "cwl:default"
267268
noLinkCheck: true
@@ -287,10 +288,10 @@ $graph:
287288
288289
The value of `inputs` in the parameter reference or expression must be
289290
the input object to the workflow step after assigning the `source`
290-
values and then scattering. The order of evaluating `valueFrom` among
291-
step input parameters is undefined and the result of evaluating
292-
`valueFrom` on a parameter must not be visible to evaluation of
293-
`valueFrom` on other parameters.
291+
values, applying `default`, and then scattering. The order of
292+
evaluating `valueFrom` among step input parameters is undefined and the
293+
result of evaluating `valueFrom` on a parameter must not be visible to
294+
evaluation of `valueFrom` on other parameters.
294295
295296
296297
- type: record

0 commit comments

Comments
 (0)