Question: CWL: Allowed values for parameters
gravatar for unique_g
23 months ago by
unique_g80 wrote:

We are interested in developing a web service that automatically renders CWL workflows and interfaces selected parameters for the user to set via the web service's UI (e.g. by rendering parameter-specific Angular components). In the interest of user experience and security, the values set by the user for a given parameter must be valid (i.e. not causing the Workflow or at the very least the corresponding CommandLineTool to fail).

In order to achieve this, I am currently seeing some potential problems (see related questions), and I am wondering if there are CWL-compliant solutions existing or under discussion for these:

Is there a consensus on how to specify the set of allowed values for a given parameter? Examples for allowed values would be sets of strings, number/integer intervals, regular expressions, globs or mathematical series.

I think that defining a corresponding parameter field and syntax in the CWL specification has a lot going for it, as it would help to enforce the correct usage of CommandLineTools and allow specification-conforming validation routines to be developed, both at the level of frontends and at execution level.

While I am aware that we can come up with our own custom solution, I would feel more comfortable following a consensus on this, so if there isn't already a discussion going on for this, please let me know your opinion and where would be the right place to discuss/develop such a feature.

cwl • 921 views
ADD COMMENTlink modified 18 months ago by Michael R. Crusoe1.4k • written 23 months ago by unique_g80

I have identical needs.

ADD REPLYlink written 17 months ago by eduardo10
gravatar for j.pfeuffer
18 months ago by
j.pfeuffer10 wrote:

Just wanted to bump this question. We are in the process of evaluating a migration from our Common Tool Description format to CWL and parameter restrictions seem to be the only part that is missing for a full support. Have you gotten any replies on other platforms (e.g. Github)?

ADD COMMENTlink written 18 months ago by j.pfeuffer10

Following Michael's suggestion to work something out here, I would definitely be interested to tackle this together. Do you have any experience or suggestions on how to work on this? Would anything on be of any use? And anyway, how did you solve this in your Common Tool Description? Could we just use and possibly extend that?

ADD REPLYlink written 18 months ago by unique_g80

Hey! Great to hear from you. In our own Common Tool Description, the support is also not complete since we only have a comma separated list of restrictions on string parameters and a colon separated range (min/max) for numeric (int or double/float) parameters. In the beginning I think we should evaluate what needs or can be supported without making the schemas too complex. You had some good suggestions on more general concepts like regular expressions, globs or mathematical series. I have never worked on a JSON based schema but seems to go in the right direction. I will have a look, too.

ADD REPLYlink written 18 months ago by j.pfeuffer10
gravatar for Michael R. Crusoe
18 months ago by
Common Workflow Language project
Michael R. Crusoe1.4k wrote:

Hello unique_g,

For strings you can set the list of allowed values using Enums. See for how to use

We've had some discussion about this before, but no syntax was suggested nor implemented as a test. Seems j.pfeuffer has a similar need, perhaps you two could collaborate and test out some new syntax for potential inclusion?

ADD COMMENTlink written 18 months ago by Michael R. Crusoe1.4k
Please log in to add an answer.


Use of this site constitutes acceptance of our User Agreement and Privacy Policy.
Powered by Biostar version 2.3.0
Traffic: 1200 users visited in the last hour