tDie component doesn't kill the job

One Star

tDie component doesn't kill the job

I have a very simple process as follows
******************************************************************************************************
prejob --> OnComponentOk --> tOracleConnection --> OnSubJobError --> tSendMail_1 --> OnComponentOk --> tDie_1
|
OnSubJobOk
|
tFTPConnection --> OnSubJobError --> tSendMail_2 --> OnComponentOk --> tDie_2

tSendMail_3
******************************************************************************************************
I have the tSendMail_3 sitting alone to test if the tDie process kills the process or not.
I purposefully put in the wrong password for the tFTPConnection, and I can see the message from tDie_2 in the log, but the process does not get killed and I still get the email from tSendMail_3.
I saw the thread http://www.talendforge.org/forum/viewtopic.php?id=9613 but, I do not want to use 'Exit JVM' option, but also do not know how to code the tJava component.
Please help!
One Star

Re: tDie component doesn't kill the job

Hi,
Your tSendMail_3 is linked to no component, so when your job is running it makes a parallel exeuction, meaning both of the "subjob" are exectuing. If your tSendMail_3 is supposed to be used when all the treatement have passed, link it with a onSubJobOk and then the mail will be only send when all the treatments have successed. Furthermore your process is not killed because you don't use a tcatcher component, you need to use it to catch the log, the job will be killed when the message is treated by the tcatcher.
If your need to send a mail when there is an error in your job, try as follow:
prejob --> OnComponentOk --> tOracleConnection
|
OnSubJobOk
|
tFTPConnection
|
OnSubJobOk
|
tsendMail_3(success!)
tlogcatcher---->tsendmail_1(fail....)
I only use tlogcatcher to send me a mail when my job fail (with no tdie), always worked Smiley Happy. But of course you can put tdie compoennt if you want !
One Star

Re: tDie component doesn't kill the job

Or3l,
Thanks for your reply.
I did not try the tLogCatcher, but linking the tSendmail_3 to the main job works, however, I would imagine that since the tDie is in the Prejob, the processes after PreJob would not run, if error occurs in PreJob. I guess that is not how it is designed to work?