3. What is Workflow?
The workflow framework and tools for
Microsoft products and
partner/customer ecosystem
Single workflow technology for Microsoft®
Windows®
A framework for building workflow, not an
application or server
Make declarative workflow a mainstream
development paradigm
4. Why Workflow?
Workflow Value-Add
Real-World Examples
Long Running and Stateful
“Orders are confirmed in
Workflows run for up to 30
48 hours and shipped
days and maintain state
within 30 days.”
throughout
“Most suppliers
Flexible Control Flow
confirm our orders but
Flexibility for people to
some forget and we
override or skip steps in
need to follow up.”
the workflow
Transparency
“What are the next steps
Rendering a visualization of
in handling this order?”
next steps based on
defined control flow
5. Architecture Visual Designer
Key Concepts
A Workflow
Workflows are a set of Activities
Workflows run within a Host Process:
any application or server An Activity
Developers can build their own Custom
Activity Libraries Custom Activity Library
Windows
Components
Workflow Foundation
Base Activity Library: Out-of-box activities
Base Activity Library
and base for custom activities
Runtime Engine: Workflow execution and
Runtime Engine
state management
Runtime Services: Hosting flexibility and
Runtime Services
communication
Visual Designer: Graphical and code- Host Process
based construction
6. Extensible Activities Domain-Specific
Custom Activity
Base Activity
Workflow Packages
Libraries
Library
Compliance
CRM
Extend
Compose
activity
activities
Out-of-Box
RosettaNet
(OOB) Activities Author new
activity IT Mgmt
OOB activities, workflow
Create/Extend/
types, Vertical-specific activities
Compose activities
base types and workflows
App-specific building
General-purpose Best-practice intellectual
blocks
Activity libraries property (IP) and
First-class citizens
define workflow knowledge
constructs
7. Runtime Extensibility
Host App Domain
Runtime
Out of Box Services are
provided that support SQL
Services Server 2000 & 2005
PersistenceService
stores and retrieves PersistenceService SQL
instance state.
TrackingService
TrackingService
manages profiles and
SchedulerService
stores tracked
information.
TransactionService
Common resource
services for managing
threading, timers and
creating transactions
8. Workflow Services
Advantages
Service implemented as Workflow
Leverage Workflow development experience
Enforces application protocol by default
Allows long-running, durable Services
Workflow hosted as Service
ServiceContract provides typed interface for integrating
with the Workflow
Messages enforce by-value, serializable data
Workflows can be message-activated
9. Workflow Service
Architecture
Service.cs
Workflow.cs or
Workflow.xoml
Service Instance
Workflow Instance
Service Runtime
OperationInvoker Operation 1
ReceiveActivity 1
WorkflowOperationInvoker
App.config
OperationSelector Operation 2
ReceiveActivity 2
Workflow
ServiceHost
ServiceHost InstanceProvider
DurableInstanceProvider
Workflow Runtime
MessageInspector
MessageContextInspector
ServiceDescription
ContextChannel
WF Persistence DB
ServiceBehavior
WorkflowServiceBehavior
ListenerChannel
OperationBehavior
WorkflowOperationBehavior
12. The Imperative to Connect
MOBILE EMPLOYEES CUSTOMERS CUSTOMERS MOBILE EMPLOYEES
13. WCF is:
Our next-generation platform for distributed systems
A set of extensions to the Microsoft.NET Framework 2.0
Build WCF services in Visual Studio 2008 using any .NET Language
Intelligent code editing, IDE Extensions for WCF, debugging, re-factoring,
code snippets, etc.
Visual Basic .NET, Visual C#, etc.
Runs on
Microsoft Windows Vista
Microsoft Windows XP
Microsoft Windows Server 2003
Part of .NET 3.0 and .NET 3.5
14. Benefits of WCF
Unifies today’s distributed technologies
Unification Lets you develop/deploy/manage one model
Visual Studio 2008 integration
Broad support for Web services
Interoperability (WS-*) specifications and REST
Single stop shop for building services
Enables development of
Service-Oriented loosely-coupled services
Development
Config-based communication
15. Unified Programming Model
.NET Remoting
ASMX & WSE
Interop Extensibility
with other Location
transparency
Platforms & WS-*
Attribute- Message-
Based Oriented
REST / HTTP
Programming Programming
Programming
Enterprise System.Messaging
Services
HTTP
Services
16. A Look at WCF (1)
Client Service
Endpoint
Message
Endpoint Endpoint
17. A Look at WCF (2)
Client Service
A B C
Message
C B A A B C
Address Binding Contract
(Where) (How) (What)
18. Productivity
Using Visual Studio .NET 2003
class HelloService {
20,379 lines
[WebMethod]
security
public String Hello(String Greeting) {
X509CertificateCollection collection = new
X509CertificateCollection();
5,988 lines
IntPtr blob = Marshal.AllocHGlobal(Marshal.SizeOf(
reliable messaging
typeof(CRYPTOAPI_BLOB)));
IntPtr data = (IntPtr)((int)blob +
Marshal.SizeOf(typeof(CRYPTOAPI_BLOB)));
…
25,507 lines
transactions
SeqAckRange range = new SeqAcknRange(id, low, high );
SeqAckRange[] ranges = { range };
ReliableQueue.ProcessAcks( ranges );
…
4,442 lines
infrastructure
BeginTransaction (NULL,
ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions,
&pITransaction);
…
Total lines 56,296
return Greeting;
}
}
19. Productivity
Using Visual Studio .NET 2003 and WSE
class HelloService {
[WebMethod]
public String Hello(String Greeting) {
10 lines
foreach ( SecurityToken tok in
security
requestContext.Security.Tokens
{
X509SecurityToken token = tok as X509SecToken
1,804 lines
}
reliable messaging
…
SeqAckRange range = new SeqAcknRange(id,low,high );
SeqAckRange[] ranges = { range };
25,507 lines
ReliableQueue.ProcessAcks( ranges );
transactions
…
BeginTransaction (NULL,
ISOLATIONLEVEL_SERIALIZABLE, 0, pITxOptions,
Total lines 27,321
&pITransaction);
…
return Greeting;
}
}