Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
cancel
Showing results for 
Search instead for 
Did you mean: 
mr_burns
Contributor
Contributor

tRunJob - how to send e-mail on success AND failure?

Hi,

I have a child job which is executed by a tRunJob component.

If the child job has finished execution I want to send an email if job succeeded or failed. 

 

Now I have done it using following components:

 

tRunJob --> OnComponentOK --> tSendMail1

tRunJob --> OnComponentError --> tSendMail2

 

Is there any way to only use one tSendMail component? O don't want to do double work to setup two times a tSendMail component.
I need some component which leads OnComponentOK and OnComponentError outputs into one input which I can feed into tSendMail.
Something like this:

 

tRunJob --> OnComponentOK   \

                                                      \

                                                          ??? --> tSendMail_1

                                                      /

tRunJob --> OnComponentError /

 

Thanks for any help...

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi,

 

   You can use a Run If condition in this case so that you can connect to same tSendEmail component. But make sure that you are having proper messages for both success and failure scenario.

 

    Personally I would prefer to have it separate so that it will enhance readability of the code. You can refer the Talend Best Practices 4 part series and there also we are following separate components for both success and failure scenarios.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved

View solution in original post

1 Reply
Anonymous
Not applicable

Hi,

 

   You can use a Run If condition in this case so that you can connect to same tSendEmail component. But make sure that you are having proper messages for both success and failure scenario.

 

    Personally I would prefer to have it separate so that it will enhance readability of the code. You can refer the Talend Best Practices 4 part series and there also we are following separate components for both success and failure scenarios.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved