Dave Green's WebLog

Workflow

What is Workflow, and why bother?

Workflow, of course, is one of those deeply overloaded terms that hinders communication as often as it helps, so I’d better say what I mean by it.

Workflow comes down to just two ideas: that there is work to do, which a workflow sees as opaque units of behavior; and flow, which describes what work gets done when.

So is this a Workflow?

public void HandleLoanRequest (string customerID, Application app)
{
    if (CheckCredit(customerId, app.Amount))
    {
        MakeOffer (customerId, app);
    }
}

Yes, I believe it is.  The work is checking the customer’s credit and making an offer – and HandleLoanRequest defines if and when this work is performed.

But the fact that workflow vendors have traditionally felt that something more than this sort of code is required before they declare victory suggests that we’re still missing a key notion.

This, I believe, is that we don’t just need to describe the flow, but describe it in a way that we can inspect, reason over, and manipulate.  In short, workflow needs a model.

C# is one way to do this - we can define coding standards that allow us to scan workflow code and draw a graph of the flow, for instance.  Or we could define attributes for the developer to use to call out the parts of his code that form the model.  This is not the choice that we made for the Windows Workflow Foundation – and I’ll talk about why we chose what we did in later posts – but it would work.

But back to why we might need a model.  We’re going to have to put in effort to create it, so why bother?  Where’s the payback? (or the beef, as this Englishman abroad is learning to call it).

Well, I think the payback comes from what the model enables -

Visualization  Useful for the developer, during both development and maintenance, but also for the workflow user who wants to know why they are supposed to be doing what they’ve been asked to do, or the IT Ops guy who wants to know what some misbehaving app is, or should be, up to.

Expressiveness  A workflow model is a Domain Specific Language, specialized to support characteristic problems.  An example is a review process where three positive votes out of five reviews mean that the document is good – and any outstanding reviews can be canceled.  This is a little tedious to code, but the Windows Workflow Foundation includes out-of-the-box constructions that address such problems.

Execution  The runtime can exploit the model to take away the need to solve the same problems over and over again.  In the Windows Workflow Foundation we built in support for the knotty problems of long running workflow such as state management and compensation – controlled by simple, expressive model elements.

Monitoring  The existence of a model makes it possible to produce an event stream with a meaningful semantic without any additional developer effort.  This can then be used to monitor instances of workflows, or aggregates.  Windows Workflow Foundation allows also allows declarative decoration of events with application data pulled from the workflow state - so that you can tell that credit check has started for order 14532.

Transformation  Models beget models.  An example is the transformation of a workflow model into the Message Exchange Pattern required to communicate with it – as Dharma and Don demonstrated so beautifully at the PDC.  Another is customization.  An ISV ships a workflow, which is customized by a VAR, and then again by a customer.  Then the ISV ships a new base version.  The use of a shared, well understood model for the workflow makes the consequent 3-way merges much more tractable.

Composition  If an application is factored into flow and work, then the atomic elements of work, with their well understood interfaces, can be reused by other workflows.  Workflows themselves are valid definitions of work that can also be used by other workflows. 

Customization and transformation together enable ecosystems where definitions of work and flow become shared or traded artifacts.

Manipulation  Often there are requirements to invent or modify workflows on the fly.  If this means changing code, then there are going to be problems with the security folks – even if the users understand how to hack it.  Using a model makes possible dynamic manipulation that is both controllable and comprehensible.  The Windows Workflow Foundation supports the dynamic modification of both workflow types and workflow instances.

So that’s it (or at least, all that seeps into my mind this Saturday afternoon).  That’s why we thought a model was a good idea, and why we think it has great ROI.  But if none of these benefits apply in your scenario, then really, coding is still very cool.

Published Saturday, September 17, 2005 4:04 PM by Dave Green

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Larry Beck said:

September 18, 2005 1:06 AM
 

Matias Woloski said:

// TODO: learn it and use it...

Some links
Windows Workflow Foundation Site
Introducing Windows...
September 18, 2005 5:47 PM
 

