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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

exit job with routine

Hello,
I created a java routine which show a msgbox and exit the job.
I use it in tMap in a condition like "If row1 == null then start routine"
My problem is that when the job finish with the routine, the 2 output files are created and i don't want it. The files are empty ,I checked "Don't create empty files" in the component settings but it don't work.
I also tried to add a File.delete() in the routine but it don't work.
Can anyone help me please ?
Jerem
Labels (3)
4 Replies
Anonymous
Not applicable
Author

Hi Jerem,
do you exit the job in your routine? If so, in which way?
Bye
Volker
Anonymous
Not applicable
Author

Hi Volker,
Yes, i exit the job in the routine.
I use system.exit(0);
Jerem
Anonymous
Not applicable
Author

Hi Jerem,
using System.exit() is a dangerous function 😉
Using this will explain all your problems. If you do this call in the JVM it will immediately stop all processes. Even catch / finally blocks will never be reached. You should redesign your job to handle the wrong data. For example you could use a tFilterRow to check the value and let the wrong row run into a tDie.
Bye
Volker
Anonymous
Not applicable
Author

Thanks for you help Volker, I built the job with TOS tools and it work well