Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

tDie - Graceful Exit

In a slightly more ideal world, the tDie component would allow a job to exit early as a result pf the flow logic and by using the Error/Exit Code of 0 would NOT be handled as a job "failure". ie You would set the code to whatever you want and that would be used as the exit status of the job,  >0 would be a failure, exist status 0 would be normal/successful completion. However, the way the exception processing is currently implemented prevents this - and more disappointingly also prevents anyone from developing a custom tDie component.
Could I propose that the generated tDie_x_Error exception handler includes a test for the errorCode and if 0 it does not set the status to "failure"?
Mark

Labels (2)
1 Reply
TRF
Champion II
Champion II

Hi,

As a workaround, you may have a subjob (or a joblet) dedicated to catch Java exceptions, tDie or tWarn (using tLogCatcher).
Then, in this subjob you can decide to terminate with a return code equal to 0 using a tJava and "System.exit(0);" based on the condition of your choice. 
Maybe not as clean as you expect but works.

Regards,
TRF