1 / 34

Workflow Services Integration of WCF and WF

Workflow Services Integration of WCF and WF. PhaniKumar M T Technical Architect | BrainScale Consulting phani@brainscale.com. Session Objectives and Takeaways. Why Workflow Services? Architectural overview of Workflow Services Features Context Exchange Durable Services

ona
Download Presentation

Workflow Services Integration of WCF and WF

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Workflow ServicesIntegration of WCF and WF PhaniKumar M T Technical Architect | BrainScale Consulting phani@brainscale.com

  2. Session Objectives and Takeaways • Why Workflow Services? • Architectural overview of Workflow Services • Features • Context Exchange • Durable Services • Duplex Workflow Services • Conversations

  3. Agenda • A Typical Application Architecture • Architecture of WF Services • Features • Context Exchange • Durable Services • Duplex Workflow Services • Conversations • Prerequisites: • Basic Understanding of WF and WCF

  4. A Typical Application Architecture

  5. Windows Workflow Foundation What is Workflow? Visual Studio Designer A Workflow Workflow is the organization of work Activity Activity Library What’s the value of Workflow? Long Running Logic Workflow Runtime Engine Flexibility Runtime Services Transparency Host Process

  6. Workflow ServicesAdvantages • 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

  7. DEMO First Look at Workflow Services

  8. Bindings • NetTcpContextBinding • WSHttpContextBinding • BasicHttpContextBinding • <Your Binding Here> • Create a custom binding and insert the ContextChannel into the Channel Stack

  9. Custom Context Binding <customBinding> <binding name="namedPipeWithContext"> <context /> <binaryMessageEncoding /> <namedPipeTransport /> </binding> </customBinding>

  10. Session Objectives and Takeaways • Why Workflow Services? • Architectural overview of Workflow Services • Features • Context Exchange • Durable Services • Duplex Messaging • Conversations

  11. Context Exchange Architecture • ContextChannelimplemention • Receive • Extract context to ContextMessageProperty • Apply context on response to activating request • Send • Add context to all outgoing messages • Representation of context • SOAP header <wsc:Context /> • HTTP cookie • In code: IDictionary<XmlQualifiedName, string> WorkflowOperationInvoker Service Runtime DurableInstanceProvider MessageContextInspector OperationInvoker OperationSelector ContextChannel ListenerChannel InstanceProvider MessageInspector

  12. Setting Outgoing Context • // inside wf code application • IDictionary<XmlQualifiedName, string> context; • // context = … obtain context from store • sendActivity.Context = context; • //also, to dynamically set send address • sendActivity.CustomAddress = • “net.tcp://140.141.2.5/service.svc”;

  13. demo Context Exchange, Persistence and Management

  14. Non WF Client Access to Context • // my wpf application • IDictionary<XmlQualifiedName, string> context; • // context = … obtain context from store • IContextManager cm = • proxy.InnerChannel.GetProperty<IContextManager>(); • if (null != cm) • cm.SetContext(context); • // need to use a channel stack which includes the • // context channel, or write the headers directly into • // the message (non-WCF) client

  15. Session Objectives and Takeaways • Why Workflow Services? • Architectural overview of Workflow Services • Features • Context Exchange • Durable Services • Duplex Messaging • Conversations

  16. Durable Services Architecture Persistence Provider Service.cs Service Instance Service Runtime App.config ServiceHost DurableInstanceProvider Operation 1 OperationInvoker MessageContextInspector Operation 2 OperationSelector InstanceProvider ContextChannel ListenerChannel MessageInspector DurableServiceBehavior ServiceDescription DurableOperationBehavior ServiceBehavior OperationBehavior

  17. demo Durable Services

  18. Session Objectives and Takeaways • Why Workflow Services? • Architectural overview of Workflow Services • Features • Context Exchange • Durable Services • Duplex Messaging • Conversations

  19. demo Duplex Messaging

  20. Session Objectives and Takeaways • Why Workflow Services? • Architectural overview of Workflow Services • Features • Context Exchange • Durable Services • Duplex Messaging • Conversations

  21. Conversations • Multiple messages arriving for the same operation • Receives operating in parallel • Scenarios • Bidding • Coordinating approvals

  22. demo Conversations

  23. So, does the integration make sense?

  24. Summary • WF and WCF developers benefit from these two worlds coming together • Workflow Services provide a natural way to model services • With an understanding of context, advanced communication patterns can be implemented across many parties.

  25. Feedback / QnA • Your Feedback is Important! Please take a few moments to fill out our online feedback. For detailed feedback, use the form at http://www.connectwithlife.co.in/vtd/helpdesk.aspx Or email us at vtd@microsoft.com • Use the Question Manager on LiveMeeting to ask your questions now!

  26. Contact • You can visit us at: www.brainscale.com • Email Address phani@brainscale.com

More Related