title: How to Loop inside Pentaho Data Integration Transformation
body: <p>I have following pdi job structure:</p>
  
  <pre><code>START ---&gt; TR1 ---&gt; TR2 ---&gt; TR3
  </code></pre>
  
  <p>where:</p>
  
  <p><code>TR1</code> will return 3 rows,</p>
  
  <p><code>TR2</code> had <code>execute every input row</code> enabled by me, and will return 5 rows,</p>
  
  <p><code>TR3</code> had <code>execute every input row</code> enabled by me, and it was <strong>supposedly</strong> run 15 times (5 times for each of those 3 <code>TR2</code>).</p>
  
  <p>My expectation was:</p>
  
  <p><code>TR1</code> will run exactly 1 time, <code>TR2</code> will run exactly 3 times in parallel (since <code>TR1</code> returning 3 rows),</p>
  
  <p>and <code>TR3</code> will run exactly 15 times (since each of <code>TR2</code> returning 5 rows).</p>
  
  <p>But then <strong>the reality was</strong> </p>
  
  <p><code>TR2</code> was executed 3 times, <strong>as expected</strong>,</p>
  
  <p>but <code>TR3</code> is only executed 1 time, <strong>not as expected.</strong></p>
  
  <p>My questions are:</p>
  
  <ol>
  <li><p>Why is this happening?</p></li>
  <li><p>How to make <code>TR3</code> act as like loop inside <code>TR2</code>'s rows</p></li>
  </ol>