Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Up until now, I used to connect an tSendMail to every component in order to notify the user in case of error in the corresponding component.
In an effort to simplify my job and make it more elegant, I'm trying to understand how can I catch the error dynamically into a context variable and put it inside one tSendMail.
I'm not sure what code to put inside the tJava...or if even the design is correct...
appreciate your help
Hello,
You can pass error message to context value through tjavarow component and then send them by tsendmail with connection type of "OnsubjobError".
Best regards
Sabrina
@xdshi wrote:
Hello,
You can pass error message to context value through tjavarow component and then send them by tsendmail with connection type of "OnsubjobError".
Best regards
Sabrina
Thanks Sabrina,
I didn't quite understand - is it possible for you to add a screenshot or description on how to connect the components?
essentially error can come in any of the component so I'd like to context to be populated dynamically with the respective error of the component who made the error.
can i use one variable let's say: "context.ComponentError" and populate it dynamically? or should I create context for each one of the components participating in the job?
Hi !
Not sure of it but if I remember well you should be able to get it with one of the column of tLogCatcher, filtering on errors only !
Put the whole mailing things in a postJob component and it should do the trick.
Besides, checking on every component is very very heavy, I hope it's for a good reason. Try to use joblet if you can. It will make it clearer.
Sincerely,