Presentation is loading. Please wait.

Presentation is loading. Please wait.

Introduction to Windows Workflow Foundation (WF) Keith Elder Microsoft MVP Blog: Quicken Loans –

Similar presentations


Presentation on theme: "Introduction to Windows Workflow Foundation (WF) Keith Elder Microsoft MVP Blog: Quicken Loans –"— Presentation transcript:

1 Introduction to Windows Workflow Foundation (WF) Keith Elder Microsoft MVP Blog: http://keithelder.net/blog/ Quicken Loans – http://www.quickenloans.com

2 Agenda Hello World in Workflow What is Workflow? Architecture Understanding the Runtime WF Extensibility Rules Engine Scenarios for WF Versioning Hosting WF in a SOA

3 DEMO HELLO WORLD

4 What is Workflow? http://tinyurl.com/38g64k The workflow framework and tools for Microsoft products and partner/customer ecosystem Single workflow technology for Microsoft ® Windows ® A framework for building workflow, not an application or server Make declarative workflow a mainstream development paradigm At the end of the day workflow is a new namespace and supporting APIs developers can use to declaratively express business logic and long running processes. http://tinyurl.com/38g64k

5 Architecture Host Process Windows Workflow Foundation Runtime Engine A Workflow An Activity Runtime Services Base Activity Library Custom Activity Library Visual Designer Key Concepts Visual Designer: Graphical and code- based construction Workflows are a set of Activities Workflows run within a Host Process: any application or server Developers can build their own Custom Activity Libraries Components Base Activity Library: Out-of-box activities and base for custom activities Runtime Engine: Workflow execution and state management Runtime Services: Hosting flexibility and communication

6 Understanding the Runtime Host Application App Domain SQL Out of Box Services are provided that support SQL Server 2000 & 2005 Common resource services for managing threading, timers and creating transactions PersistenceService stores and retrieves instance state. TrackingService manages profiles and stores tracked information. Runtime Services PersistenceService TrackingService SchedulerService TransactionService Services http://tinyurl.com/yuwsew

7 Activites: An Extensible Approach OOB activities, workflow types, base types General-purpose Activity libraries define workflow constructs Create/Extend/ Compose activities App-specific building blocks First-class citizens Base Activity Library Custom Activity Libraries Author new activity Extend activity Compose activities Vertical-specific activities and workflows Best-practice intellectual property (IP) and knowledge Domain-Specific Workflow Packages Compliance RosettaNet CRM IT Mgmt Out-of-Box Activities

8 WF Extensibility Designer Rehosting http://tinyurl.com/36vs2j

9 DEMO CUSTOM ACTIVITIES

10 Workflow Rules Conditions on activities If-Else While Replicator Conditioned Activity Group (CAG) Policy activity Contains and executes a RuleSet RuleSet execution provides priority-based, forward-chaining semantics Rules can be used outside workflow

11 Forward Chaining Amount = $25 Total = $80 Discount = 10% Rule 1 (P0) If Total > $50 & < $100 Then Discount = 10% Rule 2 (P0) If Total >= $100 Then Discount = 15% Rule 3 (P0) If Amount > $0 Then Total = Total + Amount Rule 1 Rule 3 Rule 2 Execution Sequence $105 RuleSet 15%

12 Policy Overview Policy activity references a RuleSet in the workflow.rules file RuleSet class contains a collection of Rules Rules are If-Then-Else expressions that evaluate and operate on workflow members

13 CAG - Overview Child activity executes When(Condition1) CAG executes Until(Condition2) Default execution is a parallel When Executes activity once Until “All children quiescent” Executing children complete and all When conditions == false Conceptually, an activity executes: IF When && !(Until) Child activities

14 DEMO RULES ENGINE

15 Versioning in WF – Where? Workflow Activity Tracking Profile Rules Host and runtime services Exposed as a web service

16 Workflow Versioning Compiled Standard.NET versioning story Strong Names, GAC, etc. What I’m not going to dive into the details of Declarative This is what we call XAML-only workflows Versioning here takes place in the host, when deciding what XAML to grab But wait, my workflows are already running! DynamicUpdate API address how to change these

17 Scaling? Cluster of Workflow Runtimes accessing the same persistence store Workflow Runtime 1 Host* 1 SQL Persistence Service Workflow Runtime 2 Host 2 SQL Persistence Service Workflow Runtime 3 Host 3 SQL Persistence Service Workflow Runtime N Host N SQL Persistence Service * The host could be IIS

18 WF in a SOA WF As Service Implementation WF Orchestrating Services

19 DEMO CALLING WORKFLOWS VIA SERVICES

20 Introduction to Windows Workflow Foundation (WF) Keith Elder Microsoft MVP Blog: http://keithelder.net/blog/ Quicken Loans – http://www.quickenloans.com


Download ppt "Introduction to Windows Workflow Foundation (WF) Keith Elder Microsoft MVP Blog: Quicken Loans –"

Similar presentations


Ads by Google