Bug #22554
openSupport launching workflows with optional inputs
Description
source:tools/cluster-activity/cluster-activity.cwl has the following inputs:
inputs:
reporting_days: int?
reporting_start: string?
reporting_end: string?
These are optional because you can provide some subset of them, but it's an error to specify all of them.
You cannot launch this workflow from Workbench with a specified date range:
- If you leave
reporting_days
empty, the workflow will fail to start with the error:../../lib/cwl/cwl.input.json:1:227: the 'reporting_days' field is not valid because tried int but "''" is not int
- If you specify
reporting_days
=0, our own cluster activity script will complain that this is mutually exclusive withreporting_start
orreporting_end
.
It should be possible to completely omit inputs just like it is in YAML.
Solution¶
If a field is marked as optional (this looks like "type": ["null", "string"]) then an empty text input field in the interface should be emitted as "null" and not empty string.
Updated by Peter Amstutz about 2 months ago
- Target version set to Development 2025-03-19
Updated by Peter Amstutz about 2 months ago
- Target version changed from Development 2025-03-19 to Development 2025-02-26
Updated by Peter Amstutz about 2 months ago
If a field is marked as optional (this looks like "type": ["null", "string"]
) then an empty text input field in the interface should be emitted as "null" and not empty string.
Updated by Peter Amstutz about 2 months ago
- Target version changed from Development 2025-02-26 to Development 2025-03-19
Updated by Brett Smith 28 days ago
- Target version changed from Development 2025-03-19 to Development 2025-02-26
Updated by Brett Smith 27 days ago
- Target version changed from Development 2025-02-26 to Development 2025-03-19
Updated by Peter Amstutz 20 days ago
- Target version changed from Development 2025-03-19 to Development 2025-04-02
Updated by Brett Smith 1 day ago
From standup discussion: for any optional input, if the user did not provide an input, Workbench should set that input to null
in the container request.
Based on the error message, right now it looks like it always uses the empty string. This is valid for string?
but it may not generate the results the user wants. It is definitely not valid for other optional types like int?
here.
Updated by Brett Smith 1 day ago
I have registered the workflow in question at tordo-j7d0g-ppkb6bq7gc0n6dn. Feel free to play with it. All of the inputs are optional, so you should be able to generate a useful report with the barest minimum of inputs, like reporting_start
and reporting_end
.