-
-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
When a step input is transformed with valueFrom
and is used in when
expression, from the specification and conformance tests it's not clear should the when
expression use the original or the transformed value.
Minimal example:
class: Workflow
cwlVersion: v1.2
inputs:
- id: input
type: string?
- id: custom_input
type: boolean
outputs:
- id: output
outputSource:
- step1/output
type: string?
steps:
- id: step1
in:
- id: input
source: input
- id: custom_input
source: custom_input
valueFrom: "$(!self)"
out:
- id: output
run:
class: CommandLineTool
cwlVersion: v1.2
baseCommand:
- echo
inputs:
- id: input
type: string?
inputBinding:
position: 0
outputs:
- id: output
type: string?
outputBinding:
outputEval: "$(inputs.input)"
when: "$(inputs.custom_input)"
requirements:
- class: InlineJavascriptRequirement
- class: StepInputExpressionRequirement
When running with
custom_input: true
The transformation converts the value to false
and the step is skipped if the transformed value is used, but it is not skipped if the original value is used. Right now cwltool
uses the transformed value, just wanted to make sure this is expected and that it gets documented. The example can be used as a conformance test.
Metadata
Metadata
Assignees
Labels
No labels