Workflow Hub do not require CWL - in fact Workflow Hub is not aiming itself to do any execution, although it will where possible link to possible execution platforms.
For instance we are in EOSC-Life trying to set up automated testing of workflows where the Life Monitor will consume the RO-Crate and look for tests to execute. We have not formalized yet how those are specified, as they should work the same for non-CWL workflows - see discussion on using intermediate JSON for now.
Given an RO-Crate with many files you can find the “main” workflow by looking for the
mainEntity property, e.g. from https://dev.workflowhub.eu/workflows/132/ro_crate?version=1 (a Galaxy workflow)
"name": "1 - read pre-processing",
This at the moment is just a convention for when uploading from a GitHub repository - note that at the moment the Workflow Hub UI when given a single CWL file will not recursively add its file dependencies (e.g. neighbouring *.cwl tools) to the RO-Crate - thus native CWL registrations should primarily be done from GitHub.
CWL can also be used in Workflow Hub to provide the abstract workflow of a non-CWL workflow, using CWL 1.2 Operation type - in that case it’s a single sibling file to the native workflow.
Of course one additional challenge here is identifying the workflow languages programmatically - CWL luckily have permalinks like https://w3id.org/cwl/v1.1/
Another is that you will need some set of inputs (specially for automated testing) - like a job file. With cwltool you can actually make job files executable as well:
However I don’t think that
cwl:tool trick works with other
cwlref-runner implementations so usually you need to pair the workflow engine, the workflow definition and the workflow inputs, and potentially particular engine options. There is a dangerous possibility that this could also be described as an outer cwl tool that executes the CWL engine…!
(Much simpler: You could instead make a outer CWL workflow that just binds all the inputs)
For your run-CWL-from-Galaxy you could also consider using
cwltool --pack first to make the workflow project into a single CWL file (which arguably is no longer human editable) - otherwise you will need to preserve the original structure with its tool imports etc.