title: SSIS - Redirecting data to different Outputs
body: <p>I'm developing a custom component that inherits from a PipelineComponent in SSIS.</p>
  
  <p>This is the "ProvideComponentProperties" snippet of code:</p>
  
  <pre><code>IDTSOutput90 output = ComponentMetaData.OutputCollection.New();
  output.Name = "Output";
  output.SynchronousInputID = input.ID;
  output.ExclusionGroup =0;
  m_DefaultOutputId = output.ID;
  
  IDTSOutput90 discardedOutput = ComponentMetaData.OutputCollection.New();
  discardedOutput.Name = "Discarded Output";
  discardedOutput.SynchronousInputID = output.SynchronousInputID;
  discardedOutput.ExclusionGroup = 1;
  //I don't want it to be an output
  //discardedOutput.IsErrorOut = true; 
  m_DiscardedOutputId = discardedOutput.ID;
  </code></pre>
  
  <p>And then in the process input i have this:</p>
  
  <pre><code>while (buffer.NextRow())
  {
      bool discarded = true;
      if  (//Discard condition)
      {
          for (int columnIndex = 0; columnIndex &lt; input.InputColumnCollection.Count; columnIndex++)
          {
              //Write to buffer
          }
          discarded = false;
      }
      if (discarded)
      {
          buffer.DirectRow(discardedOutput.ID);
      }
      rowIndex++;
  }
  </code></pre>
  
  <p>The problem I am having that is not redirecting the row. The row keep its flow in the "Output" output instead of going through the "Discarded Output".</p>