Sunday, May 31, 2009

Custom workflow creation/deployment in Sharepoint Server 2007 64-bit

This article provides references and tips on how to create and deploy a custom workflow on Sharepoint Server 2007 64-bit using Visual Studio 2008.

The main article that I used as reference was this. This explains how to do the same on Visual Studio 2005.
http://www.documentmanagementworkflowinfo.com/workflow/how-to-create-custom-visual-studio-2005-workflows-wss-3-office-sharepoint-server-2007.htm

I will only list the differences from the steps in the link above in this blog post.

  • The "Sequential Worflow" project template in Visual Studio crashes when run against 64-bit Sharepoint Server (https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=407711&wa=wsignin1.0). As a result, we use the "Sequential Workflow Library" project template which works fine. Infact, all the steps in the Visual studio 2005 link on this page actually use the "Sequential Workflow Library" project template.
  • There were a lot of changes particularly in the deployment of the workflow on the server as mentioned in this link http://www.documentmanagementworkflowinfo.com/workflow/how-to-manually-deploy-visual-studio-2005-workflow-sharepoint.htm. First observation is that the workflow.xml and feature.xml files are not created automatically in the Visual Studio project. In my case, I had to manually create the files and add them to the project. The contents of the files are similar to those given in the link above. Ensure that you replace the GUID values (any random GUID works - I took the project GUID from the csproj files for my workflow project), the workflow project name, the workflow assembly name and the public key appropriately in both the xml files. The final issue that was that I could not find any install.bat file that the link mentions. Hence, I manually located the spsadm.exe file at C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN (you should be able to find it at a similar path) and ran the commands mentioned in the link to install and activate the workflow.