title: Take process input from either of two channels
body: <p>How do I allow a process to take an input from either one of two channels that are outputs of processes with mutually exclusive conditions for running? For example, something like:</p>
  <pre><code>params.condition = false
  
  process a {
      output:
      path &quot;a.out&quot; into a_into_c
  
      when:
      params.condition == true
  
      &quot;&quot;&quot;
      touch a.out
      &quot;&quot;&quot;
  }
  
  process b {
      output:
      path &quot;b.out&quot; into b_into_c
  
      when:
      params.condition == false
  
      &quot;&quot;&quot;
      touch b.out
      &quot;&quot;&quot;
  }
  
  process c {
      publishDir baseDir, mode: 'copy'
  
      input:
      path foo from a_into_c or b_into_c
  
      output:
      path &quot;final.out&quot;
  
      &quot;&quot;&quot;
      echo $foo &gt; final.out
      &quot;&quot;&quot;
  }
  </code></pre>
  <p>where final.out will contain <code>a.out</code> if params.condition is true (e.g. <code>--condition</code> is given on the command line), and <code>b.out</code> if it is false.</p>