slides
DESCRIPTION
TRANSCRIPT
![Page 1: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/1.jpg)
VAR318: Developing Service Oriented Workflows
Brian Noyes
IDesign Inc (www.idesign.net)
![Page 2: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/2.jpg)
About Brian
• Chief Architect, IDesign Inc. (www.idesign.net) • Microsoft Regional Director / MVP• Publishing
● Developing Applications with Windows Workflow Foundation, LiveLessons training DVD, June 2007.
● 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• E-mail: [email protected]• Blog: http://briannoyes.net
![Page 3: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/3.jpg)
Agenda
• SOA Overview• WF Service Capabilities• Exposing WF Workflows as Services• Consuming Services from Workflows
![Page 4: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/4.jpg)
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
![Page 5: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/5.jpg)
SOA Tenets
• Service boundaries are explicit
• Services are autonomous
• Services share schema and contract, not type
• Services are compatible based on policy
5
![Page 6: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/6.jpg)
Loan Application Process
Workflow as Orchestration
Exchange SQL DB SQL DB
![Page 7: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/7.jpg)
Workflow as Service Operation
Transfer Money
DebitManager
CreditManager
AuthorizationManager
Loan Application Process
FundManager
![Page 8: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/8.jpg)
Agenda
• SOA Overview• WF Service Capabilities• Exposing WF Workflows as Services• Consuming Services from Workflows
![Page 9: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/9.jpg)
WF Service Capabilities
• WF leverages WCF’s ability to define, expose, and call services● Interoperable● Extensible● Productive ● Complies with SOA tenets
![Page 10: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/10.jpg)
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
![Page 11: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/11.jpg)
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
![Page 12: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/12.jpg)
Agenda
• SOA Overview• WF Service Capabilities• Exposing WF Workflows as Services• Consuming Services from Workflows
![Page 13: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/13.jpg)
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
![Page 14: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/14.jpg)
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
![Page 15: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/15.jpg)
Multiple Clients per Workflow
• Will need to extract instanceID from message headers● Proxy inner channel context manager
![Page 16: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/16.jpg)
16
Exposing Workflow Services
Brian NoyesChief ArchitectIDesign Inc (www.idesign.net)
![Page 17: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/17.jpg)
Agenda
• SOA Overview• WF Service Capabilities• Exposing WF Workflows as Services• Consuming Services from Workflows
![Page 18: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/18.jpg)
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
![Page 19: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/19.jpg)
19
Consuming Services From Workflows
Brian NoyesChief ArchitectIDesign Inc (www.idesign.net)
![Page 20: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/20.jpg)
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
![Page 21: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/21.jpg)
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
![Page 22: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/22.jpg)
Resources
• IDesign WF Master Class (3 days)• Developing Applications with Windows Workflow Foundation, Brian Noyes,
LiveLesson training DVD, http://www.softinsight.com/LiveLesson • 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 • Will Work For Process – Create and Run Workflows, Brian Noyes, The
Server Side .NET, August 2006. http://www.theserverside.net/tt/articles/showarticle.tss?id=WorkforProcess
• Manage Application Processes with Windows Workflow Foundation, Brian Noyes, The Server Side .NET, March 2006, http://www.theserverside.net/tt/articles/showarticle.tss?id=ManageAppProcesses
• Avoid - Presenting Windows Workflow Foundation, Sams Publishing, 2005.
E-mail: [email protected]: http://briannoyes.net
![Page 23: slides](https://reader033.vdocuments.net/reader033/viewer/2022042814/54c6f6924a795929038b4596/html5/thumbnails/23.jpg)
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!