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!!

Wednesday, November 3, 2010

The update cannot be started because the content sources cannot be accessed

Event Type:   Error
Event Source: Windows SharePoint Services 3 Search
Event Category:       Gatherer
Event ID:       2424
Date:            10/22/2010
Time:            6:25:08 AM
User:            N/A
Computer:     <ServerName>
Description:
The update cannot be started because the content sources cannot be accessed. Fix the errors and try the update again.
Context: Application 'Search', Catalog 'index file on the search server Search'
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.


The update cannot be started because the content sources cannot be accessed. This error usually occurs in SharePoint index server with an event id:2424.One may have noticed that this error will occur when the search content sources was in progress and this will be repetitive in fashion, say in every 5 minutes.

Follow the steps below for a simple fix:-
1. Login with Farm account on MOSS index server.
2. Open the services console start à Run à services.msc
3. Right click on "Windows SharePoint Services Search" à properties
4. Click on Log on tab; make sure you have "This account" enabled
5. Click in "Browse" to select the same farm account.
Your logon entry will look like the below, "Log on As" changed from "<domain\FarmAccount>" before then change to "<FarmAccount@domain.com>" thereafter.





6. Click on Apply, and then say OK.
7. Finally stop "Windows SharePoint Services Search" service and restart it again.

Stay sometime in the server and verify the errors. It should be stopped by then!