Nextflow: ordering the execution of processes; outputs of process A are inputs of process B
Nextflow uses channels (asynchronous FIFO queues) to communicate between processes. The interaction between these processes, and ultimately the pipeline execution flow itself, is implicitly defined by these input and output declarations.
The issue with your code, I think, is the use of multiple input channels. Consider the following example that uses only a single queue channel. To avoid declaring the inputs again in process A's output declaration, we can output a key to join on as the first element in the output tuple. In the case below, this is simply the 'some_name' variable. We can then join up the two channels using the join operator as follows:
Channel
    .fromFilePairs( './data/*.txt', size:1 )
    .map { group_key, files -&gt; tuple( group_key, *files ) }
    .into { input_ch_A; input_ch_B }


process A {

    input:
    tuple val(some_name), path(some_path) from input_ch_A

    output:
    tuple val(some_name), val(&quot;procA_${some_name}"), path("procA_${some_name}&quot;) \
        into procA_results

    &quot;&quot;&quot;
    touch &quot;procA_${some_name}&quot;
    &quot;&quot;&quot;
}

process B {

    input:
    tuple val(some_name), path(some_path), val(some_other_val), path(some_other_path) \
        from input_ch_B.join(procA_results)

    &quot;&quot;&quot;
    true
    &quot;&quot;&quot;
}
```