text: user11959: Using DSL2.
  I have processes A, B, C which I want to run in sequence - B waits for A to finish, C waits for B to finish.
  They are not communicating via channels so I can't do A.out.collect().
  I have tried making dummy channels but this is problematic and a hack. The onComplete subscription doesn't seem to let me trigger another process.
  What is the correct way to run a sequence of processes which are not communicating or triggered by channels?
  P.S. I am aware that this is not really the intended use case of Nextflow (which is oriented around channel communication/triggers... but... I just need to get this done.)
  
  user14931: I would guess it is not possible without channels unless you are using beforeScript and afterScript. I came up with this solution:
  #!/usr/bin/env nextflow
  
  nextflow.enable.dsl=2
  
  workflow {
    // C(B(A("")))
  
    next = ""
    next = A(next)
    next = B(next)
    next = C(next)
  }
  
  
  process A{
    echo true
    input: val _
    output: val ""
  
    """
    echo $task.process
    """
  }
  
  process B{
    echo true
    input: val _
    output: val ""
  
    """
    echo $task.process
    """
  }
  
  process C{
    echo true
    input: val _
    output: val ""
  
    """
    echo $task.process
    """
  }
  
  By using workflows you can change the execution order. But it is still a hack and I would prefer something like a next: keyword to specify the next process.
  
  And for those not interested in DSL2:
  process A {
    echo true
  
    output:
    val "" into B
    
  
    """
    echo "$task.process"
    """
  }
  
  process B {
    echo true
  
    input:
    val _ from B
  
    output:
    val "" into C
  
    """
    echo "$task.process"
    """
  }
  
  process C {
    echo true
  
    input:
    val _ from C
  
    """
    echo "$task.process"
    """
  }
  
  Also, I am quite curious to see other solutions.
  
original_text: 11959: <p>Using DSL2.</p>
  <p>I have processes A, B, C which I want to run in sequence - B waits for A to finish, C waits for B to finish.</p>
  <p>They are not communicating via channels so I can't do A.out.collect().</p>
  <p>I have tried making dummy channels but this is problematic and a hack. The onComplete subscription doesn't seem to let me trigger another process.</p>
  <p>What is the correct way to run a sequence of processes which are not communicating or triggered by channels?</p>
  <p>P.S. I am aware that this is not really the intended use case of Nextflow (which is oriented around channel communication/triggers... but... I just need to get this done.)</p>
   14931: <p>I would guess it is not possible without channels unless you are using <code>beforeScript</code> and <code>afterScript</code>. I came up with this solution:</p>
  <pre><code>#!/usr/bin/env nextflow
  
  nextflow.enable.dsl=2
  
  workflow {
    // C(B(A(&quot;&quot;)))
  
    next = &quot;&quot;
    next = A(next)
    next = B(next)
    next = C(next)
  }
  
  
  process A{
    echo true
    input: val _
    output: val &quot;&quot;
  
    &quot;&quot;&quot;
    echo $task.process
    &quot;&quot;&quot;
  }
  
  process B{
    echo true
    input: val _
    output: val &quot;&quot;
  
    &quot;&quot;&quot;
    echo $task.process
    &quot;&quot;&quot;
  }
  
  process C{
    echo true
    input: val _
    output: val &quot;&quot;
  
    &quot;&quot;&quot;
    echo $task.process
    &quot;&quot;&quot;
  }
  </code></pre>
  <p>By using workflows you can change the execution order. But it is still a hack and I would prefer something like a <code>next:</code> keyword to specify the next process.</p>
  <hr />
  <p>And for those not interested in DSL2:</p>
  <pre><code>process A {
    echo true
  
    output:
    val &quot;&quot; into B
    
  
    &quot;&quot;&quot;
    echo &quot;$task.process&quot;
    &quot;&quot;&quot;
  }
  
  process B {
    echo true
  
    input:
    val _ from B
  
    output:
    val &quot;&quot; into C
  
    &quot;&quot;&quot;
    echo &quot;$task.process&quot;
    &quot;&quot;&quot;
  }
  
  process C {
    echo true
  
    input:
    val _ from C
  
    &quot;&quot;&quot;
    echo &quot;$task.process&quot;
    &quot;&quot;&quot;
  }
  </code></pre>
  <p>Also, I am quite curious to see other solutions.</p>
  