windows workflow foundation mike taulty developer & platform group microsoft ltd...
TRANSCRIPT
Windows Workflow FoundationWindows Workflow Foundation
Mike TaultyMike Taulty
Developer & Platform GroupDeveloper & Platform Group
Microsoft LtdMicrosoft Ltd
[email protected] [email protected]
http://mtaulty.com
Intro: WinFXIntro: WinFX
What’s WinFX?What’s WinFX?What’s WinFX?What’s WinFX?
Managed API for the Windows platformManaged API for the Windows platform
Extends the .NET Framework V2.0Extends the .NET Framework V2.0
First ships at the time of Windows Vista (2006)First ships at the time of Windows Vista (2006)
Included in Windows VistaIncluded in Windows Vista
Available on Windows XP Sp 2 and Server 2003Available on Windows XP Sp 2 and Server 2003
Following a Community Technology Preview CycleFollowing a Community Technology Preview Cycle
Latest is the February CTPLatest is the February CTP
Intro: Windows Workflow FoundationIntro: Windows Workflow Foundation
Windows Workflow FoundationWindows Workflow Foundation
Single Single frameworkframework for Workflow on Windows for Workflow on Windows
ExtensibleExtensible
Both human and system WorkflowBoth human and system Workflow
Supports long-running and stateful WorkflowsSupports long-running and stateful Workflows
Activies – Workflow Building BlocksActivies – Workflow Building Blocks
Activities are classesActivities are classes
Basic Activities or Composite ActivitiesBasic Activities or Composite Activities
A A workflowworkflow is a composite activity is a composite activity
public string SourceFile;
public string DestFile;
override Execute()
{
File.Copy(SourceFile,
DestFile);
}
Styles of WorkflowStyles of Workflow
The Workflow FrameworkThe Workflow Framework(or “What’s in the box?”)(or “What’s in the box?”)
Runtime DesignerBase
Activities
Runtime
Services
Framework:Framework: Workflow Runtime Workflow Runtime
DemoDemo
Framework:Framework: Hosting the RuntimeHosting the Runtime
Framework:Framework: Workflow Designer Workflow Designer
Hosted in Visual Studio 2005Hosted in Visual Studio 2005
Hosted in your application for end-usersHosted in your application for end-users
Supports theming in both VS and non-VS Supports theming in both VS and non-VS environmentsenvironments
DemoDemo
Framework:Framework:Using/Hosting the DesignerUsing/Hosting the Designer
Framework:Framework: Base Activity Library Base Activity Library
Pre-built set of building block activitiesPre-built set of building block activities
CompositeBasic
DemoDemo
Framework:Framework:Using the Base Activity LibraryUsing the Base Activity Library
Framework:Framework: Runtime Services Runtime Services
Runtime uses servicesRuntime uses services
PersistencePersistence
SchedulingScheduling
TrackingTracking
TransactionsTransactions
Defaults in the box for Defaults in the box for most servicesmost services
Pluggable – add your Pluggable – add your ownown
DemoDemo
Framework:Framework:Plugging in Runtime ServicesPlugging in Runtime Services
Building ActivitiesBuilding Activities
Activities:Activities: Component Model Component Model
Activity is at the centre of a component modelActivity is at the centre of a component model
Activities:Activities: Lifecycle Lifecycle
Activities have a lifecycleActivities have a lifecycle
DemoDemo
Activities:Activities:Building custom activitiesBuilding custom activities
Other things to know about…Other things to know about…
Host/Workflow CommunicationHost/Workflow Communication
ILoanNotify{
GetLoanApproval();
event LoanApproved;
}
class Notifier
: ILoanNotify
{
}
DemoDemo
Host/Workflow CommunicationHost/Workflow Communication
State Machine WorkflowsState Machine Workflows
StateStart
Wait for X
Wait for Y
Wait for Z
State
State
Wait for A
Wait for B
Terminate
Activity
Activity
Transition
DemoDemo
State Machine WorkflowsState Machine Workflows
Applying Rule-Based PoliciesApplying Rule-Based Policies
Data
Policy (RuleSet)
Rule: If PRICE then
Rule: If … then
Rule: If … then
Rule: If … then
Rule: If … then
Priority: 1
Priority: 2
Priority: 3
Priority: 4
Priority: 5
Price: 200
Change
DemoDemo
Rule based policiesRule based policies
Transaction
Scope
Book Flight
Working with TransactionsWorking with TransactionsTransaction
Scope
Book Hotel
Error!
Commit happens here
Compensation
Cancel Hotel
DemoDemo
Working with TransactionsWorking with Transactions
Modifying Running InstancesModifying Running Instances
Running Workflow Running Workflow instance can be instance can be modifiedmodified
Logic changedLogic changed
Activities Activities added/removedadded/removed
Runtime managedRuntime managed
Change
DemoDemo
Modifying Workflow InstancesModifying Workflow Instances
ResourcesResources
MSDN Developer CentreMSDN Developer Centre
http://msdn.microsoft.com/winfxhttp://msdn.microsoft.com/winfx
Windows Workflow SiteWindows Workflow Site
http://www.windowsworkflow.nethttp://www.windowsworkflow.net
UK Community ResourcesUK Community Resources
http://www.roadtowinfx.comhttp://www.roadtowinfx.com
MSDN Nugget VideosMSDN Nugget Videos
http://www.msdn.co.uk/events/nuggets.aspxhttp://www.msdn.co.uk/events/nuggets.aspx
http://mtaulty.com/services/NuggetFeeds.ashx?query= topicshttp://mtaulty.com/services/NuggetFeeds.ashx?query= topics
© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.© 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.