rabix / composer

Visual and code editor for Common Workflow Language
http://rabix.io/
Apache License 2.0
301 stars 74 forks source link

Rabix composer appears to generate invalid CWL according to `cwltool --validate` #444

Open zymergen-mbarton opened 4 years ago

zymergen-mbarton commented 4 years ago

I have a relatively large workflow that I have created using rabix composer and then exported to YAML using both the command line rabix composer and the Seven Bridges web editor. In both cases I get an error when running cwltool --validate on the exported file. The errors appear to be related to unexpected fields. For example:

ERROR Tool definition failed validation:
workflow.cwl:1:1:         Object
                                 `workflow.cwl#production-workflow/workflow/1`
                                 is not valid because
                                   tried `Workflow` but
workflow.cwl:269:1:         the `steps` field is not valid because
                                       tried array of <WorkflowStep> but
workflow.cwl:2873:5:           item is invalid because
workflow.cwl:2879:5:             the `run` field is not valid because
workflow.cwl:2887:7:               the `inputs` field is not valid because
workflow.cwl:2888:11:               item is invalid because
                                                 * invalid field `prefix`, expected one of:
                                                 'label', 'secondaryFiles', 'streamable', 'doc', 'id', 'format',
                                                 'inputBinding', 'default', 'type'
workflow.cwl:2889:11:                 * invalid field `separate`, expected one of:
                                                 'label', 'secondaryFiles', 'streamable', 'doc', 'id', 'format',
                                                 'inputBinding', 'default', 'type'

The offending fields appear to be prefix and separate.

I wonder if you have any suggestions on how to generate a valid cwl file from exporting a workflow created in rabix composer? Thank you.

ghost commented 4 years ago

Hi @zymergen-mbarton thank you for reporting this issue and sorry you are having problems. Would it be possible to share the workflow? We can do this via the SB issues system (or you can mail me directly) if this is acceptable. Otherwise, would it be possible to share some notable features of the workflow code, so that we can track down why this may be happening? Thank you!

ghost commented 4 years ago

cc: @bogdang989

zymergen-mbarton commented 4 years ago

Thanks @kaushik-work for responding so quickly, your prompt replies are much appreciated. I can't share the workflow here unfortunately, however I will email separately.

As for notable features, a potential reproducible test case might be exporting a workflow with a couple of tools using prefix and separate arguments, and also containing expression types too. I mention expressions because I also saw another error after manually editing fixes for the errors around prefix and separate to see if that solved the issue. This error seemed to be about the closing of the JS expression.

ERROR I'm sorry, I couldn't load this CWL file, try again with --debug for more information.
The error was: Substitution error, unfinished block starting at position 1: ${