BigJimC said:

Wow - been waiting for this for some time now from MS. Have tried and failed to get to grips with previous MS workflow offerings.

Really pleased to hear right moves to integrate this with Sharepoint and will wait impatiently for this...

Will be evaluating this against the architecture of other content managment systems using workflow.

Keep up the great work.
September 19, 2005 5:45 PM
 

Andy James (Solidsosoft) said:

Good blog, great new foundation, glad to see your blogging at last!
September 19, 2005 9:14 PM
 

rido said:

Do you have information about how to UnitTests a workflow? There are any plans to integrate WinWF testing with VSTS?
September 21, 2005 6:08 AM
 

PatriotB said:

At my previous job, the word "workflow" was at the center of everything. It got to the point where it deserved to be one of those "banished words". http://www.lssu.edu/banished/current.php
September 30, 2005 12:56 AM
 

Venky said:

Hi,

Nice and simple explanation about the Workflow. I have been exploring WWF for quite sometime. Could you please explain me where does WWF runtime sits at runtime and how does the WWF model built in the Design time relate to the actual application at runtime. They say that WWF does not have Process of its own, WWF runs inside the Host Application's process space. I am very much confused with all this. Could you please explain me in details.

Thanks,
Venky
February 4, 2006 2:42 PM
 

GoCanucksGo said:

I think it is also important to discuss when workflow might be overkill a bit too much of a good thing as Venky pointed out.  You can check out this article i came across at <a href="http://workflow.wordpress.com/page/2/">http://workflow.wordpress.com/page/2/</a>
April 21, 2006 7:50 PM
 

insurance auto said:

Thanks!!! http://www.insurance-top.com/company/">http://www.insurance-top.com/company/ car site insurance. [URL=http://www.insurance-top.com]home insurance[/URL]: auto insurance, insurance car, Best Insurance Web site . Also [url=http://www.insurance-top.com]cars insurance[/url] from website .
June 7, 2006 9:33 PM
 

uxkpv29@ebay.com said:

ringtones free
June 7, 2006 9:33 PM
 

teen lesbian rape said:

Persone los pioneros non rabata. Great...
June 20, 2006 3:13 PM
 

lesbian rape said:

Best of all people w can talk...
June 24, 2006 10:10 PM
 

myvnqfi@gmail.com said:

ringtones free
July 14, 2006 4:36 AM
 

Wendy said:

Well done!
[url=http://jettxrhj.com/swvm/hztn.html]My homepage[/url] | [url=http://ljuvzcxp.com/sboh/ygih.html]Cool site[/url]
July 30, 2006 6:23 PM
 

Chad said:

Great work!
<a href="http://jettxrhj.com/swvm/hztn.html">My homepage</a> | <a href="http://uhwblplj.com/zvhe/jpfd.html">Please visit</a>
July 30, 2006 6:23 PM
 

Rex said:

July 30, 2006 6:23 PM
 

Like Your Work » Blog Archive » links for 2006-08-08 said:

August 7, 2006 8:29 PM
 

Daniel Moth said:

WF resources
August 14, 2006 5:39 AM
 

ltfmjv2@search.com said:

ringtones free
August 16, 2006 3:10 AM
 

john said:

Great title!  Thanks for the overview.
August 19, 2006 4:17 PM
 

Tankless water heater said:

This site is very interesting. Good job =)
<a href="http://tanklesswaterheater.storage9.com">Tankless water heater</a>
<a href="http://tanklesswaterheater.bht0a.info">Tankless water heater</a>
August 23, 2006 5:11 AM
 

Braza said:

August 30, 2006 12:23 PM
 

49247 said:

Hello, good site and interesting design!
<a href=" http://xanaxsale.tdfsf.info/xanax-sales.html ">xanax sales</a>
<a href=" http://xanaxsale.tdfsf.info/xanax-sales.html ">xanax sales</a>

Thanks!
September 6, 2006 5:20 AM
 

Poll Pitt said:

