Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
this is a part of my job:
tJavaRow_1 should end/quit the job if a certain condition is met.
I tried using:
if (whatEverCondition == true)
System.exit(1);
Basically this is working but the problem is that tPostjob_1 is not executed anymore and so the end time of the job is not written to DB anymore.
Please note:
I cannot use a tDie component because this will cause an exception which is caught by my tLogCatcher what I don't want since no execption takes place just a condition to end the job.
I also cannot deactivate 'Catch tDie' in tLogCatcher basic settings since I have other tDie components in my job which need to be caught by tLogCatcher.
Basically I need a tQuit or tEnd component 😉.
How can I quit a job using Java code (inside tJavaRow_1) but still run tPostJob_1?
Thanks for any help!
System.exit(1) is not the best way to safely end a job on a condition having been met to end it. Can you explain what the condition is and why you need to do this?
Have you tried to use:
return;
That should quit from the actualy function. But postjob should still execute.
One can use continue; to skip the components on the "right" side of the flow for the entry.
Great idea! I hadn't thought of attempting this.