Tuesday, November 30, 2010

Failed to load the workflow in SharePoint Designer

 
Seems to be a common error find by the users and I think a simple fix around us to make it work. When you open a SP Designer 2007 to create a new workflow or to open an existing workflow, you may get a prompt to see this error “Failed to load the workflow”

Don’t be panic, try the step below
For Windows XP Users
Locate  to C:\Documents and Settings\<your user name>\Application Data\Microsoft\SharePoint Designer\ProxyAssemblyCache\
If you are running on Vista, a location is little different
C:\users\<your user name>\appdata\roaming\microsoft\sharepoint designer\proxyassemblycache
and delete (12.x.x.xxxx) folder. Then Open the SP Designer and try to create/open the existing workflow. If it works, good to go!! It is true that the above steps may not work all the time.
Otherwise, I’d assume that the possible cause of the error to make use of custom workflow activities within the workflow, because I landed in a similar scenario where I was trying pull out existing workflow with the custom workflow activities involved.
Before I directly jump on to the resolution, let me brief out the steps taken by me to see the prompt error message “Failed to load the workflow”. Just to know you, I have created a workflow with some custom user Profile activities by EdinKapic involved. I had to migrate the content DB of this application from one environment to another. I have added and deployed the EdinKapic’s solution then I successfully attached the Content DB. When I tried to open the workflow in designer to make the appropriate modifications in existing workflow. I see the error message “Failed to load the workflow”. I then decided to create a new workflow. When I tried to add custom activity from Action menu, nothing would happen. No errors either. It’s just like my selection of Action had No effect.  Believe Me! It really pulled my hairs.
These are the steps performed to get it worked!

1.   Make sure to check the custom solution is properly installed and deployed on respective application.
2.   Verify the assembly is GAC in SP Server and all WFEs (If any). Also check the assembly version and namespaces.
3.   Open the designer, find the Workflow XOML and open as a text file. Make sure the assembly version and namespaces are same as GAC.
4.   Open the web.config file to verify the SafeControl entries are properly fitted.
5.   Also make sure the AuthorizedType tag for each custom solution is present under <System.Workflow.ComponenetModel.WorkflowCompiler> section. In my case, I have a EdinKapic solution which you can find in below screen print. It is important to check the above entries in all the WFEs config file. If your web application is configured on any port and its Domain alias name is configured on port:80, make sure the SafeControl entries and AuthorizedType entries are added in port:80 web.config as well.
6.   IISRESET in all the WFEs.
7.   Finally Activate the feature, Open the CA à Application Management à manage Web Application Features à Select the desired web Application where you want to activate the feature à Activate the Feature.
8.   Open the designer and try to create/ edit the existing workflow. You should see the Custom workflow activities come over!!

If the above steps help you find the fix, then keep sharing the blog with your friends.
Feel free to post any comment you have!!

3 comments:

  1. Thanks!!

    These steps helped my to resolve my similar issue

    Samual Paul

    ReplyDelete
  2. Thanks a bunch. you saved my day.

    ReplyDelete
  3. Thanks a lot! Unknown are Sharepoint's ways...

    ReplyDelete