Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Microsoft Technical Roadshow 2006 Windows Workflow Foundation Mike Taulty Developer & Platform Group Microsoft Ltd

Similar presentations


Presentation on theme: "The Microsoft Technical Roadshow 2006 Windows Workflow Foundation Mike Taulty Developer & Platform Group Microsoft Ltd"— Presentation transcript:

1 The Microsoft Technical Roadshow 2006 Windows Workflow Foundation Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com http://mtaulty.com

2 EX: Check Inventory EX: Escalate To Manager Workflow Systems Graphical Designer Component Palette Execution Engine Execution Services Extensibility Like a flowchart... Or a state diagram …

3 Windows Workflow Foundation Single framework for building Workflow applications on Windows Programming model, runtime and tools Highly extensible Supports Human/System Workflow Supports long running Workflows and their state

4 WF != WWF

5 What Is Workflow Foundation? Workflow Designer

6 Scenario – Workflow Foundation Submitter IIS Upload Service Admin Service Windows Service Approver Publisher Workflow

7 Workflows and Activities A Workflow is a.NET class Composed of Activity (.NET class) Activities may be composed of more Activities Built into an assembly and referenced like any other class Workflow public class MyWorkflow { MyWorkflow() { Activities.Add(…); } } Activity public class Activity { override Execute() { … } Activity public class Activity { override Execute() { … }

8 Base Activity Library BasicComposite

9 Workflow Authoring Modes C#/VB Compiler Markup Only Declarative XML defines workflow structure logic and data flow XAML Code Only Code creates workflow in constructor C#/VB Markup & Code XML defines workflow Code-beside defines extra logic XAMLC#/VB Application Generated XAML C#/VB App. Creates Activity Tree & Serialises Workflow Compiler wfc.exe.NET assembly ctor defines workflow Workflow Runtime Workflow Loader

10 The Workflow Environment Demo

11 Workflow Designer Hosted in Visual Studio 2005 Hosted in your application for end-users Supports theming in both VS and non-VS environments

12 Hosting, Theming the Workflow Designer Demo

13 Workflow Runtime Runtime Engine MyWF.dll WF1 MyWorkflowHost.exe WorkflowRuntime rt = new WorkflowRuntime(); Runtime Services PersistenceTrackingSchedulingTransactions Base Activity Library i.Start(); WorkflowInstance i = rt.CreateWorkflow(typeof(WF1)); WF1 Instance Sequence Invoke1 OnEvent1 Apply Changes

14 Runtime Services Scenario

15 Host/Runtime Communication Runtime Services Workflow Instance MyWorkflowHost.exe Runtime Engine class TimeService : ITimeService { GetTime(); event CoffeeTime(); } Make external call GetTimeExternal Event CoffeeTimeBegin Shared I/Face ITimeService { GetTime(); event CoffeeTime(); } Add as service Coffee Time! Firing event involves knowing workflow id

16 Host/Workflow Communication Scenario

17 Custom Activities Activity is a class Derive from an existing activity Or Activity itself Add properties Dependency properties Override Execute() FileCopyActivity class FileCopyActivity : Activity { override Execute(); }

18 Activities: Optional Features ICompensatableActivity public class MyActivity: Activity {... } Interface Serialiser Designer ValidatorToolboxItem Code Generator Companion Classes [Designer(typeof(MyDesigner))] [Validator(typeof(MyValidator))] [CodeGenerator(typeof(MyCodeGen))] [Serializer(typeof(MySerializer))] [ToolboxItem(typeof(MyToolboxItem))]

19 Building Activities Scenario

20 Styles of Workflow Rules + data state drive processing order Rules-driven Activities Data-driven Simple conditions, complex policies Constrained Activity Group State Machine Workflow External events drive processing order Reactive, event-driven Skip/re-work, exception handling Graph metaphor Sequential Workflow Sequential structure Prescribes processing order Prescriptive, formal Automation scenarios Flowchart metaphor Step1 Step2 State2 State1 Event Rule1 Rule2 Data Step2 Step1

21 State Machine Workflows Demo

22 Applying Rule-based Policies Data Policy (RuleSet) Rule: If PRICE then Rule: If … then Priority: 1 Priority: 2 Priority: 3 Priority: 4 Priority: 5 Price: 200 Change

23 Rule-based Workflows & Policies Demo

24 Windows Workflow Foundation Resources MSDN Workflow Page Download 10 Hands-on Labs http://msdn.microsoft.com/workflow Community Site Download samples, tools and runtime service components http://www.WindowsWorkflow.net Forums http://www.WindowsWorkflow.net/F orums http://www.WindowsWorkflow.net/F orums

25 © 2006 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS SUMMARY.


Download ppt "The Microsoft Technical Roadshow 2006 Windows Workflow Foundation Mike Taulty Developer & Platform Group Microsoft Ltd"

Similar presentations


Ads by Google