3. Agenda
What is Windows Workflow Foundation?
Architecture & Core concepts
Building Workflows
Introduction to Activities
Workflow Styles
4. Windows Workflow Foundation vision
Windows Workflow Foundation is the programming
model, engine and tools for quickly building workflow
enabled applications on Windows.
Single workflow technology for Windows
Available to all customers of Windows
Available for use across a broad range of scenarios
Redefining workflow
Extensible framework & API to build workflow centric products
One technology for human and system workflow
Take workflow mainstream
Incremental learning for mainstream .NET developer
Fundamental part of the Office 2007
Strong workflow partner & solution ecosystem
6. Workflow Scenario Spectrum
Human Workflow System Workflow
Participants: people, roles Participants: apps, services
Flow style: flexible, dynamic Flow style: prescriptive, protocols
Data: unstructured, documents Data: structured, transactional
Information Worker
Information Worker m
M
…
C
h
n
u
p
p
a
y
g
S
tm
M
…
C
h
n
iu
p
p
a
y
g
lS
t
i
l •
•
• Document Review…
• Document Review… B
n
u
B
n
u
e
e
o
s
s
s
s
s
s
tB
n
u
iB
iu
n
e
e
o
s
s
s
s
s
s
t
i
i
Line of Business Apps
Line of Business Apps
CRM ERP • Quote to Cash, Sales Automation…
• Quote to Cash, Sales Automation…
IT Management
IT Management
• New Hire Provisioning, Trouble Ticket,…
• New Hire Provisioning, Trouble Ticket,…
.NET Developer
.NET Developer
• Pageflow, Service Coordination…
• Pageflow, Service Coordination…
Windows Workflow Foundation
7. Windows Workflow Foundation
Visual Designer
Key Concepts
Workflows are a set of Activities
A Workflow
Workflows run within a Host Process: any
application or server
Developers can build their own Custom An Activity
Activity Libraries
Custom Activity Library
Components
Windows
Base Activity Library: Out-of-box activities
and base for custom activities
Workflow Foundation
Runtime Engine: Workflow execution and Base Activity Library
state management
Runtime Services: Hosting flexibility and Runtime Engine
communication
Visual Designer: Graphical and code-based Runtime Services
construction
Host Process
8. Workflow Basics
A workflow is a class
using System.Workflow.Activities;
public class Workflow1 : SequentialWorkflow
{
}
A workflow class may be defined in markup
<?Mapping XmlNamespace="Activities"
ClrNamespace="System.Workflow.Activities"
Assembly="System.Workflow.Activities" ?>
<SequentialWorkflow x:Class="MyWorkflow" xmlns="Activities"
xmlns:x="Definition">
…
</SequentialWorkflow>
9. Workflow Basics
Workflow constructor configures contained
activities (like forms & controls)
using System.Workflow.Activities;
public partial class Workflow1 : SequentialWorkflow {
public Workflow1()
{
InitializeComponent();
}
}
public sealed partial class Workflow1 : SequentialWorkflow {
private Delay delay1;
private void InitializeComponent()
{
this.delay1 = new System.Workflow.Activities.Delay();
this.delay1.ID = “delay1";
this.delay1.TimeoutDuration =
System.TimeSpan.Parse("00:00:05");
this.Activities.Add(this.delay1);
this.ID = "Workflow1";
}
}
10. Workflow Authoring Modes
Markup Only Markup and Code Only Application
“Declarative” Code Generated
App creates activity
XAML XAML C#/VB C#/VB tree and serializes
• XML defines • XML defines • Code creates
workflow structure workflow workflow
logic and data flow • Code-beside in constructor XAML C#/VB
defines extra logic
Workflow Compiler
wfc.exe
.NETassembly
C#/VB Compiler • ctor defines
workflow
12. What are Activities?
An activity is a step in a workflow
Has properties and events that are programmable within
your workflow code
Has methods (e.g. Execute) that are only invoked by the
workflow runtime
Think of Forms & Controls
Activity == Controls
Workflows == Forms
Activities fall under two broad categories
Basic – steps that “do work”
Composite – manage a set of child activities
13. Activities: An Extensible Approach
Base Activity Custom Activity Domain-Specific
Libraries Workflow Packages
Library
Compliance
CRM
Compose Extend
activities activity
Base Activity
Library Author new RosettaNet
activity IT Mgmt
OOB activities,
workflow types, Create/Extend/
base types Compose activities Vertical-specific
activities & workflows
General-purpose App-specific
building blocks Best-practice IP &
Activity libraries define Knowledge
workflow constructs First-class citizens
17. Availability & Packaging
Microsoft .Net Framework 3.0
Windows Communication Foundation (“Indigo”)
Windows Presentation Foundation (“Avalon”)
Windows Workflow Foundation (“WF”)
Windows CardSpace
Support for Windows XP & Windows Server 2003
Licensed as part of Windows
18. Summary
A single workflow technology for Windows
Platform level workflow framework for use within Microsoft products &
ISV applications
Will be used by BizTalk Server, Office2007, MBS & other Microsoft
client/server products
Available to all Windows customers
Microsoft is redefining workflow
Unified technology for System & Human workflow
Multiple styles: sequential, rules-based, state machine
Supports dynamic interaction
Microsoft is taking workflow mainstream
Consistent and familiar programming model for reaching mainstream
application developer
Available to millions of end-users through Office 2007
Extensible platform for ISVs
19. Windows Workflow Foundation
Resources MSDN Workflow Page
®
Microsoft® Visual Studio® Extensions
Download Hands-on Labs
http://msdn.microsoft.com/workflow
Community Site
Subscribe to the RSS feed for news & updates
Find, download, & register Activities
Find blogs, screencasts, whitepapers, and other
resources
Download samples, tools, and runtime service
components
http://wf.netfx3.com/
Forums
Ask questions in the forums
http://www.WindowsWorkflow.net/Forums