common-workflow-language / cwl-v1.3

Apache License 2.0
4 stars 4 forks source link

post-step output manipulation #39

Open tetron opened 1 month ago

tetron commented 1 month ago

Want to be able to reshape outputs on the workflow step, e.g. similar to outputEval on CommandLineTool.

Should include a way to bind outputs from the 'run' process that are not propagated to the step output object, similar to #41

Example to take a output parameter called "tooloutput" which is a record and extract "field1" and produce a workflow step output called "myoutput".

steps:
  step1:
    out:
      myoutput:
        source: tooloutput
        valueFrom: $(self.field1)
      michelsoutput:
        source: foo
        propagate: false
      petersoutput:
        valueFrom: $(outputs.michalesoutput.abc)
      davidsoutput:
        valueFrom: $(outputs.michalesoutput.xzy)
      sashasoutput:
        source: bar
        type: string
        valueFrom: ${return {"quux": self + outputs.michalesoutput.def }; }
      outputwithdefault:
        source: anoptionaloutput
        default: "the default value when this returns null"

Optionally declare expected type on 'out' parameters to suppress checker warnings. #42

The "in", "out" and "loop" should as much as possible have the same fields / order of operations / capabilities. Although, from discussion, we probably don't need multiple sources and linkMerge on 'loop' and 'out'.

mr-c commented 1 month ago

See also https://github.com/common-workflow-language/common-workflow-language/issues/493