First easy way (which wasn't work for me) is to create wsp package:
- After you built your project, you can right click on the project in Visual Studio and choose Package option
- Find wsp file in debug folder of your project (usually C:\Users\user1\Documents\Visual Studio 2010\Projects\MyWorflow\MyWorkflow\bin\Debug). If you want to you can rename MyWorflow.wsp to MyWorkflow.cab and look what VS did for you :)
- Upload a new solution - Open solution gallery in browser (Site Actions->Site Settings->Under Galleries section choose Solutions) and upload wsp file you have just created. Do not forget activate solution.
- By now you should see a new feature in Site collection features, but before adding workflow to your list you should check if a new assembly is installed otherwise workflow would be codeless :). You can find it here C:\Windows\assembly\. If the assembly file contain your dll everything is right. If there is not and if you are administrator you can drag and drop dll into assembly file or use gacutil to install dll.
- Now you can add a new workflow to your list and you should see your workflow name in "Select a workflow template" box. In this point this technique stops work for me
- If you don't know anything about features in SharePoint you should probably read this first: http://msdn.microsoft.com/en-us/library/ms460318.aspx and http://msdn.microsoft.com/en-us/library/ms475601.aspx
- To make it easier I ran workflow in debug mode on test server, then I have copied whole feature folder. Usually you can find feature folder here: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\FEATURES but of-course depend on your installation.
- I have pasted this folder into the same location on server where I wanted to deploy the workflow
- Then I have installed assembly of workflow using same way as I described above
- I have installed and activated a new feature using stsadm command tool. Command to install and activate feature you can find on my blog here: http://david-row.blogspot.com/2011/07/stsadm-commands-to-install-wsp-file.html
- After that I was able to add a new workflow to my list
If anyone has experience with this do not hesitate to comment it ;)
No comments:
Post a Comment