Andrew Connell [MVP SharePoint]
1579 Posts |  42 Articles |  4864 Comments
.NET  |  MCMS  |  SharePoint  |  Office System
SharePoint Quick Links
Article Categories
Archives
Post Categories


Add to Technorati Favorites

This recently bit me and after some investigation, I thought it would be good to put this information out there.

Before Visual Studio 2008, you could build workflow templates with Visual Studio 2005 provided you installed (1) the VSeWWF to get the workflow designer, debugger, base activity library in the VS Toolbox and workflow project templates & (2) either the WSS v3 or MOSS 2007 SDK to get the SharePoint specific workflow templates. The only thing you needed to run these guys in a SharePoint v3 site was to have the .NET Framework 3.0 installed, which was no issue because that was already a prerequisite for WSS v3.

Visual Studio 2008, when you elect to include the Office dev tools as part of the install, gives you a template to create SharePoint 2007 [Sequential|Statemachine] Workflows. What's cool about this template is that it now lets developers hit F5 to do debugging without having to manually deploy and attach the debugger. Visual Studio does the association with a local SharePoint site's list. Very cool. Unfortunately it expects the Feature definition file that is used in deployment lives in the root of a project. Of course most of the world isn't doing this, rather we mimic the "12" folder in our projects. For us, the F5 debugging doesn't help a darn bit. So unfortunate... oh well, such is life.

If you haven't built a workflow in VS2008 for SharePoint, check out Robert Shelton's screencast on his blog... great little sample to watch (and a good blog to subscribe to at that).

Another thing was bugging me though: In order to get the SharePoint workflow template in Visual Studio 2008 to show up, you had to select the .NET Framework 3.5 as your target. Hmm... ok, so the Framework is now additive in nature these days. For instance, .NET 3.0 is really .NET 2.0 +SP1 + WPF + WCF + WWF + CardSpace. So does targeting .NET 3.5 really matter? Apparently it does. If you build a workflow with Visual Studio 2008 and use this template, your server MUST have .NET 3.5 installed. At present, Microsoft does not officially support SharePoint running on .NET 3.5, but rest assured, I'm sure they are working on it for a post SP1 update. Just keep this in mind when building workflows for your customers.

posted on Wednesday, January 02, 2008 3:14 PM

Feedback

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 1/3/2008 9:54 AM Justin Kobel
Gravatar Any idea on the support for InfoPath driven initiation, initialization, and task driven forms in Visual Studio 2008?

It appears as though Microsoft has dropped the ball on this one, requiring you to create these forms via content types in VS 2008. In my opinion, being able to create and manage the forms with InfoPath was a huge time saver, especially when an Agile methodology, where the forms would frequently change appearance at the request of the user groups.

# Workflows for MOSS using Visual Studio 2008 1/3/2008 12:39 PM Connecting Systems the Microsoft Way
Gravatar It all gets easier with 2008! Check out these links: Robert Shelton's screencast on his blog... Andrew...

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 1/3/2008 8:39 PM AC [MVP MOSS]
Gravatar Justin-
No ball has been dropped. It's still fully supported just as it was in VS 2005. You have to build the forms in InfoPath as that is the forms designer. Then you integreate them into the Feature's element manifest file just like you have always done.

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 1/7/2008 8:18 AM Wouter van Vugt
Gravatar For WSS workflow, I've started a project to support the creation of the forms using a templating approach. The next installment will include wizards.
http://www.codeplex.com/wss3workflow.
Hope it helps,
Wouter

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 1/7/2008 6:28 PM AC [MVP MOSS]
Gravatar Wouter van Vugt-
Now... this is a cool project! Thanks for taking the init to build it. Looking forward to taking the time to dig in!

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 1/13/2008 10:58 PM Wouter
Gravatar Cool. Glad you guys like it. I am joining up with Chris Predeek to move this forward a little bit more (think wizards etc... ) Chris also has some interesting workflow code to share!

