Consider a workflow with tasks with the following input and output parameter relationship:
task
inputs
outputs
t1
p0
p1
t2
p1
p2
t3
p1, p2
-
When Task.get_available_task_input_sources() is called to find possible input sources for t3's p1 parameter, only the output parameter from t1 is identified; the input parameter to t2 is not identified as a possible source. This is because, for task_source_type="input" sources, we only check for locally provided inputs (i.e. InputValues and ValueSequences). This is not usually a problem, because often the p1 input on t2 is usually derived from the p1 output on t1.
However, there are cases where it is required, and it is a reasonable expectation to be able to select that input source. In particular, if we have a group defined on t2 and consumed by t3, the values for p1 in t3 will be empty, because the group was not defined in t1, from which the values for p1 were sourced.
To fix this, we need to modify the input branch in Task._get_task_source_element_iters so it also consideres element sets that have task-type input sources for that parameter.
Consider a workflow with tasks with the following input and output parameter relationship:
When
Task.get_available_task_input_sources()
is called to find possible input sources fort3
'sp1
parameter, only the output parameter fromt1
is identified; the input parameter tot2
is not identified as a possible source. This is because, fortask_source_type="input"
sources, we only check for locally provided inputs (i.e.InputValue
s andValueSequence
s). This is not usually a problem, because often thep1
input ont2
is usually derived from thep1
output ont1
.However, there are cases where it is required, and it is a reasonable expectation to be able to select that input source. In particular, if we have a group defined on
t2
and consumed byt3
, the values forp1
int3
will be empty, because the group was not defined int1
, from which the values forp1
were sourced.To fix this, we need to modify the
input
branch inTask._get_task_source_element_iters
so it also consideres element sets that have task-type input sources for that parameter.