Presentation is loading. Please wait.

Presentation is loading. Please wait.

Zoiner Tejada Hershey Technologies. About Zoiner Tejada.

Similar presentations


Presentation on theme: "Zoiner Tejada Hershey Technologies. About Zoiner Tejada."— Presentation transcript:

1 Zoiner Tejada Hershey Technologies

2 About Zoiner Tejada

3 Overview Provide architectural overview of implementing services with workflow Approaches in.NET 3.0 &.NET 3.5 Various hosting architectures Tie back to SOA and Service Design

4 Principles of Service Design Standardized Service Contract Service Loose Coupling Service Abstraction Service Reusability Service Autonomy Service Statelessness Service Discoverability Service Composability

5 What are Workflow Services? Implementing Service Operations with Workflow activities.

6 Visual Studio Support

7 Workflow Implementation Options.NET 3.0.NET 3.5+

8 Service Options – Calling In Workflow Instance Client ASMX Web Proxy Local Service Workflow Instance WCF Service Proxy Client

9 Service Options – Calling Out Workflow Instance ASMX Web Service Business Object Workflow Instance WCF Service

10 General Architecture Workflow Interaction Layer ASP.NET Windows Forms Windows Forms WPF Windows Mobile Windows Mobile Tracking Persistence Workflow Runtime Workflow Definitions Workflow Definitions Rules / Policies Interaction Systems System Interactions

11 Architectural Options Self Hosted Custom Service Host Workflow Service Host IIS Hosted Custom Service Host Workflow Service Host WAS Hosted Custom Service Host Workflow Service Host

12 Windows Service, Window Forms, WPF App or Console App Workflow Interaction Layer Tracking Persistence Workflow Runtime Workflow Definitions Workflow Definitions Rules / Policies Self Hosted Workflow Services

13 Approaches to Self Hosting ServiceHost Derived ServiceHost Extended Create a class inherits from IExtension Has property for WorkflowRuntime Attach (from IExtension ) starts Workflow Runtime Detach stops Workflow Runtime Add to serviceHost.Exensions before calling Open

14 Service Workflow Definitions in 3.0 Local Service Service Operation Invoked Workflow Runtime Workflow A Instance Workflow B Instance Workflow C Instance Workflow X Operation Implementation Calls Method On Local Service Raises Event Handled By Workflow Runtime Workflow Runtime Raises Event On Correct Workflow Instance Workflow Resumes Execution

15 IIS Hosted Workflow Services SVC WorkflowServiceHostFactory Type XAML file WorkflowServiceHost can provide MEX endpoint for WSDL Limited to HTTP Transport Protocol Message Based Activation Idle-Time Management Process Recyling

16 WorkflowServiceHost Workflow Interaction Layer Tracking Persistence Workflow Runtime Workflow Definitions Workflow Definitions Rules / Policies IIS SVC File IIS Hosted Workflow Services

17 DEMO – IIS Hosting SVC

18 WAS Hosted Workflow Services Requires IIS 7.0 Similar to IIS option, expands to include: TCP Protocol Requires Configuration Change to Application in IIS to add protocols beyond HTTP

19 Service Workflow Definitions in 3.5 Workflow Service Host Workflow Service Host Client DataUpload WorkflowService DataUpload WorkflowService Proxy WCF Config Workflow Runtime Workflow Runtime WSDL Service Contract UploadData()

20 Demo - Service Contracts Workflow First Contract First

21 Context for Workflow Services Workflow Instance Client Workflow Instance WCF Service Proxy Context allows for sending messages to the correct workflow instance. Context is the opaque package of data generated on the server side (workflow side) that is returned to the client like a cookie. The client must include this context in all future requests to be able to communicate with the correct workflow instance. BasicHttpContextBinding (Cookies) WsHttpContextBinding (SOAP Header) NetTcpContextBinding (SOAP Header)

22 What is in the Context? In Practical Terms, it's usually the WorkflowInstanceId! Stored in a property bag (Idictionary ) described by the ContextMessageProperty type.

23 Conversations A logical grouping of Receive with Send activities. Disambiguate multiple Receive activities that are waiting on the same Operation, typically within a Parallel activity. It manifests itself as an additional property in the Context, by the name of "conversationId".

24 DEMO – Context & Conversation

25 Securing Workflow Services Secure at the Operation Level Authenticate & Authorize at Receive Activity Easy support for Windows Users & Roles OperationValidation event to perform ClaimSet validation Your workflow might not have client credentials all the time. When reacting to a DelayActivity activation.

26 Principles of Service Design Standardized Service Contract Service Loose Coupling Service Abstraction Service Reusability Service Autonomy Service Statelessness Service Discoverability Service Composability

27 Summary Three Different Hosting Options Self Hosting IIS IIS /WAS Applying SOA Service design principles with WF 3.5.

28 Thank You! Questions? Feel free to contact me ztejada@hersheytech.com


Download ppt "Zoiner Tejada Hershey Technologies. About Zoiner Tejada."

Similar presentations


Ads by Google