<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Order of components execution (Main, If, OnComponentOk, OnSubJobOK, SubJob) in Talend Studio</title>
    <link>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271455#M49046</link>
    <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;Where I can to find the official page about the execution order of components?&lt;/P&gt; 
&lt;P&gt;I´m reading a job, it Works fine.&lt;/P&gt; 
&lt;P&gt;It has a Main and others 'branches', then I don't understand which component runs first, second, third...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Example: Which component runs after the &lt;STRONG&gt;tLibraryLoad_commonscodec&lt;/STRONG&gt;: &lt;STRONG&gt;tLibraryLoad_bcpg&lt;/STRONG&gt; or &lt;STRONG&gt;tMMsqClose_1&lt;/STRONG&gt;?&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;STRONG&gt;tLibraryLoad_bcpg&lt;/STRONG&gt; then: w&lt;/SPAN&gt;&lt;SPAN&gt;hich component runs after the &lt;SPAN&gt;&lt;STRONG&gt;tLibraryLoad_bcpg&lt;/STRONG&gt;&lt;/SPAN&gt;: &lt;STRONG&gt;tFileList_1&lt;/STRONG&gt; or tMMsqClose_1?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Other example: After &lt;STRONG&gt;tJava_4&lt;/STRONG&gt; runs... then &lt;STRONG&gt;tJava_3&lt;/STRONG&gt; runs or &lt;STRONG&gt;tFileList_1&lt;/STRONG&gt; iterates the next file?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="orden2.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8sF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136463i40FF3E8080A760DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8sF.png" alt="0683p000009M8sF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;And the last example: After &lt;/SPAN&gt;&lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;&lt;SPAN&gt; runs... then &lt;/SPAN&gt;&lt;STRONG&gt;tFlowToIterate&lt;/STRONG&gt;&lt;SPAN&gt; runs or the &lt;/SPAN&gt;&lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt;&lt;SPAN&gt; in the below subJob?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;After &lt;/SPAN&gt;&lt;STRONG&gt;tFileOutputDelimited&lt;/STRONG&gt;&lt;SPAN&gt; runs... then &lt;/SPAN&gt;&lt;STRONG&gt;tFileInputExcel&lt;/STRONG&gt;&lt;SPAN&gt; runs or the &lt;/SPAN&gt;&lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt;&lt;SPAN&gt; in the below subJob?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="orden3.png" style="width: 947px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8ln.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157141i35EBC1C7A62DB5EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8ln.png" alt="0683p000009M8ln.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you response to me thanks about the examples, thanks.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But it thanks you more if you says me where is the explanation page about all order of execution cases.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 03:26:53 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2024-11-16T03:26:53Z</dc:date>
    <item>
      <title>Order of components execution (Main, If, OnComponentOk, OnSubJobOK, SubJob)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271455#M49046</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt; 