I am so [url=http://access.2surf.eu]lucky[/url] on having what I have! And good luck in yours [url=http://2access.2surf.eu]search[/url].
Just visit [url=http://access.122mb.com]my site[/url].









September 25, 2006 5:22 PM
 

Gucci handbag said:

October 2, 2006 5:41 AM
 

Pavan Kulkarni said:

Nice article!

But I was wondering what are the differences between WF and other Workflow technologies?

July 4, 2007 2:43 AM
 

kevin Mocha - Work Flow said:

September 20, 2007 12:27 AM
 

Sach said:

Is there any performance degradation with WWF over normal C# code. If so how much so? Would WWF be ideal for online system scenarios as well as offline?

October 29, 2007 6:58 PM
 

blade4246 said:

Excellent write up, good work.

November 13, 2007 9:53 PM
 

Cars » Dave Green’s WebLog : What is Workflow and why bother? said:

December 30, 2007 3:46 AM
 

Computer-Mag said:

Nice and interesting article. Thanks for your great work.

January 19, 2008 8:10 PM
 

RS said:

I found this information really helpful.

Good work.

February 16, 2008 9:03 AM
 

Schai said:

Verry good blog. Thanks for all the information.

February 24, 2008 9:16 AM
 

Hotel Ischia said:

Good blog, great new foundation, glad to see your blogging at last!

March 1, 2008 10:27 AM
 

Webkatalog said:

Nice and interesting article. Thanks for your great work.

March 1, 2008 10:28 AM
 

Wolle said:

Hello Dave,

all Your blogs are great. Thank You for so much work for us.

March 10, 2008 1:49 AM
 

Tricks said:

<a href="http://www.tricks.com.pl"> Very nive  </a>

April 1, 2008 3:07 PM
 

Iris said:

Thank you for your interesting blog.

April 5, 2008 3:40 AM
 

Webkatalog said:

Nice and interesting article. Thanks for your great work.

May 6, 2008 10:34 AM
 

Pagerank Link said:

This site is very interesting.

May 6, 2008 10:37 AM
 

Klimatyzacje said:

Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje Klimatyzacje

June 18, 2008 5:44 AM
 

Ischia said:

Verry good blog. Thanks for all the information.

August 3, 2008 2:44 AM
 

lierac said:

Very great and excellent article. It’s realy helpful. Thanks again.

September 3, 2008 10:24 AM
 

Anonymous said:

Can you please clean up several SPAM messages in blog? SPAMS really irritate while reading blog.

September 10, 2008 9:15 AM
 

MisterFantastic said:

Hi,

This is really a nice article . I can understand the uses and advantages of the workflow easily .

Thanks

November 20, 2008 2:19 AM
 

BPM software said:

Good blog, sorry to see it is not active

January 1, 2009 3:12 PM
 

Magasin Photo Numerique said:

Wow - been waiting for this for some time now from MS. Have tried and failed to get to grips with previous MS workflow offerings.

February 25, 2009 8:04 AM
 

Dave Green s WebLog What is Workflow and why bother | Uniform Stores said:

June 3, 2009 6:39 AM
 

Dave Green s WebLog What is Workflow and why bother | Quick Diets said:

June 9, 2009 7:25 AM
 

Dave Green s WebLog What is Workflow and why bother | work from home said:

June 16, 2009 8:36 AM
 

Dave Green s WebLog What is Workflow and why bother | fix my credit said:

June 16, 2009 10:08 PM
 

Dave Green s WebLog What is Workflow and why bother | pool toys said:

June 18, 2009 4:39 AM
 

Dave Green s WebLog What is Workflow and why bother | Outdoor Decor said:

June 19, 2009 12:25 AM
 

Dave Green s WebLog What is Workflow and why bother | garden decor said:

June 19, 2009 3:15 AM

Leave a Comment

(required) 
(optional)
(required) 
Submit

© 2009 Microsoft Corporation. All rights reserved. Terms of Use  |  Trademarks  |  Privacy Statement
Microsoft
Page view tracker