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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Email trigger when a job gets failed

Hi All

 

Am facing an issue with an email notification when the job fails. Am not getting any email when the job fails

 

My job design will be like this.

 

tfileinputdelimited --> tmap-->toracleoutput

 

tlogcatcher -->tJavaRow

   |

onsubjobok

  |

Tsendmail

 

Am using below script in TJavaRow

globalMap.put("errorCode",row7.message);

 

In email am using below script

"the error message is : "+(String)globalMap.get("errorCode")

 

Please help me to fix this issue . Thanks in advance

Labels (2)
1 Reply
Anonymous
Not applicable
Author

Use a tPostJob component and add the logic to trigger the email to that component. The tPostJob will always run. During your job you will need to find a way of identifying whether the job has failed. An easy way is to set up a globalMap variable that holds a key of "Failure" and a value of true. If the job proceeds to the very end without error, after that, set the "Failure" value to false. Then the tPostJob will fire. Trigger the email logic based on the value of "Failure" being true. If the job is successful, that variable will have changed it value to false, therefore the email will not send