Ed Pinto PM Microsoft Corporation
Host “Dublin”(IIS/WAS + App Server Extensions) Microsoft ®.NET Workflow Service.exe Host “Dublin”(IIS/WAS + App Server Extensions) Microsoft ®.NET Workflow Service.exe WF Runtime Tooling VS Designer VS Debugger Rehosted Designer Workflow Activity Library
Activities are the primitive abstraction for behaviorActivities are composable with other ActivitiesActivities have user-defined Variables for data storageActivities bind Arguments to in-scope Variables Activities define Arguments to declare the type of data that can flow into or out of an Activity Flow Chart Parallel Sequence Send Message Delay Receive Message Generate Order InArgument OutArgument InArgument OutArgument Process Order Send Report Variables
Instances Management Endpoint Management Endpoint Behaviors Persistence Tracking ServiceHostBase … … Tracking Workflow Service Host Activity Library SendMessage ReceiveMessage...
Instances Management Endpoint Management Endpoint Behaviors Persistence Tracking ServiceHostBase … … Tracking Workflow Service Host Activity Library SendMessage ReceiveMessage...
//Simple to author and maintain, performs poorly [OperationContract] public Picture GetPicture(string name) { //blocking I/O byte[] bytes = mediaService.GetMedia(name); return new Picture { Bytes = bytes, Name = name}; } //Performs well, difficult to author and maintain [OperationContract(AsyncPattern = true)] IAsyncResult public BeginGetPicture(string name, AsyncCallback callback, object state) { return new PictureAsyncResult(name, callback, state); } Picture EndGetPicture(IAsyncResult result) { return PictureAsyncResult.End(result); }
//Simple to author and maintain, calls are sequential [OperationContract] public Picture GetPicture(string name) { //blocking I/O byte[] bytes = mediaService.GetMedia(name); //blocking I/O PictureInfo info = pictuerInfoService.GetPictureInfo(name); return new Picture { Bytes = bytes, PictureInfo = info }; } //calls can be made in parallel, difficult to author and maintain [OperationContract(AsyncPattern = true)] IAsyncResult public BeginGetPicture(string name, AsyncCallback callback, object state) { return new BiggerPictureAsyncResult(name, callback, state); } Picture EndGetPicture(IAsyncResult result) { return BiggerPictureAsyncResult.End(result); }
Workflow Runtime Client Operation I/O Scheduler Parallel GetMedia GetPictureInfo Sequence GetMedia Other Activities
GetMedia Client Picture Service Media Service GetPictureInfo GetPicture Picture Info Service
Try Catch Finally Exception Handling Logic Process Message Variables Sequence Flow In Transaction Scope Variables Receive Message CompensableActivity Compensation Logic Body Variables Do X Compensate X
Submit Task JobId = 123 Task Complete JobId = Send 4. Receive 1. Start Job Job 123 Complete Application Application State 2. Store Job Lookup Job 123 JobId 789 JobId 456 JobId 123 JobId 123
Correlation Query Channels Context SendMessage/ReceiveMessage + CorrelationHandle Instance Store Instance Store Content (poid=123)
Workflow Submit Task Task Complete 2. Send 4. Receive 1. Start Job Job 123 Complete Correlation Handle Query Results JobId=123 Query Results JobId=123 Application State JobId 789 JobId 456 JobId 123 JobId 123 Correlation Query JobId = 123 Correlation Query JobId = 123 Send Message Receive Message 3. Store workflow with query results 5. Lookup workflow using query results
Picture Info Service GetMedia Client Picture Service Media Service GetPictureInfo GetPicture Picture Context Based Correlation Content Based Correlation Media PictureInfo
[OperationContract] public void SubmitOrder(Order order) { // your code here } [OperationContract] public void SubmitOrder(Order order) { // your code here } Workflow Service Host Persistence Tracking IIS/WAS Site/Service Configuration Tracking IIS Manager Management Control Enumeration Tracking IIS Manager Management Control Enumeration Tracking Management Endpoint Management Endpoint Tracking Instances WCF + WF + "Dublin" PowerShell Management APIs
Please fill out your evaluation for this session at: This session will be available as a recording at:
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
Correlation Query Channels Cookies Context SendMessage/ReceiveMessage + CorrelationHandle Instance Store Instance Store Body Content (poid=123)
Instances Management Endpoint Management Endpoint Behaviors Persistence Tracking IIS/WAS Site/Service Configuration Service Host [OperationContract] public void SubmitOrder(Order order) { // your code here } [OperationContract] public void SubmitOrder(Order order) { // your code here } … … Tools Trace Viewer Test Client Tracking Designer Debugger IIS Manager Management Control Enumeration Tracking IIS Manager Management Control Enumeration Tracking Management Endpoint Management Endpoint Metadata Tracking … … WCFWCF + WFWCF + WF + "Dublin" Workflow Service Host Activity Library SendMessage ReceiveMessage … Channels (HTTP, TCP, NamedPipes, …) Config Editor PowerShell Management APIs
Host WF Runtime Tooling VS Designer VS Debugger Rehosted Designer Workflow Activity Library
Application Submit Order POId = 123 Update Order POId = 123 POId 789 POId 456 POId 123 Application State 1. Receive 2. Store PO Receive 4. Lookup PO Store PO 123
Xaml GetMedia(Name) Client Picture Service Media Service Picture Info Service PictureInfo GetPictureInfo(Name) Picture GetPicture(Name)