Home > Microsoft .Net Development Tips > .NET Architecture > Beginning Windows Workflow Foundation development, Part 1
Win Development Tips:
EMAIL THIS
 TIPS & NEWSLETTERS TOPICS 

.NET ARCHITECTURE

Beginning Windows Workflow Foundation development, Part 1


Brian Eastwood, Site Editor
09.12.2006
Rating: --- (out of 5)


Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


As its name implies, Microsoft's Windows Workflow Foundation, or WF, is a framework for creating workflow-enabled applications. It has emerged as a major piece of .NET 3.0 and, thus, developing applications for Windows Vista.

Workflow here refers to the sequence of, and relationship among, events in a process like verifying a customer's credit card information or filling out a survey. WF defines the events in a workflow as activities, links them to a runtime engine and runtime services and gives developers the ability to apply persistence, tracking and serialization to workflows and activities.

A good starting point is Manage application processes with WF, an article by Brian Noyes on sister site TheServerSide.NET. Once a workflow has been designed -- graphically, using Visual Studio 2005 -- Noyes outlines how to host a workflow in an application, run it and, most importantly, write the code that lets the workflow get the data it needs.

"Once you get over the initial learning curve…you should find the resulting applications artifacts easier to understand, maintain and change," Noyes writes. "You can start at the top level abstraction of an overall workflow and drill down to just the activities that concern you through the graphical flowchart design model."

Another good introductory resource is Bart De Smet's blog entry, Getting started with WF. De Smet offers a quick tutorial on creating a sequential workflow with code separation and then executing it.
More WF resources
Windows Workflow Foundation Learning Guide

Using Windows Workflow Foundation for Web services

Writing a Windows Workflow Foundation "Hello World" application

Developers who want to play with the drag-and-drop graphic design capabilities of Windows Workflow Foundation should check out Jon Flanders' Web-based Atlas Workflow Designer. You can check out the application here and read about it in this blog entry. (Word to the wise: A red exclamation point means an activity is not configured properly.)

Once one understands the basics of WF, it is time to dig deeper into the framework. De Smet offers a two-part series on making workflow dynamic. Part 1: Modification from the inside demonstrates how to add and remove workflow activities. For this to work, a workflow must be built to allow changes. Part 2: Modification from the outside shows an alternative to making changes inside a workflow -- suspending the workflow and making changes outside the workflow sequence.

Meanwhile, a second Noyes tutorial, Will work for process: Create and run WF workflows, looks at how Windows Workflow Foundation runs within a particular process and at WF's host communications model, which is a critical factor in integrating workflows into applications as well as a complex one. This, Noyes notes, is because a workflow is a tad more involved than a program: "If a workflow can be dehydrated and persisted out to a database at any given point in time, you can't just hold object references in memory to a workflow to communicate with it the way you would with other objects in a program."

Is WF too complex?

Dig deep into Windows Workflow Foundation and it becomes clear that many parts of WF, like the host communications model, can seem complex. Is it because WF itself is complicated or because workflows themselves are complicated?

In a blog entry written the day after a user group meeting, Noyes writes, " The more I work with WF, the more comfortable I get with it, but also the more I become convinced that they need a WF-Lite version….[C]ertain aspects, particularly communicating with the executing workflow, are much harder than calling from one chunk of code to another in a standard .NET application."

K. Scott Allen agrees: "Setting up communications between a workflow and its host is a tremendous amount of work, and it's easy to get wrong….WF isn't as easy as it first appears. It's powerful, but requires an investment of time."

Flanders, author of the Atlas Workflow Designer, takes the time to respond to both bloggers. He agrees that Windows Workflow Foundation is not easy -- but argues that an easy WF would not be a powerful WF. In addition, he writes here in his blog, WF, like BizTalk Server, is all about modeling processes:

You have to remember the charter of the WF Team -- they aren't just building a visual way to write random .NET code[,] they are creating a way to write applications that are workflow enabled, that need all or some of the potential services that the WF model provides. The workflow runtime is based on a certain set of assumptions about how applications should be put together…Perhaps your application won't do well with the model that WF provides. But I think with more and more people writing services[,] there is going to be a big need to tie those services together.

This discourse shows that Windows Workflow Foundation remains a work in progress. As with any new framework, there is much to learn and much to question. Knowing what WF is meant to do, as Flanders points out, is a good first step -- but other steps soon follow. If you have any WF resources that you would like to share, send them along and we'll add them to this tip.

Rate this Tip
To rate tips, you must be a member of SearchWinDevelopment.com.
Register now to start rating these tips. Log in if you are already a member.




Digg This!    StumbleUpon Toolbar StumbleUpon    Bookmark with Delicious Del.icio.us   


RELATED CONTENT
.NET Workflow
Office System Developer Conference 2008 preview
Book Excerpt: Executing activities in Windows Workflow Foundation
Manage application processes with Windows Workflow Foundation
Web-based workflow builder plugs into SharePoint 2007
Beginning Windows Workflow Foundation development, Part 2
BPA Server offers drag-and-drop workflow development
Firm taps Windows Workflow Foundation to give customers more control
Seapine updates workflow, info management tool
Special Report from the .NET 3.0 Roadshow
.NET 3.0 Roadshow: An introduction to WF

.NET Architecture
A look at concurrency constructs and primitives in .NET
Designing Windows Communication Foundation service contracts
Book excerpt: Java EE and .NET security interoperability
Book excerpt: .NET Framework Design Guidelines
Book Excerpt: Executing activities in Windows Workflow Foundation
Aspect-oriented programming (AOP) and the .NET Framework
Book excerpt: Hands-on Windows Communication Foundation
The Software Factory: Refactoring an industry
A SOA versioning covenant
Localization practices for .NET 2.0: It's still about the architecture

RELATED RESOURCES
2020software.com, trial software downloads for accounting software, ERP software, CRM software and business software systems
Search Bitpipe.com for the latest white papers and business webcasts
Whatis.com, the online computer dictionary

DISCLAIMER: Our Tips Exchange is a forum for you to share technical advice and expertise with your peers and to learn from other enterprise IT professionals. TechTarget provides the infrastructure to facilitate this sharing of information. However, we cannot guarantee the accuracy or validity of the material submitted. You agree that your use of the Ask The Expert services and your reliance on any questions, answers, information or other materials received through this Web site is at your own risk.

About Us  |  Contact Us  |  For Advertisers  |  For Business Partners  |  Site Index  |  RSS
SEARCH 
TechTarget provides enterprise IT professionals with the information they need to perform their jobs - from developing strategy, to making cost-effective IT purchase decisions and managing their organizations' IT projects - with its network of technology-specific Web sites, events and magazines.

TechTarget Corporate Web Site  |  Media Kits  |  Reprints  |  Site Map




All Rights Reserved, Copyright 2000 - 2008, TechTarget | Read our Privacy Policy
  TechTarget - The IT Media ROI Experts