Four Stars

Send mail when tStatCatcher/tLogCatcher is on error

Hello,

 

I have a job that uses tStatsCatcher and tLogCatcher components for monitoring. These components track errors well and send them to a database and email.

 

I would like to send an email (tSendMail) in case the sending of the error to the database (tOracleOutput) does not work, ie if the connection to the database has failed. However, sending the mail does not work.

 

I tried to use several "main" on the tLogCatcher component but without success:

log_db_error.JPG

Also, I tried to put "OnComponentError" after "tOracleOutput", but it sends an email to each call of tStatCatcher.

 

Is it possible to catch this error?

 

Thank's !

3 REPLIES
Moderator

Re: Send mail when tStatCatcher/tLogCatcher is on error

Hello,

Please re-design your workflow like:

tStatCatcher--> tMap --> tOracleOutput
                           | onsubjob error
                           |
                    tSendMail

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.
Four Stars

Re: Send mail when tStatCatcher/tLogCatcher is on error

Hello Sabrina,

 

I tried this solution but the component sends 2 mails, 1 at beginning and 1 at the end job.

Even when i add a condition for get only end stats in tMap (row3.message_type.equals("end")).

Moderator

Re: Send mail when tStatCatcher/tLogCatcher is on error

Hello,

How did you set the value in message body part of component tSendMail? Did you use any Context Value in it? Could you please post your current job setting screenshots on forum?

Note: Please mask your sensitive data.

Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.