Exporting SharePoint Designer 2010 Work flow to Visual Studio


In this article I am showing you how to export a SharePoint Designer 2010 work flow to Visual Studio.

1. First you have to open your site in SharePoint Designer.

2. From the Ribbon click Reusable Workflow.

image1.gif

3. From the next screen give proper name for your work flow then select the Content type you want to associate this work flow.

image2.gif

4. I have selected a Simple approval work flow and clicked ok as shown below.

image3.gif

5. You have to save the work flow by clicking Save

image4.gif

6. Now you have to publish the work flow to be able to reuse it in all the sites from site collection in SharePoint.

7. Click on Publish Globally.

image5.gif

8. You will get a conformation like below click OK.

image6.gif

9. Click on Workflow settings.

image7.gif

10. Then click on Save as template.

image8.gif

11. Now your work flow will be saved as template in your Site Assets.

image9.gif

12. Now save your work flow template locally.

image10.gif

13. Now open your Visual Studio 2010 and Select Import SharePoint Solution Package.

image11.gif

14. Then Click OK.

15. Give the web application URL click Next.

image12.gif
.
16. From the next screen browse our Work flow template and click OK.

image13.gif

17. You will get the below screen then click Finish.

image14.gif

18. Now your work flow be imported to Visual Studio.

image15.gif

19. Once you modified the Workflow then deploy the solution.