Breakout Session: Introduction to the WWF

 

Introduction to Windows Workflow Foundation

So Microsoft has finally found purchase in the WWF…or rather they have invented a new meaning to the acronym.

WWF was announced this morning in the keynote as a new framework to provide APIs to create, manage, and implement workflow in your applications. This is just a “helper” and is not a product. It’s an extension to the .Net framework and is itself very extensible. It also has the idea of incorporating human tasks into the workflow. For example, approval for some operation or request, such as time, may be necessary to complete a workflow. A mechanism that waits for the human interaction and then continues from there built right in.

One thing to note is that MS will be “dog fooding” this technology and will be incorporating it into all of it’s products that need workflow (and that includes Biztalk). While some Beta bits were given out in the software packet here at PDC, don’t expect this stuff to go live for quite some time.

The basic idea is that you have a workflow made up of “activities”. There are a fair number of canned activities, but also you can create your own customized activities. The workflow designer is integrated with Visual Studio and allows you to graphically lay out your workflow by drag-dropping activities, or creating your own new activities. What’s slick about this designer is you can put break points in at the level of the designer, and step through each graphical activity in your flow. You can even then step down into the code behind the activity for debugging.

There are many ways to author workflows which include using plain code (C#/VB.Net), through markup (meaning XAML with workflow specific tags), a combination of code and XAML, and application generated (meaning the visual designer provided, or a custom one). By allowing the creation of workflows via markup you can give your application a set of pre-coded activities and let your end user design the flow without even using a designer or VS.Net.

They also include “companion” classes that allow you to alter the behavior of activities at design time. For example, the Designer companion class allows you to change what your activity looks like in the VS.Net, or hosting, designer. The validator companion class allows you to create a validation routine that will alert the user manipulating your activity to some property that needs to be set or some operation that needs to be performed to use the activity. They also have “behavior” classes that deal with runtime behavior like transactions within the workflow.

A free book on the subject “Presenting Windows Workflow Foundation (Beta Edition)” was being handed out in main “big room”. Sorry, Amazon didn’t have a link to it.

This was some pretty amazing stuff. I can see all sort of uses for it.