1 / 35

The Windows Workflow Foundation

The Windows Workflow Foundation. David Gristwood. Application Architect Microsoft Limited David.Gristwood@microsoft.com http://blogs.msdn.com/David_Gristwood/. .NET At The Core. Windows Workflow Foundation. The Programming Model, Engine And Tools For Building Workflow

sumayah
Download Presentation

The 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. The Windows Workflow Foundation David Gristwood Application Architect Microsoft Limited David.Gristwood@microsoft.com http://blogs.msdn.com/David_Gristwood/

  2. .NET At The Core

  3. Windows Workflow Foundation The Programming Model, Engine And Tools For Building Workflow Enabled Applications On Windows Platform.

  4. Windows Workflow Foundation The Programming Model, Engine And Tools For Building Workflow Enabled Applications On Windows Platform. • Single workflow Technology for Windows • Redefining workflow • Take workflow Mainstream Best-In-Class Workflow Platform & Tools For Microsoft Products & Partner/Customer Ecosystem

  5. Real World Behavior “Most suppliers confirm our orders but some forget and we need to follow up” “Orders are confirmed in 48 hours and shipped within 30 days” “What is the status of this order and what is the next step?”

  6. Workflow Software Challenges “Most suppliers confirm our orders but some forget and we need to follow up” “Orders are confirmed in 48 hours and shipped within 30 days” “What is the status of this order and what is the next step?” Long Running & Stateful Require Flexible Control Flow Must Provide Transparency Workflows run for up to 30 days and must maintain state throughout Rendering runtime state within a visualization of the workflow control flow Flexibility for people to override or skip steps in the workflow

  7. Why Workflow Technology? Workflows Technology Provides Abstractions To Describe Real World Scenarios

  8. EX: Check Inventory EX: Escalate To Manager What Is A Workflow? A Set Of Activities That Coordinates People And / Or Software... Or a state diagram…. Like a flowchart….

  9. WF Architecture

  10. WF Architecture VISUAL DESIGNER

  11. Workflow Basics A workflow classmay be defined in markup A workflow is a class

  12. Markup Only Markup Only Code only XAML XAML XAML Markup + Code C#/VB C#/VB Workflow Compiler C#/VB Compiler NET Assembly Workflow Instance Authoring Modes Workflow Runtime

  13. Hello World Demo

  14. Workflow Instance Loader Persistence XAML Workflow Execution Idle! Workflow Runtime Runtime Services Host Application Workflow Instance

  15. Activities are the building blocks of workflows The unit of execution, re-use and composition Basic activities are steps within a workflow Composite activities contains other activities Base Activity Library provides out-of-the-box activity set Partners and customers author custom activities Activity Basics

  16. Activity Basics • Activities are classes: • Properties and events are defined by the activity author and programmable from workflows • Has methods that are coded by the activity author but invoked by the workflow runtime (EG: Execute) or designer • Can be built into workflow assemblies or deployed as re-usable libraries

  17. Compliance Extend activity Compose activities CRM Out-of-Box Activities Author new activity RosettaNet IT Mgmt Activities: An Extensible Approach Domain-SpecificWorkflow Packages Base Activity Library Custom Activity Libraries • OOB activities,workflow types, base types • General-purpose • Activity libraries define workflow constructs • Create/Extend/Compose activities • App-specificbuilding blocks • First-class citizens • Vertical-specificactivities & workflows • Best-practice IP &Knowledge Sequencing engine driven by activities (no fixed language)

  18. Services provide host specific functionality to the WorkflowRuntime Out-of-Box or Custom services Workflow Runtime Services Host Application App Domain Runtime Services Schedules workflow execution on a thread (must have one and only one) WorkflowScheduler Service WorkflowCommitWork BatchService Commits transactions (may have one but only one) Workflow PersistenceService Saves and loads instance state & timer info (may have one but only one) TrackingService Processes state and data change events (may have one or more but only one per service instance per workflow type)

  19. Workflow Runtime ServicesOut-of-Box services • SqlTrackingService • Stores tracked information in SQL Server/MSDE • SqlWorkflowPersistenceService • Stores timer & workflow state in SQL Server/MSDE • DefaultWorkflowSchedulerService • Used for asynchronous execution of workflows; uses default .NET thread pool • ManualWorkflowSchedulerService • Executes workflow activities on calling host thread; used for synchronous, in-line execution • DefaultWorkflowCommitWorkBatchService • Commits batches of work using .NET transactions

  20. Tracking Data State and data changes Emit tracking info from code Dynamic changes Tracking Profile Specifies what to track Optionally serialize in XML Tracking Service Manages profiles Receives tracking events TrackingKey concepts Tracking Service • Usage • State visibility • KPI info • Archiving • Auditing Activities Profile Workflow Instance Host Application

  21. Tracking • Simple Tracking Sample • Workflow Monitor Sample • with While and Parallel Sample Demo

  22. Hosting a Workflow • Bring Your Own Process • Host application provides app domain and process • Windows service, console, winforms, ASP, etc. • Application manages app domain creation and lifetime • Support for multiple runtimes in an app domain • Workflow runtime runs under full trust • Web and App config file support • HttpModule provided for ASP applications

  23. Host Comminications • Host processes communicate with workflows by exchanging data through custom local communication services • Messaging via methods and events

  24. Host Communications WinForms Lookup Host Communications Sample Simple Input Sample Demo

  25. Step1 Rule1 Event State1 Step1 Data State2 Event Step2 Rule2 Step2 Flexible Control Flow 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

  26. 26 Structure of State Machine Workflow Activity State Machine Workflow State Event Driven Event Driven State State Set State Event Driven Event Driven Set State Set State Event Driven Set State State Event Driven Set State

  27. 27 ExamplePO Process On Order Completed Waiting to Create Order On Order Created On Order Processed Order Created Order Processed On Order Completed On Order Shipped On Order Shipped Order Shipped Order Completed On Order Completed

  28. State Machine Workflow Ordering State Machine Sample Speech Application Sample Demo

  29. Workflow Mainstream: Office 2007 Office 2007 Workflow Vision Provide document centric workflow as an integrated part of the Office experience Empower information workers with common workflow solutions and activitiesout of the box Empower organizations to build sophisticated workflow using the full functionality of the broader platform Workflow Enabled Office OutLook: Receive notifications & track tasks FrontPage: Create & customize workflows SharePoint: Start / participate, customize & track workflows Word, PowerPoint, Excel, InfoPath: Start / participate in SharePoint workflow Workflows run inside SharePoint and are accessible across the Office System

  30. Business Activity Monitor And Admin Tools Design Tools Accelerators Workflow Orchestration Messaging • Future version will migrate to Windows Workflow Foundation for orchestration Transformation Adapters • Workflow framework • Future technology exposed via WinFX • Broad set of scenarios • Used to build solutions • Enables manageability and scale-out in solutions • Use for building workflow into apps or workflow enabled servers Visual Studio Designer Windows Workflow Foundation WinFX Workflow and BizTalk Server • Biztalk Server - Premium BPM server • Distinct server product • Use in B2B, EAI, BPM scenarios • Deployable solutions • Manageability, Scale-out

  31. BizTalk Server provides workflow across existing applications and between trading partners as part of its business process and integration feature set “If you are integrating multiple applications with some interaction that involves system workflow you should use BizTalk Server” “If you want runtime scalability, fault tolerance and administration tools you should use BizTalk Server” How to Choose?BizTalk Server or Workflow Foundation BizTalk ServerEAI, B2B & BPM • Windows Workflow Foundation is a framework for adding workflow inside a custom application • “If you are building a complete application that includes workflow you should use Windows Workflow Foundation” Windows Workflow Foundation

  32. Workflow FAQs • When to use workflow • Which host to use • Communicating between workflow and host • Checking the status of a workflow • Sequential versus state machine workflows • Deployment options • Hosting some form of designer • Workflow performance • Workflow versus BizTalk • Workflow in Office 2007

  33. Summary • Platform level workflow framework for use within Microsoft products & ISV applications • Will be used by BizTalk Server, Office 2007, Dynamics, … • Available to all Windows customers A SINGLE WORKFLOWTECHNOLOGY FOR WINDOWS

  34. Windows Workflow Foundation Resources • MSDN® Workflow Page • Download the Microsoft® Visual Studio® Extensions, etc • http://msdn.microsoft.com/workflow • Community Site • Download samples, tools, and runtime service components • http://wf.netfx3.com • Forums • Ask questions in the forums • http://wf.netfx3.com/forums

More Related