Skip to content

WorkflowStepInput.param vs naming convention #60

Closed

Description

Currently, according to spec, step ports are connected with "implementation" ports using an IRI from param property of WorkflowStepInput. An alternative option we discussed was to use naming convention where step inputs should be named #<step_id>/<impl_port_id>.

Example with IRI:

steps:
  - inputs:
      - { param: "revtool.cwl#input", connect: { source: "#input" } }
    outputs:
      - { id: "#reversed", param: "revtool.cwl#output" }
    run: { import: revtool.cwl }

Example with naming convention:

steps:
  - id: "#step1"
    inputs: 
      - {id: "#step1/input", connect: { source: "#input" }}
    outputs:
      - { id: "#step1/output"}
    run: { import: revtool.cwl }

The key difference is that naming convention allows us to recognize an "interface" of a step and easily switch out one implementation for another. For example, if we had a "variant calling" step which has inputs "reference" and "fastq_mates" and a "vcf" output, one can create subworkflows matching that interface and switch implementations by just modifying the run property.

I suggest we at least keep the second option as fallback: if param is not specified, match ports using the naming convention.

Activity

  1. ghost added this to the Draft 2 milestone on Jun 10, 2015
  2. tetron commented on Jun 12, 2015

    @tetron
    Member

    This does sort of violate the spirit of linked data, but I think this makes sense if we slightly redefine the semantics of a workflow step this way, with one suggested modification to use '.' instead of '/':

    1. inputs describes how to build the input object for the process invocation.
    2. The name used in the input object field is the portion of the id following the last '.' or the entire id if there is no '.'
    3. outputs describes how to map output fields from the process invocation into the workflow, following the same rule.
    steps:
      - id: "#step1"
        inputs: 
          - {id: "#step1.input", connect: { source: "#input" }}
        outputs:
          - { id: "#step1.output"}
        run: { import: revtool.cwl }
    
  3. tetron commented on Jun 23, 2015

    @tetron
    Member

    Committed, please review and reopen ticket if you have any concerns.

  4. added a commit that references this issue on Jul 20, 2017
  5. added a commit that references this issue on Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions