VAR318: Developing Service Oriented Workflows Brian Noyes IDesign Inc (
About Brian Chief Architect, IDesign Inc. ( Microsoft Regional Director / MVP Publishing ● Developing Applications with Windows Workflow Foundation, LiveLessons training DVD, June ● Smart Client Deployment with ClickOnce, Addison Wesley, January 2007 ● Data Binding in Windows Forms 2.0, Addison Wesley, January 2006 ● MSDN Magazine, MSDN Online, CoDe Magazine, The Server Side.NET, asp.netPRO, Visual Studio Magazine Speaking ● Microsoft TechEd US, Europe, Malaysia, Visual Studio Connections, DevTeach, INETA Speakers Bureau, MSDN Webcasts Participates in Microsoft Design Reviews Blog:
Agenda SOA Overview WF Service Capabilities Exposing WF Workflows as Services Consuming Services from Workflows
SOA Overview Service Orientation is a way of building composite applications A service is a composable unit of processing and data exposed to consumers 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 5
Loan Application Process Workflow as Orchestration Submit Loan Application Validate Application Send to Reviewer Approve Application Fund Application Validation Service Validation Biz Layer Exchange Notification Service Notification Biz Layer Notification Data Layer Approval Service Approval Biz Layer Approval Data Layer SQL DB Funding Service Funding Biz Layer Funding Data Layer SQL DB
Workflow as Service Operation Transfer Money Debit Manager Credit Manager Authorization Manager Loan Application Process Approve Transfer Debit Account Credit Account Transfer Funds Fund Manager
Agenda SOA Overview WF Service Capabilities Exposing WF Workflows as Services Consuming Services from Workflows
WF Service Capabilities WF leverages WCF’s ability to define, expose, and call services ● Interoperable ● Extensible ● Productive ● Complies with SOA tenets
WF Service Capabilities WF can expose workflows as services ● Activities as service operation implementation ● ReceiveActivity WF Workflows can be clients to services ● SendActivity ● 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
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
16 Exposing Workflow Services Brian Noyes Chief Architect IDesign Inc (
Agenda SOA Overview WF Service Capabilities Exposing WF Workflows as Services 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
19 Consuming Services From Workflows Brian Noyes Chief Architect IDesign Inc (
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 reasonable way to use username/password or token authentication ● Solution: custom activity that encapsulates a normal WCF proxy
Summary WF fits nicely into the SOA picture with.NET 3.5 capabilities Consider WF for front end service coordination (orchestration) Consider WF for service processing implementation Can be used for workflow-workflow coordination as well
Resources IDesign WF Master Class (3 days) Developing Applications with Windows Workflow Foundation, Brian Noyes, LiveLesson training DVD, Pro WF, Bruce Bukovics, Apress Essential Windows Workflow Foundation, Dharma Shukla and Bob Schmidt, Addison Wesley, =1 =1 Will Work For Process – Create and Run Workflows, Brian Noyes, The Server Side.NET, August Manage Application Processes with Windows Workflow Foundation, Brian Noyes, The Server Side.NET, March 2006, sses sses Avoid - Presenting Windows Workflow Foundation, Sams Publishing, Blog:
Your Feedback is Important Please fill out a session evaluation form and either put them in the basket near the exit or drop them off at the conference registration desk. Thank you!