Click here to Skip to main content
Click here to Skip to main content

SharePoint Workflow Wizard in Visual Studio 2008

By , 15 May 2008
Rate this:
Please Sign up or sign in to vote.

Introduction

Visual Studio tools for office 2008 provides variety of workflow templates. Ofcourse, these workflow templates are based on Windows Workflow foundation (WF) . Continuing the efforts of integrating the other technologies usage and making the Visual Studio as a single UI IDE for developing various components of different technology, Microsoft have came up with few workflow templates specific for SharePoint in Visual Studio tools for office. This article will give you sneak preview about the sharepoint workflows and also provide details on why should we use the sharepoint workflow templates of Visual studio 2008. Visual Studio 2008 provides lot of workflow templates. If you see the screen , two of those belong to SharePoint.

1. SharePoint 2007 Sequential workflow
2. SharePoint 2007 State Machine workflow

Brief Overview

Sequential workflow represents a workflow as a sequence of steps that must be executed in order until the last activity is completed. A state machine workflow represents a set of states,transitions, and actions. One state is denoted as the start state, and then, based on an event, a transition can be made to another state. On the right side is a typical example of a Sequential workflow. When you select any of these workflow templates, it executes the workflow wizard that allows debugging on the workflows on SharePoint that requires special permissions. For e.g. this wizard takes care of deploying workflow customization on Global Assembly Cache (GAC).

2.JPG

Step 1. Select the workflow and the site for debugging

As soon as you select any of the workflow templates, (for this article, I am assuming that you selected the SharePoint 2007 Sequential Workflow), it presents a simple Wizard during project creation to capture settings in an easy-to-use Wizard. In the first step, it asks you to give the workflow a name and also choose a valid SharePoint site where the workflow will be deployed and debugged. One thing would be a restriction on this site selection is that this site should be a local site and cannot be a remote SharePoint site. I hope this issues gets resolved in upcoming SP1 version of VS 2008 . Click on "Next" to move to next step.

3.JPG

Step 2 : Choosing the library or list

Since you have selected the SharePoint site on the first step, this time you need to associate the workflow template with a document library or list. Before the VSTO 2008, this work has to be outside by going in the IDE of SharePoint. In this , you choose the document library or the lists. One thing to be aware is that, this wizard does not allow you to create new lists or library. This work has to be still done either manually by going to SharePoint or by using SharePoint object Model. Click on "Next" to move to next step.

4.JPG

Step3. : Invoking a workflow

On the last step, wizard lets you configure how an instance of your workflow can be started. There are three ways as shown on the screen

1. Manually by users

2. When an item is created

3. When an item is changed

The first two are selected by default for the easy. After setting these simple configurations in place, the wizard completes, and VSTO creates the new project.

5.JPG

Project created : Lets play now

After setting this, a project gets created and by default , few files like features.xml, workflow.xml etc gets created. Now you if you are an expert on workflow foundation, This is your time to do something with the workflow based on your business requirement. Once done, deployment is also as easy as pressing F5. Once deployment, workflow can be debugged by well within the Visual Studio IDE

6.JPG

Conclusion

Earlier debugging the workflow developed in WF and deployed in SharePoint requires a lot of manual steps to be done. These SharePoint workflow templates have brought a sigh of relief for all those developers. This simple wizard has really avoided lot of manual process. I am sure there are much more you will find in Visual studio 2008.

Happy Coding

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

About the Author

Nishith Pathak
Web Developer
India India
Nishith Pathak is an avid reader,Prolific writer, Speaker for Microsoft India,Published Author of APress and a Microsoft Purist.He is MVP, MCPD, MCTS MCSD.Net,MCAD.Net(EA),MCSD. His proficiency lies in exploring Microsoft technology and to share them with other peers. He is a contributing author and an avid technical reviewer for multiple electronic and print publications. He has recently co-authored a book on WCF called Pro WCF: Microsoft Practical SOA Implementation for APress Inc, USA. Over the years, he has also been involved in providing consultancy and training services to corporations. He has been awarded with Microsoft Most Valuable Professional (MVP).Working since beta version of .Net makes his competecy in .Net. He can be contacted at NisPathak@Hotmail.com or at his blog http://DotNetPathak.Blogspot.com. Currently he is focused on key areas of the Microsoft platform, specifically Distributed Computing, service orientation and exploring VISTA and help companies architecting solutions based on Service Oriented Architecture.

Comments and Discussions

 
GeneralMy vote of 1 Pinmemberavikerchithi5-Jul-11 10:29 
GeneralMy vote of 1 Pinmembermbadi25-Jun-10 20:54 
QuestionHow to access remote site Pinmemberkrishna36917-May-10 12:43 
General64-bit problem with Sharepoint Sequential Workflow Template [modified] PinmemberJakob Flygare19-Jan-10 10:46 
Generalhelp!!!!!!!!!!!!!! Pinmembersiddhesh15930-Jul-09 21:54 
GeneralI'm having a problem in deploying the above sample in the second time Pinmembersabithadivakaran31-May-09 22:52 
GeneralRe: I'm having a problem in deploying the above sample in the second time PingroupChintan.Desai5-Apr-13 0:06 
QuestionCreate visual studio 2008 workflow to a sharepoint sub sites PinmemberRobi-Robo18-May-09 20:28 
Questionwf task e-mail Pinmemberdon evangelista28-Jan-09 16:51 
Questionworkflow task e-mail Pinmemberdon evangelista28-Jan-09 16:50 
does someone have an idea on how to remove the character "?????" on the auto-generated e-mail from workflow by the field value that is left blank by the user?
AnswerRe: workflow task e-mail PinmemberOzgur KOC19-Mar-09 22:49 
GeneralSharepoint workflow with VS2008 - Configurable Approver PinmemberMember 344944230-Oct-08 11:27 
GeneralRe: Sharepoint workflow with VS2008 - Configurable Approver Pinmemberfred_11-Mar-10 5:39 
GeneralRe: Sharepoint workflow with VS2008 - Configurable Approver PinmemberMember 84421737-Dec-11 22:56 
QuestionWhat about production deployment? PinmemberMcSafe19-Aug-08 23:02 
AnswerRe: What about production deployment? PinmemberNishith Pathak20-Aug-08 20:06 
QuestionDifficulty moving workflow to sharepoint site PinmemberMember 456347529-Jul-08 7:33 
AnswerRe: Difficulty moving workflow to sharepoint site PinmemberNishith Pathak20-Aug-08 20:04 
QuestionWF in VS 2008 on Client machine Pinmembernmq3-Jul-08 20:03 
AnswerRe: WF in VS 2008 on Client machine Pinmembernmq7-Jul-08 23:16 
GeneralRe: WF in VS 2008 on Client machine PinmemberHansErik20-Aug-08 4:44 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Mobile
Web03 | 2.8.140415.2 | Last Updated 16 May 2008
Article Copyright 2008 by Nishith Pathak
Everything else Copyright © CodeProject, 1999-2014
Terms of Use
Layout: fixed | fluid