Zoiner Tejada Hershey Technologies. About Zoiner Tejada.

28
Workflow Services Zoiner Tejada Hershey Technologies

Transcript of Zoiner Tejada Hershey Technologies. About Zoiner Tejada.

  • Slide 1
  • Zoiner Tejada Hershey Technologies
  • Slide 2
  • About Zoiner Tejada
  • Slide 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
  • Slide 4
  • Principles of Service Design Standardized Service Contract Service Loose Coupling Service Abstraction Service Reusability Service Autonomy Service Statelessness Service Discoverability Service Composability
  • Slide 5
  • What are Workflow Services? Implementing Service Operations with Workflow activities.
  • Slide 6
  • Visual Studio Support
  • Slide 7
  • Workflow Implementation Options.NET 3.0.NET 3.5+
  • Slide 8
  • Service Options Calling In Workflow Instance Client ASMX Web Proxy Local Service Workflow Instance WCF Service Proxy Client
  • Slide 9
  • Service Options Calling Out Workflow Instance ASMX Web Service Business Object Workflow Instance WCF Service
  • Slide 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
  • Slide 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
  • Slide 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
  • Slide 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
  • Slide 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
  • Slide 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
  • Slide 16
  • WorkflowServiceHost Workflow Interaction Layer Tracking Persistence Workflow Runtime Workflow Definitions Workflow Definitions Rules / Policies IIS SVC File IIS Hosted Workflow Services
  • Slide 17
  • DEMO IIS Hosting SVC
  • Slide 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
  • Slide 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()
  • Slide 20
  • Demo - Service Contracts Workflow First Contract First
  • Slide 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)
  • Slide 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.
  • Slide 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".
  • Slide 24
  • DEMO Context & Conversation
  • Slide 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.
  • Slide 26
  • Principles of Service Design Standardized Service Contract Service Loose Coupling Service Abstraction Service Reusability Service Autonomy Service Statelessness Service Discoverability Service Composability
  • Slide 27
  • Summary Three Different Hosting Options Self Hosting IIS IIS /WAS Applying SOA Service design principles with WF 3.5.
  • Slide 28
  • Thank You! Questions? Feel free to contact me [email protected]