Workflow services integration of wcf and wf l.jpg
This presentation is the property of its rightful owner.
Sponsored Links
1 / 34

Workflow Services Integration of WCF and WF PowerPoint PPT Presentation


  • 132 Views
  • Uploaded on
  • Presentation posted in: General

Workflow Services Integration of WCF and WF. PhaniKumar M T Technical Architect | BrainScale Consulting [email protected] Session Objectives and Takeaways. Why Workflow Services? Architectural overview of Workflow Services Features Context Exchange Durable Services

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Workflow ServicesIntegration of WCF and WF

PhaniKumar M T

Technical Architect | BrainScale Consulting

[email protected]


Session Objectives and Takeaways

  • Why Workflow Services?

  • Architectural overview of Workflow Services

  • Features

    • Context Exchange

    • Durable Services

    • Duplex Workflow Services

    • Conversations


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


A Typical Application Architecture


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


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


DEMO

First Look at Workflow Services


Bindings

  • NetTcpContextBinding

  • WSHttpContextBinding

  • BasicHttpContextBinding

  • <Your Binding Here>

    • Create a custom binding and insert the ContextChannel into the Channel Stack


Custom Context Binding

<customBinding>

<binding name="namedPipeWithContext">

<context />

<binaryMessageEncoding />

<namedPipeTransport />

</binding>

</customBinding>


Session Objectives and Takeaways

  • Why Workflow Services?

  • Architectural overview of Workflow Services

  • Features

    • Context Exchange

    • Durable Services

    • Duplex Messaging

    • Conversations


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


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”;


demo

Context Exchange, Persistence and Management


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


Session Objectives and Takeaways

  • Why Workflow Services?

  • Architectural overview of Workflow Services

  • Features

    • Context Exchange

    • Durable Services

    • Duplex Messaging

    • Conversations


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


demo

Durable Services


Session Objectives and Takeaways

  • Why Workflow Services?

  • Architectural overview of Workflow Services

  • Features

    • Context Exchange

    • Durable Services

    • Duplex Messaging

    • Conversations


demo

Duplex Messaging


Session Objectives and Takeaways

  • Why Workflow Services?

  • Architectural overview of Workflow Services

  • Features

    • Context Exchange

    • Durable Services

    • Duplex Messaging

    • Conversations


Conversations

  • Multiple messages arriving for the same operation

  • Receives operating in parallel

  • Scenarios

    • Bidding

    • Coordinating approvals


demo

Conversations


So, does the integration make sense?


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.


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 [email protected]

  • Use the Question Manager on LiveMeeting to ask your questions now!


Contact

  • You can visit us at:

    www.brainscale.com

  • Email Address

    [email protected]


  • Login