Transferred from Blogspot address (days do not allow access): http://blog-sharepoint.blogspot.com/2010/02/sharepoint-workflow-errors-descriptions.html the following table lists some of the common errors that can occur in a workflow developed using SharePoint designer. A short description of some of the likely causes for each error are also provided. more detailed examples of the following scenarios where an error may occur in a Sharepoint designer workflow are also provided later in this post:
- Exiting/breaking a looping workflow using workflow errors
- Workflow Permissions
- Changing the name of a document in a document library
If you come into ss a workflow error which is not explained below, please post details in a comment to this post. I will ammend the table and information below to include any additional errors, descriptions and possible causes to build a comprehensive list of workflow errors and resolutions when developing using SharePoint designer.
Workflow error summary table
Status/Event Type |
Description |
Outcome |
Possible cause (s) |
Error |
Error updating a list item |
List item not found |
No item in the list matching the critera used to find a list item being updated. |
Error |
Error updating a list item |
Access denied |
Permissions of the user who initiated the workflow don't allow them to modify data in the list item. |
-Stopped Event Type: Error |
Error deleting a list item |
Access denied |
Permissions of the user who initiated the workflow don't allow the user to delete items from the list. |
Error |
Error updating a list item |
Unknown error |
Attempting to update approval status of a list item from a workflow initiated by a user without approve permissions on the list/library. |
-Failed on START (retrying) -Stopped (Event Type: Error) |
Error updating a list item |
Unknown error |
Incorrect data types. Eg. Attempting to include illegal characters in the filename of a document by appending the date to the filename. Permissions: Attempting to update a list item using the permissions of the user who initiated the workflow, who doesn't have access to update items in the list. |
Error |
An error has occured in... workflow name |
|
A previous workflow error has caused the workflow to halt. |
Error |
Error updating a list item |
Document must be checked out |
The document or list item being updated is in a list or library with force checkout enabled. First check out the document before making changes from a workflow, or disable force checkout. Note: Setting the approval status via a workflow created using SharePoint designer is not possible when force checkout is enabled. |
Below are a series of scenarios where workflows developed using SharePoint designer will halt or stop due to a workflow error. an explanation of the cause of the error, as well as a resolution or workaround for the issue are also provided for each scenario. there are also instances where a workflow error can be caused intentionally to break a looping or repeating set of workflows once the looping sequence has completed (eg. processing all list items-see below ).
Error scenarios
Exiting/breaking a looping workflow using workflow errors: Looping workflows developed using SharePoint designer are often configured to stop due to a list item not being found. for example, when processing all items in a list using looping workflows, each instance may be initiated by updating a field from each item in the list being processed to initiate a separate iteration of the loop for each item. when all items have been processed, the workflow will not be able to find the next list item ADN as a result will halt with an error ("error updating a list item ": "list item not found "). in cases similar to this, the workflow may not have stopped, as the workflow will sometimes retry the operation which caused an error depending on the type and severity of the error. also, some errors will prevent new instances of the workflow initiating on the same list item with a workflow error. in scenarios where the workflow process shoshould loop, this can be a problem as the workflow may not be able to move past the first iteration, or will cause the loop to stop if a workflow halts midway through the looping process.
resolution/workaround: To ensure that a workflow loop continues until it has completed all required iterations, refreshing the workflow initiate when an item is added to the List will result in each workflow initiated for each iteration of the loop being associated with a different list item. if one of the workflows halts due to an error (intentionally or unintentioanlly ), the remaining iterations and components of the workflow can still continue as they will always be initiated on new list items added to the List. to help keep lists tidy, it may be a good idea to include an action late in the workflow to remove the current (temporary) list item once it has completed operations required for the current iteration and initiated the next iteration of the loop. after all items in the separate list have been processed. the workflow for the final list item created will stop due to a "list item not found" error. as there will be not remaining items in the list which match the criteria required to find and initiate the next iteration, the loop will stop, breaking out of the looping sequence.
Workflow permissions: It is very common for developers of workflows in Sharepoint to have elevated permissions on the SharePoint site collection in comparison to the general end-users of the SharePoint environment. this can lead to workflows not functioning as expected, or not working at all once in use, as testing may have been completed using the permissions of the workflow developer. to help prevent access/permission issues with workflows in Sharepoint, you shoshould always thoroughly test workflows using accounts with identical permissions to end-users of the SharePoint environment and workflow. in some cases this may require you to test using multiple accounts with varying permissions matching that of the end-users, or to change the permission level of one or two test accounts in order to test all possible scenarios. as a workflow runs using the permissions of the user who initiated/triggered the workflow, in your cases during development it will be running using the credentials/permissions of the developer. if the developer has elevated access to components on the SharePoint site including lists associated with the workflow, the workflow will often function as expected during development, but not work once deployed into a production environment.
Resolution/workaround: When a workflow is initiated by a user with standard permissions, and the workflow needs to complete actions that wocould require the user to have a greater permission level on the site and lists, you can split the worklfow into components which are then initiated by users with the required permissions.
For example, a general user may make a change to a document stored in a document library with content approval enabled. A custom approval workflow is initiated to create and assign tasks to have the changes approved. as the approval task is created by the workflow running as the user who submitted the changes for approval, the user requires permissions that allow them to add items to the approval task list.
If using the "collect data from user" action to get the approval status of the changes from an approver, the workflow will continue to run as the user who initiated the worklfow (not the approver) once the approval status has been collected. this will result in a workflow error if you try to update the approval status of the list item or document, as the user who made and submitted the changes for approval doesn' t have approve permissions on the list/library. A solution for this problem is to split the workflow into two separate workflows. one to initiate the approval process and create the approval task item, and a second workflow on the workflow task list which will be initiated by the approver when the approval status for the changes is set. you will not be able to use the "collect data from user" action, as this will result in the workflow continuing using the credentials of the user who initiated the workflow and a workflow error when attempting to set the approval status. instead, you shoshould create a new content type with only the fields required to collect the approval status for a modified list item and use the "Create list item" action to create the approval task. once created, associate the content type with a task or other list type, making it the default and only content type available on the "new" menu for the list. in the workflow associated with the Content Approval enabled list, you shocould use the "Create list item" action to add an approval task item to the task list, then complete the workflow (STOP ).
The second workflow associated with the task list shocould be configured to initiate when an item in the approval task list is modified. the first step in the workflow shocould be to check to see if the content approval status has been set by the approver. if not, then the workflow can stop as it will be reinitiated when the approval status is updated by an approver. if the approval status has been set, then the workflow can continue to update the approval status of the list item or document that was changed and submitted for approval. the approval status can now be set by the workflow as it will be running using the permissions of the approver, not the user who initiated the approval process.
column Data Types & limitations attempting to set the value of a column in SharePoint that requires a specific data type such as a list item ID, date or filename (name) will result in a workflow error when the incorrect data is assigned to a field/column in the list item or document. when developing workflows using SharePoint designer, restrictions have been implemented to help ensure that the correct data type is used when setting workflow variables or fields in a list item. for example, when setting the value of a date/time field, only a date variable or field can be set as the new date value. similarly, when working with list items in SharePoint from a workflow, sharePoint designer uses the list item ID data type when retrieving or storing the ID of the current or another list item to ensure that only one (unique) item is returned.
Changing the name of documents in a document library from a Workflow-Difference between the "name" and "Name (for use in forms)" fields-Illegal/special characters in document filenames causing workflow errors. -how to use calculated columns to remove illegal/special characters from a date or other field to be set or sorted ded in the document filename.
The "name" and "Name (for use in forms)" columns in A SharePoint document library both refer to the same data, being the filename of the Document of file, but function differently when updated by a workflow developed using SharePoint designer. the main difference when using the name columns in a workflow is that the file extension for the document is wrongly ded when using the "Name (for use in forms)" column, but not the "name" column.
- Name-Doesn' t include file extension
- Name (for use in forms)-Includes File Extension
When setting the value for the "name" or "Name (for use in forms)" fields, special/illegal characters need to be considered, as the workflow will stop with an "error updating a list item" error, with the outcome "Unknown error ". this is due to the fact the SharePoint doesn't allow specific characters to be stored in the name (filename) of a document stored in a document library. see illegal characters in SharePoint document libraries for more information about non-supported special characters for filenames in Sharepoint.
Use calculated columns to format the created date to be appended to the filename (name) of a document or form:
1. configure a calculated column on the SharePoint Document LibraryThat formats the created date as a string with no illegal/special characters, that can then be encoded in the filename of the document. calculated column: generate a text string containing the created date in a specific format (DD-mm-yyyy: 03-02-2010)
= Text ([created], "DD-mm-YYYY ")
2. configure a workflow to append the value from the calculated column to the "Name (for use in forms)" fields of the document . To append the date to an existing filename, you will need to use the value from the "name" column, as it will not include the file extension. you wocould do this using the "Build Dynamic string" workflow action, which wocould first take the original filename (without the file extension ), then append the value from the calculated column containing the formatted date. the file extension can be encoded in the new filename string, but is not required. once the new filename have been generated, you can set the "Name (for use in forms)" field for the current item using the "update list item" action, or the "Set field in current item" action.
Related:
Troubleshoot workflow errors
Access denied when trying to upload multiple files to a Sharepoint library when one of the files contains an illegal character.
Published by wiz