What is the best way to report errors from a SharePoint workflow?

I have a user action in the workflow and you want to report an error to the user when something goes wrong. What is the best way to do this?

UPD: Ideally, I would like to put the workflow in an error state and log the message in the workflow log. This is not possible. What is the closest I can get? I want to use a reusable solution that is easy to configure for users when using my custom actions in SharePoint Designer.


Added a more detailed description of the issue.

@mauro, which takes care of saving the error, but how can I show the error to the user in a way that makes sense?

@AdamSane This seems like a pretty fragile solution. It is not a question of setting this up on one site. I need something that others can add using SPD.

+3
source share
4 answers

when you throw an error, your error handler can then send a message to the user by e-mail, or, if it’s better, if the list is massive, add the error state to the workflow element - I think this is the default function, although, as the error says .

http://www.sharepointsecurity.com/blog/sharepoint/sharepoint-2007-development/fault-handling-in-sharepoint-workflows/

+1
source

. ( ) / . - FlexListViewer . , .

, 2 , . , .

db, , sharepoint .

. . ( , , ) sharepoint. , .

0

. , , , ? , , , ?

A log file will be the best way, so you will only rely on an accessible file system — you don’t have to worry about capture errors when connecting to the database, etc.

Mauro

0
source

If you need to perform some actions as a result of an error (for example, repeat a workflow), is it possible to create a task for this user with information about the error and location of the workflow?

0
source

Source: https://habr.com/ru/post/1696448/


All Articles