&lt;P&gt;Where I can to find the official page about the execution order of components?&lt;/P&gt; 
&lt;P&gt;I´m reading a job, it Works fine.&lt;/P&gt; 
&lt;P&gt;It has a Main and others 'branches', then I don't understand which component runs first, second, third...&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Example: Which component runs after the &lt;STRONG&gt;tLibraryLoad_commonscodec&lt;/STRONG&gt;: &lt;STRONG&gt;tLibraryLoad_bcpg&lt;/STRONG&gt; or &lt;STRONG&gt;tMMsqClose_1&lt;/STRONG&gt;?&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;if&amp;nbsp;&lt;STRONG&gt;tLibraryLoad_bcpg&lt;/STRONG&gt; then: w&lt;/SPAN&gt;&lt;SPAN&gt;hich component runs after the &lt;SPAN&gt;&lt;STRONG&gt;tLibraryLoad_bcpg&lt;/STRONG&gt;&lt;/SPAN&gt;: &lt;STRONG&gt;tFileList_1&lt;/STRONG&gt; or tMMsqClose_1?&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;Other example: After &lt;STRONG&gt;tJava_4&lt;/STRONG&gt; runs... then &lt;STRONG&gt;tJava_3&lt;/STRONG&gt; runs or &lt;STRONG&gt;tFileList_1&lt;/STRONG&gt; iterates the next file?&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="orden2.png" style="width: 400px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8sF.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/136463i40FF3E8080A760DE/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8sF.png" alt="0683p000009M8sF.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;And the last example: After &lt;/SPAN&gt;&lt;STRONG&gt;tJavaRow&lt;/STRONG&gt;&lt;SPAN&gt; runs... then &lt;/SPAN&gt;&lt;STRONG&gt;tFlowToIterate&lt;/STRONG&gt;&lt;SPAN&gt; runs or the &lt;/SPAN&gt;&lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt;&lt;SPAN&gt; in the below subJob?&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN&gt;&lt;SPAN&gt;&amp;nbsp;After &lt;/SPAN&gt;&lt;STRONG&gt;tFileOutputDelimited&lt;/STRONG&gt;&lt;SPAN&gt; runs... then &lt;/SPAN&gt;&lt;STRONG&gt;tFileInputExcel&lt;/STRONG&gt;&lt;SPAN&gt; runs or the &lt;/SPAN&gt;&lt;STRONG&gt;tFileInputDelimited&lt;/STRONG&gt;&lt;SPAN&gt; in the below subJob?&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&lt;SPAN class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="orden3.png" style="width: 947px;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="0683p000009M8ln.png"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/157141i35EBC1C7A62DB5EC/image-size/large?v=v2&amp;amp;px=999" role="button" title="0683p000009M8ln.png" alt="0683p000009M8ln.png" /&gt;&lt;/span&gt;&lt;/SPAN&gt;&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;If you response to me thanks about the examples, thanks.&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;But it thanks you more if you says me where is the explanation page about all order of execution cases.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 03:26:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271455#M49046</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2024-11-16T03:26:53Z</dc:date>
    </item>
    <item>
      <title>Re: Order of components execution (Main, If, OnComponentOk, OnSubJobOK, SubJob)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271456#M49047</link>
      <description>&lt;P&gt;Good question! It looks to me like the documentation does not explicitly state the order of execution.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;As to your specific question of the tJavaRow and tFlowToIterate vs the If link from the tFileInputDelimited, I don't know. I have, however, looked into the relative order of the trigger link types (&lt;STRONG&gt;OnSubjobOk&lt;/STRONG&gt;, &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt;, and &lt;STRONG&gt;If&lt;/STRONG&gt;). Whilst not exactly the same as your question, I think it's worth sharing my results.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;From my experiments, these are the rules:&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;OnSubjobOK&lt;/STRONG&gt;: These links trigger last, in the order that they are aset in the order configuration dialog.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; &amp;amp; &lt;STRONG&gt;If&lt;/STRONG&gt;: These are complicated. You cannot tell from the job design which one will execute first. They appear to be executed in the order that they are created, but changing the order can move them around.&lt;/P&gt; 
