Microsoft Confidential
Host (.exe, IIS/WAS,.NET Services, …) WF Runtime Extensions Tracking Persistence … … Tooling VS Designer VS Debugger Rehosted Designer Workflow Activity Library
Code void GetPassword(string password) { bool haveUser = State.Get("haveUser"); if (!haveUser) { throw new Exception(); } string user = State.Get("User"); Validate(user, password); } Code void GetPassword(string password) { Validate(user, password); } Code void GetUser(string user) { // validate haven't gotten user yet bool haveUser = State.Get("haveUser"); if (haveUser) { throw new Exception(); } State.Set("haveUser", true); State.Set("User", user); } Code void GetUser(string user) { } Code { string user = Console.ReadLine(); string password = Console.ReadLine(); Validate(user, password); } Control Flow string user = State.Get("User"); State Input State.Set("User", user); Input State Input Control Flow
Flow control Flowchart ForEach DoWhile Break WCF Send Receive SendReply SendParameters ReceiveParameters CorrelationScope InitializeCorrelation … Others Assign MethodInvoke Persist Interop PowerShellCommand... Microsoft is planning to ship more activities via CodePlex
Simple step-by-step model, with decisions and switches Allows you to return to previous activities in the workflow
Control Flow Activities Flowchart Sequential Create Your Own Activity Ecosystem SharePoint Dynamics Systems Center HPC TFS Base Activity Library WCF Messaging Invoke Try/Catch Expressions Interop WF Primitives
WorkflowElement For creating custom activities from scratch Activity For creating custom activities from other activities
Used to define the way data flows in and out of an activity. InArgument, OutArgument, InOutArgument Arguments Used to declare named storage with scope and lifetime for data within an activity. Variable Variables Takes one or more input arguments, performs some operation on those input arguments, and then returns a value. Expressions
WCF Service WF Workflow Client WCF endpoint External Service External Service External Service External Service
.NET 3.5 Send Receive.NET 4.0 Send Receive SendReply SendParameters ReceiveParameters CorrelationScope InitializeCorrelation …
10-100X Performance Improvements Full control over persistence Flow-in Transactions Partial Trust Support
Improved designer performance Improved usability Major rehosting Improvements Unified debugging experience (step into XAML)
Import/export applications Configure applications Manage running applications Update running applications Monitor running applications
© 2009 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.