ResearchObject / workflow-run-crate

Workflow Run RO-Crate profile
https://www.researchobject.org/workflow-run-crate/
Apache License 2.0
8 stars 9 forks source link

cwlprov_to_crate: support for subworkflows #28

Closed simleo closed 1 year ago

simleo commented 1 year ago

Adds support for nested workflows, or subworkflows. Subworkflows are modeled like the main workflow, except that they don't have File as a type (and thus they are contextual entities):

{
    "@id": "packed.cwl#revsort.cwl",
    "@type": ["SoftwareSourceCode", "ComputationalWorkflow", "HowTo"],
    "hasPart": [
        {"@id": "packed.cwl#revtool.cwl"},
        {"@id": "packed.cwl#sorttool.cwl"}
    ],
    ...
}

This is due to the fact that they correspond to sections in packed.cwl. In the general case, subworkflows could be stored in separate files, in which case they would be represented by data entities that include File among their types (just like the main workflow).