Document 390112

Brian Noyes
Chief Architect
IDesign Inc (www.idesign.net)
SOA401
About Brian
Chief Architect
IDesign Inc. (www.idesign.net)
Microsoft Regional Director
Publishing
Developing Applications with
Windows Workflow Foundation,
LiveLessons training DVD, June 2007
Smart Client Deployment with
ClickOnce, Addison Wesley,
January 2007
MVP
Data Binding in Windows Forms 2.0,
Addison Wesley, January 2006
Microsoft MVP
MSDN Magazine, MSDN Online,
CoDe Magazine, The Server Side .NET,
asp.netPRO, Visual Studio Magazine
Connected Systems
Speaking
E-mail: [email protected]
Blog: http://briannoyes.net
Microsoft TechEd US, Europe, Malaysia,
Visual Studio Connections, DevTeach,
INETA Speakers Bureau, MSDN
Webcasts
Agenda
SOA Overview
WF Service Capabilities
Exposing WF Workflows as Services
Consuming Services from Workflows
Workflow 4.0 Coming Changes
Workflows in the Cloud
SOA Overview
Service Orientation is a way of building
composite applications
A service is a composable unit of processing
and data exposed to consumers
Details of the implementation are hidden
from the consumer of the service
A further abstraction from objects
or components
SOA Tenets
Service boundaries are explicit
Services are autonomous
Services share schema and contract, not type
Services are compatible based on policy
Workflow as Orchestration
Submit Loan
Application
Validate
Application
Send to
Reviewer
Approve
Application
Fund
Application
Validation
Service
Notification
Service
Approval
Service
Funding
Service
Validation
Biz Layer
Notification
Biz Layer
Approval
Biz Layer
Funding
Biz Layer
Notification
Data Layer
Approval
Data Layer
Funding
Data Layer
SQL dB
SQL dB
Loan Application Process
Exchange
Workflow as Service Operation
Transfer
Money
Approve
Transfer
Debit
Account
Credit
Account
Transfer
Funds
Authorization
Manager
Debit
Manager
Credit
Manager
Fund
Manager
Loan Application Process
Workflow Coordination
Submit Loan
Application
Validate
Application
Send to
Reviewer
Approve
Application
Fund
Application
Validate
Application
Send to
Reviewer
Approve
Application
Loan Application Process
Loan Approval Process
Agenda
SOA Overview
WF Service Capabilities
Exposing WF Workflows as Services
Consuming Services from Workflows
Workflow 4.0 Coming Changes
Workflows in the Cloud
WF Service Capabilities
Interoperable
WF leverages WCF’s
ability to define, expose,
and call services
Extensible
Productive
Complies with SOA tenets
WF Service Capabilities
Expose workflows
as services
Can be clients
to services
ReceiveActivity
SendActivity
Activities as
service operation
implementation
Custom activity
encapsulating a proxy
WF Service Capabilities
WF/WCF supply
supporting bindings and
hosting capabilities to
make it easy to expose the
WF service capabilities
Bindings:
BasicHttpContextBinding
NetTcpContextBinding
WSHttpContextBinding
WorkflowServiceHost
Agenda
SOA Overview
WF Service Capabilities
Exposing WF Workflows as Services
Consuming Services from Workflows
Workflow 4.0 Coming Changes
Workflows in the Cloud
Exposing Workflows as Services
Add ReceiveActivity to workflow
Set service contract/method properties
Bind input parameters/return values
Create host application
WorkflowServiceHost – self hosted
WorkflowServiceHostFactory – IIS hosted
Use Workflow compatible bindings
NetTcpContextBinding
BasicHttpContextBinding
WSHttpContextBinding
Context Bindings
Round trip workflow instance ID in
custom header
Similar to cookie passing in a browser
Uses WCF contexts to store header info
Not required to call workflow services, but
makes it much easier
Automatic routing by workflow runtime to
target workflow instance
Multiple Clients per Workflow
Will need to extract instanceID from
message headers
Proxy inner channel context manager
Exposing Workflows as Services
Brian Noyes
Chief Architect
IDesign Inc
Agenda
SOA Overview
WF Service Capabilities
Exposing WF Workflows as Services
Consuming Services from Workflows
Workflow 4.0 Coming Changes
Workflows in the Cloud
Consuming Services from Workflows
SendActivity acts as a WCF proxy
Needs service contract interface that it
will be calling
Needs proxy configuration to specify binding
and endpoint information
SendActivity Limitations
Default security on NetTcpContextBinding and
WSHttpContextBinding are Windows
Authentication based on host process identity
Default security on BasicHttpBinding is None
Can configure a client certificate for certificate
authentication in host process app.config
No easy way to use username/password or
token authentication
Solution: custom activity that encapsulates a
normal WCF proxy
Consuming Services from Workflows
Brian Noyes
Chief Architect
IDesign Inc
Agenda
SOA Overview
WF Service Capabilities
Exposing WF Workflows as Services
Consuming Services from Workflows
Workflow 4.0 Coming Changes
Workflows in the Cloud
What’s New in 4.0?
Across WF...? TONS!
Specific to Services
SendMessage / ReceiveMessage activities
replace Send/Receive activities
Better integration with WCF capabilities
Easier correlation for calls between workflows
Agenda
SOA Overview
WF Service Capabilities
Exposing WF Workflows as Services
Consuming Services from Workflows
Workflow 4.0 Coming Changes
Workflows in the Cloud
Workflows in the Cloud
Set of new activities
for integrating with
Cloud Services
Run workflows in the cloud
Scalable, robust, reliable
infrastructure for
running workflows
Workflows in the Cloud
Child Workflow
Step 1
Step 2
Parent Workflow
Start
Process
Client
App
Invoke
Sub-Process
Aggregate
Results
Notify
Client
Summary
WF fits nicely into the SOA picture with
.NET 3.5 and 4.0 capabilities
WF fits nicely into the future of cloud computing
Consider WF for front end service coordination
(orchestration)
Consider WF for service processing implementation
Can be used for workflow-workflow coordination
Resources
IDesign WF Master Class
Developing Applications with Windows Workflow Foundation, Brian Noyes,
LiveLesson training DVD http://www.softinsight.com/LiveLesson
Essential Windows Communication Foundation (WCF): For .NET Framework 3.5,
Resnick, Crane, Bowen, Addison Wesley
Pro WF, Bruce Bukovics, Apress
Essential Windows Workflow Foundation, Dharma Shukla and Bob Schmidt, Addison
Wesley, 2006
http://www.awprofessional.com/bookstore/product.asp?isbn=0321399838&rl=1
E-mail: [email protected]
Blog: http://briannoyes.net
10 pairs of MP3
sunglasses to be won
Complete a session
evaluation and
enter to win!
© 2009 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries.
The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should
not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS,
IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.