Thursday, July 9, 2015

SharePoint list designer workflow constantly failed to set item title to the item name with "Unknown error"

Recently we have increasing SharePoint list designer workflow failed on many different SharePoint 2013 sites. Although most of the SharePoint list designer workflow are very simple that only includes 2010 workflow activities, we have noticed "Unknown error" is the most common error for failed workflows.

In the effort to identify the root cause of the issue, we are able to reproduce the error from one SharePoint list designer workflow. This SharePoint list designer workflow is simple and will update the item title with the name when new item added or modified as in the screenshot.

We have email enabled for this list and use email to send email to the list to create item. After emailing several items to the list, you will be able to find some workflows error out. This is constant across several different SharePoint environments. The workflow could be in either "Error Occurred" or "Failed on Start (retrying)".

We have some other SharePoint list designer workflow issues we might need to address later. Please note if the email does not trigger workflow on the list, you might need to verify server setting

$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled

If it is False, please enable it with the PowerShell command below and then check the results:
$spWebService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService $spWebService.DeclarativeWorkflowAutoStartOnEmailEnabled = $true $spWebService.Update()

After debugging with Microsoft, we found if we add 1 to 5 minutes pause as first activity of the workflow, we are able to complete these workflows. We had to cleanup many failed workflows and make system clean.