Friday, September 19, 2008

Workflows saved with template are not working

we were working on a site customization requirement which involved creation of SharePoint workflows using SharePoint designer. These workflows and the other site customization were saved as the site template. Client will be using this template to create number of sharepoint sites based on his business requirement.

During the testing phase, we found few of the workflows saved with template didn't work and gave the "Failed on start(retrying)" error messsage on the sites created using the root site template. However the workflows were working fine in the root site.

We did lot of research and came to the follwoing conclusion. This issue is not happeing only to my project, its happening even if you try to do this steps in a vennila SharePoint site created based on team site template .

Conclusion
1.In the rootsite, if you did any kind of modification in the workflow (ie; open the workflow in the SharePoint designer, do some changes and save it again) these workflows will not work in the sites created based on the root site template.

2. However if you didn't do any modification in the workflow after its first tiem save. Then the workflow will be working fine in the sites created based on the root site template.

Workarounds
1. If you would like to do some modification in the workflows after it saved successfully first time, just delete it from the sharePOint designer and recreate it again. Don't do any modification and save it again.

2. If you would like to resolve the issue without modifying the root site template, you need to open the problematic workflows in Sharepoint designer and just click the "finish" button in the wizard. This will resolve the issue and the workflow will be working fine for all the upcoming items in the list.

3. If your project schedule and processes allowed for changing the structure of the SharePoint workflow, just recreate it in visual studio and deploy it as a site collection feature. This will resolve all the deployment related issue

Deploying the workflows with templates is not suggested by many of the Microsoft MVPs. However its working fine for me now and i m not going for any other modifications because whatever method you follow at the end of the day the client should be happy :) its happening for me so no worries...:D

No comments: