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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Dynamically populate context variable with Component Error Message

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

 

0683p000009M8Q4.png

Labels (3)
3 Replies
Anonymous
Not applicable
Author

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

Anonymous
Not applicable
Author


@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?

rmartin2
Creator II
Creator II

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,