Wouter

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 4/1/2009 6:26 PM Kunaal Kapoor
Gravatar I wanted to know what would be the advantages of using VS2008 over VS 2005 I am really familiar with the use of 05 and I need to develop Workflows using Framework 3.5(if not 3.0) and I have also downloaded the extensions for 2005 to support this.
I just wanted to know if I could possibly estimate the pros and cons of making a choice and reach a stand off between the time I would spend on 2005 and 2008 and the additional features and advantages of 2008.


# Multiple Document Workflows - Sharepoint 2007 4/6/2009 6:13 PM Patricia A Ward
Gravatar Is there any way I can choose multiple documents for one workflow - for example a document and all its appendices - all would need to be approved and updgraded to a major version at the same time. Is there a way of sending this as 1 workflow rather than say 10 separate workflows?

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 4/6/2009 6:23 PM AC [MVP MOSS]
Gravatar Patricia-
Nope... workflow instances are tied to a specfic item.

# re: Building Workflow Templates for SharePoint v3 Using Visual Studio 2008 11/20/2009 10:41 PM Justin Kelley
Gravatar Here's a scenario, hopefully I can explain this clearly : )

I accomplished deploying a custom ASPX page that queries data from a SQL table AND accepts user input, where the data defaulted from SQL and additional manual input fields are submitted as a request for funding. Here are the steps I followed to deploy this custom page: www.andrewconnell.com/.../...nSharePointSites.aspx

When the form submits, I serialize all data from the entire form into an XML string that populates a new list entry, along with other corresponding fields. This all works fine and dandy. The list schema looks something like: Submitted By, Submit Date, RequestData (XML), Approver 1, Approver 1 Comments, Approver 2, Approver 2 Comments, Approver n, Approver n Comments....

The next step to accomplish is firing parallell workflows from this list for each 1 through (n - 1) approver. Once the parallel folks have approved, I would like for approver n to be the final approver. So the requirement is for approvers 1 through (n - 1) to all approve in parallel, and once they've all approved it becomes a serial worflow for approver n to finalize.

With each approval I will need to parse and display the XML captured in the original request form. Underneath the read-only data from the original request, I would like to display a comment field that would capture comments from each approver, as denoted in the list schema.

My initial thoughts are to create an InfoPath form with codebehind that parses the XML and displays the request data along with the comments field, and provision that as the "task" form. The parallel workflows will each be separate approvals with this custom InfoPath form associated. Once these are approved, and only after they are all approved, the final approval workflow will need to be triggered. I'm open to suggestions as to how one might approach this.


Post Feedback

Title:
Name:
Email:
(email will not be displayed)
Url:
Comments: 
Please add 5 and 7 and type the answer here:    
All Comments Are Filtered & Moderated
Unfortunately comment spammers are just too effecient and are constantly dirtying up blogs with irrelevant and unwanted comments trying to improve their standing on search engines. All comments on this blog are moderated. I do not censor comments, but I don't approve comments with vulger language or those soliciting products. Most of the time comments are approved within a few hours of being submitted with the only exception when I'm traveling.

Why are you asking for my email address?
The only reason I'm asking for your email address, which isn't required to submit a comment, is to provide a gravatar if you've created an account for yourself and associated your email address with a small image. If you have a gravatar created for the email address you submit, it will appear next to your comment. Otherwise nothing will appear.

What is a gravatar?
A gravatar is a "globally recognized avatar." You can get more information about gravatars, as well as create your own for free, at www.gravatar.com. You can also view my gravatar here.


Copyright © 2003 - 2010 Andrew Connell
Creative Commons License 
This work is licensed under a Creative Commons License
Site design by Heather Solomon.

 
 
MOSS WCM Training
Looking for MOSS 2007 WCM developer training? Look no further! I teach my 5-day hands-on and online WCM classes for developers I offer through my company: Critical Path Training.

Get more information on the WCM courses!