how to merge two process branches back into one?

Seven Stars

how to merge two process branches back into one?

Hi

 

My code starts with tPrejob => tFileExist to check if external context file exist,

                                IF not create a new file, and dump contexts into this file (5-6 components);

                                IF exists, run tContextLoad to load all contexts from external file.

 Then I want to do a few other tasks in tPrejob which only can be run after one of the above process is finished, how can I merge those two branches into one?

 

Certainly I add those other tasks into both branches via OnSubjobOk, but I don't want to duplicate the code.

 

Thanks,

Bin

 

 

                            

 

 

 

 


Accepted Solutions
Fifteen Stars TRF
Fifteen Stars

Re: how to merge two process branches back into one?

This is another way, as there are often many solutions for the same problem.
However, don't forget to mark the case as solved.
Kudos also accepted.

TRF

All Replies
Fifteen Stars TRF
Fifteen Stars

Re: how to merge two process branches back into one?

Just add a 3rd "if" statement (order 3) after the tFileExists component with a condition which evaluates to "True" at anytime such as "1 == 1" and connect the desired sequence after this new "if".
That's all.

TRF
Seven Stars

Re: how to merge two process branches back into one?

Thanks TRF.

I found a way: Use OnSubjobOK from tFileExists component. Smiley Embarassed

 

 

 

 

 

Fifteen Stars TRF
Fifteen Stars

Re: how to merge two process branches back into one?

This is another way, as there are often many solutions for the same problem.
However, don't forget to mark the case as solved.
Kudos also accepted.

TRF

2019 GARNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

What’s New for Talend Summer ’19

Watch the recorded webinar!

Watch Now

Best Practices for Using Context Variables with Talend – Part 4

Pick up some tips and tricks with Context Variables

Blog

How Media Organizations Achieved Success with Data Integration

Learn how media organizations have achieved success with Data Integration

Read

APIs for Dummies

View this on-demand webinar about APIs....

Watch Now