Windows Workflow Foundation Mike Taulty Developer & Platform Group Microsoft Ltd
Intro: WinFX
What’s WinFX? Managed API for the Windows platform Extends the.NET Framework V2.0 First ships at the time of Windows Vista (2006) Included in Windows Vista Available on Windows XP Sp 2 and Server 2003 Following a Community Technology Preview Cycle Latest is the February CTP
WinFX Themes WinFX
Intro: Windows Workflow Foundation
Windows Workflow Foundation Single framework for Workflow on Windows Extensible Both human and system Workflow Supports long-running and stateful Workflows
Activies – Workflow Building Blocks Activities are classes Basic Activities or Composite Activities A workflow is a composite activity public string SourceFile; public string DestFile; override Execute() { File.Copy(SourceFile, DestFile); }
Styles of Workflow
The Workflow Framework (or “What’s in the box?”) RuntimeDesigner Base Activities Runtime Services
Framework: Workflow Runtime
Demo Framework: Hosting the Runtime
Framework: Workflow Designer Hosted in Visual Studio 2005 Hosted in your application for end-users Supports theming in both VS and non-VS environments
Demo Framework: Using/Hosting the Designer
Framework: Base Activity Library Pre-built set of building block activities CompositeBasic
Demo Framework: Using the Base Activity Library
Framework: Runtime Services Runtime uses services PersistenceSchedulingTrackingTransactions Defaults in the box for most services Pluggable – add your own
Demo Framework: Plugging in Runtime Services
Building Activities
Activities: Component Model Activity is at the centre of a component model
Activities: Lifecycle Activities have a lifecycle
Demo Activities: Building custom activities
Other things to know about…
Host/Workflow Communication ILoanNotify { GetLoanApproval(); event LoanApproved; } class Notifier : ILoanNotify { }
Demo Host/Workflow Communication
State Machine Workflows State Start Wait for X Wait for Y Wait for Z State Wait for A Wait for B Terminate Activity Transition
Demo State Machine Workflows
Applying Rule-Based Policies Data Policy (RuleSet) Rule: If PRICE then Rule: If … then Priority: 1 Priority: 2 Priority: 3 Priority: 4 Priority: 5 Price: 200 Change
Demo Rule based policies
Transaction Scope Book Flight Working with Transactions Transaction Scope Book Hotel Error! Commit happens here Compensation Cancel Hotel
Demo Working with Transactions
Modifying Running Instances Running Workflow instance can be modified Logic changed Activities added/removed Runtime managed Change
Demo Modifying Workflow Instances
Resources MSDN Developer Centre Windows Workflow Site UK Community Resources MSDN Nugget Videos topics
© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.