WF
Agenda
WF basics
Why, where and when to use WF
Windows
Workflow Foundation
What is WF?
Unit of Work
Can be composed together
Top activity is called a "Workflow"
Pulses of Work
Persistence
Concurrency management
Lightweight
Resumable
execution environment
WPF
ASP.NET
WCF
IIS
Custom
Mediates error handling
free
Visual Studio
designing
debugging
designer is re-hostable
3rd party customization model
Activities...
Activities
Runtime
Tooling
Activities are the primitive abstraction of behaviour
Sample activities
Data gets into activities through
Arguments
represent FLOW of data
have explicit direction (in/out)
Activities are fully
Composable
Composition model
Extensibility of activities
allows for RICHER control flow paradigms
than closed language
C# or VB
Activity Library
Control the
of your domain
vocabulary
... can be arbitrarily composed together
common tasks
activities to support
access to runtime constructs
persistence
termination
transactions
some customers have built on top of WF
to provide domain-specific vocabularies
Why WF?
Coordinate work
Write applications
Gain into your application
Customizable vocabulary & design experience
Win32 processes are volatile,
your state does not have to be
If your application is not doing anything,
someone else can use the memory
effectively manage resource consumption
manipulate state over time
serialize and deserialize inflight, to a persistent store
manage memory more effectively
recovery in case of failure
persistable
Workflows are persistence-enabled for
If you need control, it's available to you
Can modify programs in
Persistence Provider
Explicit persistence points
Support for No-Persist zones
flight
free
visibility
Software autopsies are hard
IT pro calls dev: What's going on?
Business stakeholder calls dev: What's going on?
How do I capture key performance data?
Dev: What's going on?
What is my program waiting on?
Workflows are -enabled for free
Can persistence state
Rich for running instances
WF instance is stored as a blob
BUT you can save certain parts separately
e.g. save PO variable in a PO table
Tracking Profiles
Tracking Participants
Integrated with Windows E2E Tracing
Workflows in XAML means easy
analysis
deployment
versioning
no need to go through the code
debugging
schematize
tracking
WCF End-to-End tracing
Activity traces
Describe transfer
Describe activity propagation
Rich control flow paradigms
Complexity around coordination is pushed into the runtime
e.g. asynchronous coding
lots of complex code to coordinate control flow and state
Demo
Sample workflow in Visual Studio