Article Digest: | SharePoint 2010 Log to History List workflow action nearly useless. Method to get limited value out of this action |
Article Type: | Bug, work around, annoyance, trouble shooting |
Environment(s) used in: | SharePoint 2010 with SharePoint Designer 2010 |
Problem Description: | When you have an error in a workflow and you are using the Update Item action you will get the following error text: The workflow could not update the item, possibly because one or more columns for the item require a different type of information. |
Design Criteria & Constraints: | NA |
Technologies Used: | SharePoint Designer 2010 |
Third-Party tools, utilities, products used: | Perhaps ULSViewer if you dare |
If you have worked with SharePoint 2010 Workflows created in SharePoint designer for anytime and have used them for anything but the most simple of workflows, you are aware of the value of the Log to History List workflow action. In SharePoint 2007 you could place this workflow action before a step to log something like “Changed widget type from thingy to gizmo (step 3).” If there were an error with the actions in step 3 you could see where there error was because logging would occur up to step 3 and then tell you that there was a horrible error and that the workflow could not continue.
Sadly, 2010 seems to just give you the most unhelpful error text that looks similar to the following:
|
|
|
|
| |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Error |
| The workflow could not update the item, possibly because one or more columns for the item require a different type of information. | Unknown error | ||||||||||||||
Error |
| An error has occurred in Job Applicant - Edit Item. |
This tells me there was an error which is very Microsoftian in that it is technically correct but utterly useless information. To find out the step where this is occurring, you can use the Stop Workflow action under the Core Actions section. Place this action after the first step that is questionable in your workflow. When you do this, you will get the text from the Log to History List actions on all the steps up to the point where you placed the Stop Workflow action, if, indeed, all of the actions up to that point completed successfully. Otherwise, you will get the error listed above. In which case, move your Stop Workflow action up one and run your workflow again. Once you have determined the offending step by moving the Stop Workflow action up or down in your workflow steps, you will have found the problem.
Hopefully Microsoft will fix this behavior in a future service pack. Another way you can potentially troubleshoot the issue is by using the freeware tool ULSViewer on Microsoft’s site. The caveat with using this utility is that you must run it on the SharePoint 2010 server and you need to know what you are looking for.
There may be other means to troubleshoot workflows but, since this is The Lazy Administrator blog, they wouldn’t be appropriate for me to post as they would require, well, more work. If you have illumination to provide regarding troubleshooting SharePoint Designer workflows, please feel free to post a response to this post.