You are viewing limited content. For full access, please sign in.

Question

Question

How can I get an email notification immediately when a Workflow error message happens?

asked on April 1, 2022

I have some workflows that are taking data to an SQL lookup table and unknown users in the future will be doing the data entry via a form process that starts a workflow to send the data.  The data does not always save into the SQL lookup table and I want to be notified immediately when that happens.  

So, is there a setting I can configure that will send me notifications? 

  • I considered adding an Email activity to send to me after each WF session, however, the email activity doesn't seem to have the ability to just show me any messages.  
  • I looked at the WF properties where "Configure termination notifications" is but I can't see any options there.
0 0

Answer

SELECTED ANSWER
replied on April 1, 2022 Show version history

Usually what I do is put the SQL insert/update activities in a Try-Catch and have the Catch branch send the email. You can then have it rethrow the error to terminate the workflow.

3 0
replied on April 1, 2022

This is the way.

0 0
replied on April 1, 2022

As a follow up to this, here are some other things to consider:

1) If you set Forms to "wait for the workflow to finish" you would get suspended instances when the wf terminates which would let you know something went wrong, but also give you an easy way to retry without a lot of manual data correction after you look into the issue.

 

2) Once you get your try-catch in place, start keeping track of what kind of errors you are encountering. If they are one-off errors, like a random timeout or something, then you could build in a time-delayed retry and look at ways to prevent the error too.

If it is a data validation issue, such as things being too long for the column, invalid characters, empty values for non-nullable columns, etc., then you can start enhancing the validation on your form and adding cleanup and such to your workflow.

 

2 0
replied on April 4, 2022

Awesome, Jason, Thanks!  Some really good tips here that I will use!

0 0

Replies

You are not allowed to reply in this post.
You are not allowed to follow up in this post.

Sign in to reply to this post.