1 / 24

Windows Workflow Foundation

Windows Workflow Foundation. Mike Taulty Developer & Platform Group Microsoft Ltd Mike.Taulty@microsoft.com http://mtaulty.com. EX: Check Inventory. EX: Escalate To Manager. Workflow Systems. Graphical Designer Component Palette Execution Engine Execution Services Extensibility.

devin
Download Presentation

Windows Workflow Foundation

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. 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 Or a state diagram … Like a flowchart ...

  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. Workflow Designer What Is Workflow Foundation?

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

  6. Workflow public class MyWorkflow { MyWorkflow() { Activities.Add(…); }} Activity Activity public class Activity { override Execute() { … } } public class Activity { override Execute() { … } } 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

  7. Basic Composite Base Activity Library

  8. XAML XAML XAML Markup Only ‘Declarative’ Markup & Code Code Only Application Generated App. Creates ActivityTree & Serialises C#/VB C#/VB C#/VB XML defines workflowstructure logic and dataflow XML defines workflowCode-beside definesextra logic Code creates workflowin constructor Workflow Compiler wfc.exe .NET assembly ctor defines workflow Workflow Loader WorkflowRuntime C#/VB Compiler Workflow Authoring Modes

  9. The Workflow Environment Demo WinFX Feb CTP

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

  11. Hosting, Theming the Workflow Designer Demo WinFX Feb CTP

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

  13. Runtime Services Scenario WinFX Feb CTP

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

  15. Host/Workflow Communication Scenario WinFX Feb CTP

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

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

  18. Building Activities Scenario WinFX Feb CTP

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

  20. State Machine Workflows Demo WinFX Feb CTP

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

  22. Rule-based Workflows & Policies Demo WinFX Feb CTP

  23. 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/Forums

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

More Related