.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> SharePoint >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Deploying Workflow as WSP File in SharePoint

Posted By:Jean Paul       Posted Date: January 29, 2013    Points: 200    Category: SharePoint    URL: http://www.dotnetspark.com  

In this article we will experiment with deployment of Workflow using the WSP file in SharePoint.
 


In this article we can learn how to:

·  Create WSP using Visual Studio 2010
·  Deploy WSP to another SharePoint site
·  Export a Workflow as WSP

WSP Extension


A file with WSP extension represents SharePoint Solution Package.  It is actually a cab file.  When we create a workflow and make a WSP file we can use the file to deploy the Workflow to multiple SharePoint sites.

Creating a WSP File inside Visual Studio


We have to use the Package command for the solution to create the WSP file.




You can get the WSP file inside the bin\Debug folder of the solution.



The WSP file is actually a cabinet file.  You can try opening it with Winzip/Winrar as shown below to see the contents.



Deploying WSP to SharePoint


Now we can deploy the WSP file to SharePoint.  For this do the following steps.

Open the SharePoint site and use Site Settings > View All Site Content > Site Assets.



Click on the Add document link as highlighted above.



In the appearing dialog box select the WSP file we generated and click the OK button.

After this step we need to activate the solution from Site Settings > Galleries  > Solutions.


Deploying using stsadm


We can deploy the solution using the command line tool of SharePoint.  You can open the SharePoint 2010 Management Shell console from the start menu.  Execute the following command once in the debug folder.

Stsadm -o addsolution -filename YourSolution.WSP


Once done with the above command open SharePoint Central Administration and from System Settings > Manage Farm Solutions > Select the workflow and click on Deploy Solution button as shown below.


Now go back to the SharePoint site and use Site Actions > Site Settings > Site collection features to activate the workflow.



Now use the Site Actions > Site Settings > Workflow settings page to add the workflow.



The deployment is completed and the Workflow is activated.  You can access the workflow from List > Site Workflows > WF2.



Export a Workflow as WSP



Now we can try exporting a WSP file from an existing SharePoint site.  The exported file can be used to deploy to another SharePoint server.  For exporting follow the steps below.

Open Site Assets from Site Actions > View All Site Content.


Click on an existing Workflow, for example Contact Workflow in the above screen.  The browser will prompt with the Save As dialog.  Click the Save button to get the WSP file.  This file can be used to deploy the solution to another SharePoint server.

References


http://technet.microsoft.com/en-us/library/ff608051.aspx
http://msdn.microsoft.com/en-us/library/aa543214.aspx
http://technet.microsoft.com/en-us/library/cc261956(office.12).aspx

Summary


In this article we have experimented with deployment of Workflow using the WSP file.

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend