Dr. Dobb's is part of the Informa Tech Division of Informa PLC

This site is operated by a business or businesses owned by Informa PLC and all copyright resides with them. Informa PLC's registered office is 5 Howick Place, London SW1P 1WG. Registered in England and Wales. Number 8860726.


Channels ▼
RSS

.NET

Workflow in SharePoint 2007


Kevin is a Research Developer at Liquidnet, an equities trading system, where he has been researching Web 2.0, social software, and .NET 3.0. He can be contacted at [email protected].


Microsoft's .NET Framework 3.0 includes functionality and code libraries that could arguably be some of the most powerful advances in programming languages and development environments in recent history. Windows Presentation Foundation (WPF) provides for resolution-independent 2D and 3D declarative programming. Windows Communication Foundation (WCF) is an extremely powerful networking stack that can be used for everything from consuming and publishing web services to participating in peer networks over the Internet. Last but not least is the Windows Workflow Foundation (WF).

Windows Workflow Foundation is a facility that allows for bookmarked, resumable applications. By this I mean that, if coded properly, you can create workflow applications that can be stopped at any time and resumed at an arbitrary time in the future and can even be resumed from an arbitrary location, not necessarily the same workstation or client that initiated the workflow.

WF provides for two fundamental types of workflows:

  • Sequential workflows, which tend to be used for automated, unattended style applications/services.
  • State machine workflows, which are good at modeling human-application interaction workflows.

The core of the WF is the "activity"—a piece of code that executes at the behest of the workflow runtime, within the workflow environment. Applications made up of individual, resumable activities are called "Workflow Applications" and are represented either by C# classes or a combination of C# classes and XOML (basically XAML for workflows) files. Services such as tracking and persistence can be added to a workflow engine so that you can pick up a workflow where it left off as well as keep track of every important event during the lifetime of a workflow application.

For a great book on WF, check out Dharma Shukla and Bob Schmidt's Essential Windows Workflow Foundation (Addison-Wesley Professional, 2006). If you plan on doing any serious workflow work with SharePoint, this book is mandatory reading.

So how does this all apply to SharePoint? The newest version of Windows SharePoint—the free add-on to Windows Server 2003 that offers basic web portal and intranet functionality (www.microsoft.com/technet/windowsserver/sharepoint/)—comes with powerful features, including integration with the Workflow Foundation. As far as end users are concerned, SharePoint's integration with WF is what lets them start an Approval Workflow or a Feedback Collection Workflow. If users want to collect feedback on a specific document, they can start a workflow on that document that controls SharePoint's behavior and accepts input that will be stored on workflow-bound tasks.

Developers, on the other hand, should have a far more in-depth knowledge of how WF integrates with SharePoint and what you can do with it. There are several scenarios that developers should be aware of when considering WF applications and SharePoint:

  • Creating one-off Workflows using Microsoft Office SharePoint Designer 2007.
  • Creating globally available Workflows using Visual Studio 2005.
  • Accessing SharePoint's Workflow Object Model.
  • Accessing SharePoint's Workflow web service.

In this article, I introduce you to WF with SharePoint and give you some places to start your own learning and experimenting. WF is a huge topic, and WF's integration with SharePoint is a topic almost as big. Here, I provide an overview of each of the developer scenarios and information on where you can go to get more detail.


Related Reading


More Insights






Currently we allow the following HTML tags in comments:

Single tags

These tags can be used alone and don't need an ending tag.

<br> Defines a single line break

<hr> Defines a horizontal line

Matching tags

These require an ending tag - e.g. <i>italic text</i>

<a> Defines an anchor

<b> Defines bold text

<big> Defines big text

<blockquote> Defines a long quotation

<caption> Defines a table caption

<cite> Defines a citation

<code> Defines computer code text

<em> Defines emphasized text

<fieldset> Defines a border around elements in a form

<h1> This is heading 1

<h2> This is heading 2

<h3> This is heading 3

<h4> This is heading 4

<h5> This is heading 5

<h6> This is heading 6

<i> Defines italic text

<p> Defines a paragraph

<pre> Defines preformatted text

<q> Defines a short quotation

<samp> Defines sample computer code text

<small> Defines small text

<span> Defines a section in a document

<s> Defines strikethrough text

<strike> Defines strikethrough text

<strong> Defines strong text

<sub> Defines subscripted text

<sup> Defines superscripted text

<u> Defines underlined text

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task. However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

 
Disqus Tips To upload an avatar photo, first complete your Disqus profile. | View the list of supported HTML tags you can use to style comments. | Please read our commenting policy.