Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
schwarben
Contributor
Contributor

Does a "Run if" connection wait for subsequent subjobs to finish ?

Hi,

According to a few tests I performed it seems to be the case, but I couldn't find the information in the manual and I would feel better if my feeling was confirmed.

Typically in the example from the picture tJava_1 is executed first, then tJava_2 is executed, and ultimately tJava3 is executed after the 10s sleep fro the tJava2. If I chain several subjobs with an OnSubjobOk after tJava2, tJava3 still seems to be the last component executed. Can I consider this is a guaranteed behaviour ?

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

Yes, this is a guaranteed behaviour, if you look into the generated Java code, you will see the execution code of tJava2 is inside the execution range of tJava1. see below, tJava_2Process(globalMap) is the execution entry of tJava2.

/**

* [tJava_1 end ] start

*/

currentComponent="tJava_1";

ok_Hash.put("tJava_1", true);

end_Hash.put("tJava_1", System.currentTimeMillis());

   if (true) {

  

tJava_2Process(globalMap);

}

/**

 * [tJava_1 end ] stop

 */

 

Regards

Shong

View solution in original post

4 Replies
gjeremy1617088143

Hi, what is the condition of your run if ?

Send me love and kudos

Anonymous
Not applicable

Hi

Yes, this is a guaranteed behaviour, if you look into the generated Java code, you will see the execution code of tJava2 is inside the execution range of tJava1. see below, tJava_2Process(globalMap) is the execution entry of tJava2.

/**

* [tJava_1 end ] start

*/

currentComponent="tJava_1";

ok_Hash.put("tJava_1", true);

end_Hash.put("tJava_1", System.currentTimeMillis());

   if (true) {

  

tJava_2Process(globalMap);

}

/**

 * [tJava_1 end ] stop

 */

 

Regards

Shong

schwarben
Contributor
Contributor
Author

Indeed. Thanks !

schwarben
Contributor
Contributor
Author

Hi Jeremy,

 

Thank you for your answer. In my example I used a simple "true" since the purpose was to check Talend's behavior when the condition is met. That being said, I don't think the content of the condition really matters. I mean, if the condition is met you'll enter that path of execution and Talend's behavior won't differ depending on the expression that returned true in the run if condition. Will it ?