Six 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

 

 

                            

 

 

 

 

Tags (1)
1 ACCEPTED SOLUTION

Accepted Solutions
Twelve Stars TRF
Twelve 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
3 REPLIES
Twelve Stars TRF
Twelve 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
Six Stars

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

Thanks TRF.

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

 

 

 

 

 

Twelve Stars TRF
Twelve 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