Saturday, March 21, 2015

SharePoint 2013: Failed to load this workflow

Problem

The following are some common problems encountered when migrating workflows from one 2013 farm to another and their solutions.

Failed to load this workflow

You see the following error appear after clicking on a 2013 workflow in SharePoint Designer 2013:
If you simply click OK, and then attempt to open the workflow again in edit mode, by clicking on it in the Workflows listing, you may see the following error:
If instead of clicking on it in the Workflows listing, you only select it, and then click the Edit Workflow button on the ribbon, you may see this error:

Solution Option 1

The first and easiest solution to this problem is to restart SharePoint Designer, as directed in the error prompt.  From my experience, this works in most cases.

Solution Option 2

If this doesn't work, the next thing to try is: 1) closing Designer, 2) clearing your application caches:

%APPDATA%\Microsoft\Web Server Extensions\Cache
%APPDATA%\Microsoft\SharePoint Designer\ProxyAssemblyCache
%USERPROFILE%\AppData\Local\Microsoft\WebsiteCache

and then restarting designer.  From my experience, this, works in some cases.

Solution Option 3

A reader of this blog (see comment below) noted another possibility: disconnected stages.  If your 2013 workflow does not connect all the stages, it may trigger an error.  This issue is discussed in this Microsoft Hotfix: Description of the SharePoint Designer 2013 hotfix package (Spd-x-none.msp): April 8, 2014.  Thanks to the reader who brought this to attention.

Solution Option 4

From my experience, if these solutions do not resolve the problem, the cause of the problem may not be infrastructure related at all but instead may involve workflow design.

For example, one 2013 workflow designer had mistakenly implemented a type mismatch in her design (a variable of one type was being pushed into a variable of another type).  This resulted in various error events logged to the Application log of the server on which Workflow Manager 1.0 service was running.  Over a month of work was spent attempting to trace what was thought to be an infrastructure issue; a Microsoft Support request was also initiated on this.  Microsoft Support enabled us to eventually trace the issue to the workflow itself and verify it had nothing to do with infrastructure.

References

5 comments:

Anonymous said...

One more reason - SharePoint Designer cannot load the existing workflows that contain disconnected stages

Hot fix: https://support.microsoft.com/en-us/kb/2837667

PaulE said...

Note that this series of errors can also occur if you are attempting to open a Visual Studio workflow from within Designer.

Anonymous said...

....so pretty much the error messages are useless and that it could be any number of things...

Great stuff MS.

Anonymous said...

#3 just saved me about a week's work. Thought I'd have to go through the extremely tedious process of crafting a workflow all over again. THANK YOU.

Jeff said...

Clearing the cache did not solve only the issue (without reboot). So I downloaded those 3 KB, x86 version, and it solved the problem.

https://support.microsoft.com/en-us/help/2837667/description-of-the-sharepoint-designer-2013-hotfix-package-spd-x-none
support.microsoft.com

https://support.microsoft.com/fr-fr/hotfix/kbhotfix?kbnum=2727100&kbln=en-US


https://support.microsoft.com/fr-fr/hotfix/kbhotfix?kbnum=2768343&kbln=en-US