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 SharePointthe 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.