Troubleshoot workflow errors (SharePoint Server 2010)
Si applica a: SharePoint Foundation 2010, SharePoint Server 2010
Ultima modifica dell'argomento: 2016-11-30
Workflows are affected by problems in the user environment, especially the state of list items that a workflow operates upon and the server settings that govern workflows. When a problem is detected, workflows fail. The most common reasons for workflow failure are a defect in the workflow design, network issues, or restricted user permissions. Because of the high dependency on all these factors and the complexity with which workflows are built, troubleshooting workflows can be challenging.
A workflow can fail for many reasons. For example, a workflow may be designed to create a new item in a library, but the library might have been deleted. Another possibility is that user permissions may have been changed since the workflow was started. This prevents a user from accessing the site to complete a workflow task. When a workflow does not complete successfully, its final status appears in the column with that workflow's name, in the list with which the workflow is associated.
In addition to the Completed status, a final status that you might see in this column is Error Occurred, Stopped, Failed on start (retrying), or Failed on start.
When the final status of a workflow is Error Occurred, the first step in troubleshooting the workflow is to determine the cause of the error. The troubleshooting method that you use depends on the type of workflow in which the error occurred: a predefined workflow, a Microsoft SharePoint Designer workflow, or a Visual Studio custom workflow.
For predefined workflows, the workflow history list is a good troubleshooting tool. The workflow history displays the current state and all the previous states for a running workflow. When an error occurs in a workflow, the last event in the workflow history list is titled Error. The list provides information about when the error occurred, but the list typically does not provide a description of the problem to avoid revealing sensitive information that could lead to a security issue. The most common errors are caused by connectivity problems, incorrect e-mail settings, or restricted user permissions.
For information about how to access the workflow history list, see View workflow reports (SharePoint Server 2010).
For Microsoft SharePoint Designer workflows, when you create the workflow, you can insert actions that write to the history list at any point in the workflow. This information helps you determine the last successful step that the workflow completed before the error occurred and also the step in which the error occurred.
For Visual Studio custom workflows, you can use all the debugging functionality available with Visual Studio and the troubleshooting options for predefined workflows.
Nota
For more information about how to debug workflows, see Step 5: Debug Your Workflow (https://go.microsoft.com/fwlink/p/?LinkID=107820) on the Microsoft SharePoint team blog.