Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
nvtd4000
Contributor III
Contributor III

How to test tPostjob to know if it gets invoked

I am using Talend Studio for Bigdata platform v7.3.1.

I have a simple job (rest service) which includes a tPrejob and tPostjob. Each of them connects to tJava.

tJava components simply do System.out.println("PreJob loading") and System.out.println("PostJob loading").

0695b00000HuzRrAAJ.png 

When I run the job, I can see the tJava which is connected to PreJob get invoked: "PreJob loading".

But After the the job finished: client gets response from rest service. I don't see tPostjob invoked.

Even after I manually killing the job, I still don't see anything from tPostjob and its java component.

 

Could you please help me to know how to test tPostjob and its following components.

4 Replies
hp1
Contributor
Contributor

@Not defined Not defined​ tPreJob and tPostJob have a guranteed execution even if you have a failure in your subjobs. Have you configured tJava with code to print anything? If not you can possibly try printing some information like time/etc through the tJava component connected on componentOk and check on the console for the same.

XJ_1630
Contributor III
Contributor III

harshadpurohit is correct - these components are guaranteed to run

Anonymous
Not applicable

Hello,

Or you could populates the return error of job execution in the job, to do:

Try to add a tLogCatcher, it also has a column called code populates the return error of job execution.

Best regards

Sabrina

ThWabi
Creator II
Creator II

Hello nvtd4000,

if you are testing within Studio, you could also connect a tMsgBox component to the tPostJob.

Best regards,

Thomas