Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik and ServiceNow Partner to Bring Trusted Enterprise Context into AI-Powered Workflows. Learn More!
cancel
Showing results for 
Search instead for 
Did you mean: 
rp2018
Creator
Creator

tLogCatcher not catching child job errors

tLogCatcher is not catching errors coming from a child job.

When a job is run it'll show all of the error messages coming from a child job in the Run Window, but it is not catched by tLogCatcher to email.
If we don't loop the child job, tLogCatcher is catching all error messages and emailing.

 

This is a master job:
tjava--->tloop--->tJavaflex--->tJava--->tRunjob--->tjava

NOTE: tRunjob has Die on child error and Use an independent process to run subjob selected

 

This is a child job:
tPrejob--->tRestclient--->tjson--->tSetGlobalvar

NOTE: tRestclient and tJson have Die on error selected

Labels (5)
13 Replies
chafer
Contributor
Contributor

A child job will fail if it actually fails internally so keep it set to stop if child job fails. Inside the child job, setup the tLogCatcher email to iterate errors to the email as my earlier attached image shows. When the child job fails, it should send you the code for the failure and also stop the parent job's run process as well. 

 

What I don't know about is your looping part. If you loop the child job from a parent job, how does the Parent job know when the Child job is has completed?  Will the parent job loop again 'before' the child job has completed?  If it does, you need to do some code like what akumar2301 stated so the Parent job doesn't run until the child job has completed. Otherwise, put all the components into a single job so when the loop happens, you can iterate through the 'whole' process for each loop that is done. 

 

Does this make sense? 

chafer
Contributor
Contributor

See my response that has the attached image.
rp2018
Creator
Creator
Author

Abhishek,

 

I'm new with Talend and wondering if I've done something wrong in my looping which is not catching the error message via tLogcather.  Do you have a sample loop job that will loop the child job and die once it reaches 5 tries? My child job is trying to make connection to CRM using tRestclient and if it tries for 5 times and it doesn't connect then die the job and email.  

chafer
Contributor
Contributor

Sorry for the late response. I don't have a setup that loops a 'child' job. The tLogCatcher example I shared will create and send an email every time a warning or error happens within the job itself.  I do not loop 'child' Jobs, I loop within a single job and pass the results to another job that handle the next process. I am sharing my resolution for the 'error handling' for any jobs in general.