diff --git a/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy b/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy index 5f8e552a0e..a6718402ee 100644 --- a/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy +++ b/modules/nextflow/src/main/groovy/nextflow/processor/TaskProcessor.groovy @@ -866,7 +866,7 @@ class TaskProcessor { final ctx = task.context def invalid = task.getOutputs().keySet().any { if( it instanceof ValueOutParam ) { - return !ctx.containsKey(it.name) + return false } if( it instanceof FileOutParam ) { return false diff --git a/tests/dynamic-storedir.nf b/tests/dynamic-storedir.nf index 755bc24049..55a002adfe 100644 --- a/tests/dynamic-storedir.nf +++ b/tests/dynamic-storedir.nf @@ -25,7 +25,7 @@ process foo { file 'result.txt' output: - tuple val(x), file('result.txt') + tuple val(task.process), val(x), file('result.txt') script: """ @@ -37,9 +37,9 @@ process foo { workflow { def data = 'Hello\n' def list = ['alpha', 'delta', 'gamma', 'omega'] - foo(list, data) | subscribe { code, file -> - println "~ Result ${file}" - file.copyTo("my_${code}.txt") - } + foo(list, data).subscribe { process, code, file -> + println "~ Result ${file} from process ${process}" + file.copyTo("my_${code}.txt") + } }