&lt;P&gt;For example, I added an &lt;STRONG&gt;OnComponentOK&lt;/STRONG&gt; and an &lt;STRONG&gt;If&lt;/STRONG&gt; to the same component, and they executed in the order that they were created. I delete them and recreate them in the opposite order, and they run in that reversed order.&lt;/P&gt; 
&lt;P&gt;With the &lt;STRONG&gt;If&lt;/STRONG&gt; link running first, I add a second &lt;STRONG&gt;If&lt;/STRONG&gt; link. It runs last - so the first &lt;STRONG&gt;If&lt;/STRONG&gt; link runs, then the &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt;, then the second &lt;STRONG&gt;If&lt;/STRONG&gt; link.&lt;/P&gt; 
&lt;P&gt;If I then change the order of the &lt;STRONG&gt;If&lt;/STRONG&gt; links so that the first one runs last, then it gets moved to after the second &lt;STRONG&gt;If&lt;/STRONG&gt; link. So the order is now &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt;, then the second added &lt;STRONG&gt;If&lt;/STRONG&gt; link, then the first added &lt;STRONG&gt;If&lt;/STRONG&gt; link (because it has been moved to after).&lt;/P&gt; 
&lt;P&gt;If you open the "&lt;STRONG&gt;Modify If links order&lt;/STRONG&gt;" dialog and move the If link that is now first to the end, then move it back to the begining, and then close the dialog, you might think that nothing will change. However, this will move it to before the &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; that was the first to execute. The second &lt;STRONG&gt;If&lt;/STRONG&gt; link will remain at the end of the execution order.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;I think that this is why they didn't document it! It is complicated, and may be subject to change in future implementations.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;So the &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; triggers will run in their respective order, the &lt;STRONG&gt;If&lt;/STRONG&gt; triggers will run in their respective order, but they may well be interleaved with each other based on the original creation order and the re-ordering operations peformed on them.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;The only safe way is to to make it ecplicitly clearis not to mix &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; and &lt;STRONG&gt;If&lt;/STRONG&gt; links! Make them all &lt;STRONG&gt;If&lt;/STRONG&gt; links, set the order yourself in the "&lt;STRONG&gt;Modify If links order&lt;/STRONG&gt;" dialog, and set the unconditional ones to a condition of &lt;STRONG&gt;true&lt;/STRONG&gt;.&lt;/P&gt; 
&lt;P&gt;&amp;nbsp;&lt;/P&gt; 
&lt;P&gt;&lt;STRONG&gt;&lt;FONT size="5"&gt;Update!&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt; 
&lt;P&gt;Behaviour does indeed differ with different Talend versions. The above conclusion - that &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; and &lt;STRONG&gt;If&lt;/STRONG&gt; links are interleaved - only applies to v6 (I tested on v6.3, I don't know about other v6.x versions). v7.1 appears to always execute &lt;STRONG&gt;If&lt;/STRONG&gt; links first, then &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; links. I don't know if this behaviour is reliable and documented though, so exploit at your own risk!&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 09:33:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271456#M49047</guid>
      <dc:creator>PhilHibbs</dc:creator>
      <dc:date>2020-01-28T09:33:48Z</dc:date>
    </item>
    <item>
      <title>Re: Order of components execution (Main, If, OnComponentOk, OnSubJobOK, SubJob)</title>
      <link>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271457#M49048</link>
      <description>&lt;P&gt;I think that the answer to your question about the &lt;STRONG&gt;Iterate&lt;/STRONG&gt; and the &lt;STRONG&gt;If&lt;/STRONG&gt; link is that the &lt;STRONG&gt;Iterate&lt;/STRONG&gt; will run first. The &lt;STRONG&gt;If&lt;/STRONG&gt; link works like an &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt;, and the component is not OK until it has finished sending its flow output, and that flow is being converted to an &lt;STRONG&gt;Iterate&lt;/STRONG&gt;, so it has to finish iterating before the &lt;STRONG&gt;If&lt;/STRONG&gt; link can happen.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;After each iteration of the&amp;nbsp;&lt;STRONG&gt;tJava_4&lt;/STRONG&gt;, the &lt;STRONG&gt;OnComponentOk&lt;/STRONG&gt; will trigger &lt;STRONG&gt;tJava_3&lt;/STRONG&gt; before the next &lt;STRONG&gt;tJava_4&lt;/STRONG&gt; iteration. Because &lt;STRONG&gt;tJava_3&lt;/STRONG&gt;&amp;nbsp;is a separate subjob, its &lt;STRONG&gt;OnSubjobOk&lt;/STRONG&gt; will then trigger, again before the next &lt;STRONG&gt;tjava_4&lt;/STRONG&gt;. If the link from &lt;STRONG&gt;tJava_4&lt;/STRONG&gt; had been &lt;STRONG&gt;OnSubjobOK&lt;/STRONG&gt; then it would happen once at the end of all the iterations of &lt;STRONG&gt;tJava_4&lt;/STRONG&gt;.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Jan 2020 09:36:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/Talend-Studio/Order-of-components-execution-Main-If-OnComponentOk-OnSubJobOK/m-p/2271457#M49048</guid>
      <dc:creator>PhilHibbs</dc:creator>
      <dc:date>2020-01-28T09:36:48Z</dc:date>
    </item>
  </channel>
</rss>

