common-workflow-language / common-workflow-language/cwl-v1.2

Improve the definition of `source` for `WorkflowStepInput`

Open
#247 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Common Workflow Language
Stars
45
Forks
28
PR merge metrics
No merged PRs in 30d

Description

@mr-c
I found this case:
https://raw.githubusercontent.com/common-workflow-language/cwl-v1.2/1.2.1_proposed/tests/count-lines4-wf.cwl
While working on https://github.com/opengeospatial/ogcapi-processes/pull/329

Which has:
```yaml
in:
file1: [file1, file2]
```

But the doc:
https://www.commonwl.org/v1.2/Workflow.html#WorkflowStep
Shows:
`in`: array<[WorkflowStepInput](https://www.commonwl.org/v1.2/Workflow.html#WorkflowStepInput)> | [map](https://www.commonwl.org/v1.2/Workflow.html#map)<`id`, `source` | [WorkflowStepInput](https://www.commonwl.org/v1.2/Workflow.html#WorkflowStepInput)>

While the
`outputSource`: [string](https://www.commonwl.org/v1.2/Workflow.html#CWLType) | array<[string](https://www.commonwl.org/v1.2/Workflow.html#CWLType)>
is explicitly defined as potentially a string/list of string in https://www.commonwl.org/v1.2/Workflow.html#WorkflowOutputParameter,
the `source` does not show explicitly the `array` variant.

There is this part of the text that identifies it as a possibility, but I find that the missing `array` in the definition makes its somewhat counter intuitive (and in fact, it was not a use case I covered until I got the error because I didn't notice it as something that was possible).

> https://www.commonwl.org/v1.2/Workflow.html#Merging_multiple_inbound_data_links
> If the sink parameter is an array, or named in a [workflow scatter](https://www.commonwl.org/v1.2/Workflow.html#WorkflowStep) operation, there may be multiple inbound data links listed in the source field. The values from the input links are merged depending on the method specified in the linkMerge field. If both linkMerge and pickValue are null or not specified, and there is more than one element in the source array, the default method is "merge_nested".

I propose to add the `array` variant explicitly to the table.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the WorkflowStepInput definition and the source field table in the linked v1.2 Workflow documentation, then compare it with the explicitly documented outputSource type and the count-lines4-wf.cwl example. Update the source definition to show the array variant; done means the table clearly matches the supported file1: [file1, file2] case.

Written by the indexing model from the issue text.

Assessment

Domain
documentation
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.