Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Developing Rules Driven Workflows in Windows Workflow Foundation Jurgen Willis COM318 Program Manager Microsoft Corporation.

Similar presentations


Presentation on theme: "1 Developing Rules Driven Workflows in Windows Workflow Foundation Jurgen Willis COM318 Program Manager Microsoft Corporation."— Presentation transcript:

1 1 Developing Rules Driven Workflows in Windows Workflow Foundation Jurgen Willis COM318 Program Manager Microsoft Corporation

2 2 Agenda Why Rules? Activity Conditions + Dynamic Update Conditioned Activity Group Policy

3 3 Windows Workflow Foundation Single workflow technology for Microsoft products, partners and customers A framework to build on – not a server or application Key features Enables long running workflows in any application or server Extensible activity framework Unified model for human and system workflow scenarios Visual designer for graphical and code-based authoring Availability Availability Exposed via WinFX – powers Office “12” workflow Extensible framework and tools for building workflow into Windows applications

4 4 Windows Workflow Foundation Key Concepts Host Process Windows Workflow Foundation Runtime Engine A Workflow An Activity Runtime Services Base Activity Library Custom Activity Library Visual Designer 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

5 5 Why Rules? Modeling Power Approachability Ease of Change

6 6 Model-driven development Rules and Application Development Forms Data Applicationlogic Rules and policies Applicationcode Workflow model Services

7 7 Rules and Workflow Policy applied to validate order Condition determines how to handle errors Rules determine order routing

8 8 Terminology Condition Expression that evaluates to True or False Rule Modeled as: IF IF THEN THEN ELSE ELSE RuleSet Collection of Rules with a set of execution semantics

9 9 Workflow Rules Conditions on activities If-ElseWhileReplicator Conditioned Activity Group (CAG) Policy activity Contains and executes a RuleSet RuleSet execution provides priority-based, forward-chaining semantics

10 10 Rule Conditions

11 11 Dynamic Update Add / remove activities Modify rule conditions on running workflow instances Performed from code- beside or the host Can be disabled for a workflow instance

12 12 Dynamic Update

13 13 Conditioned Activity Group (CAG) Flexible, rule-driven activity execution Modeling of activity sets with numerous sequencing permutations Motivation Stage-Gate pattern Collaborative tasks Scenarios

14 14 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

15 15 CAG - Overview Reevaluation When immediate child moves to completed state Define custom Until condition to short-circuit CAG execution No new activities executed Blocked activities cancelled

16 16 Conditioned Activity Group

17 17 Policy Separation of business logic from application sequencing Declarative statements of business intent Execution semantics to support rich sets of business logic Motivation Scenarios Order validation Warranty claims management Discount calculation

18 18 What about the BizTalk BRE? BizTalk Business Rules Engine The next major version of BizTalk (post-BizTalk 2006) will be built on Windows Workflow Foundation Windows Workflow Foundation will provide the core rules engine evaluator and developer tools BizTalk will provide premium tooling and server infrastructure, e.g.: Business analyst tools RuleSet storage and management RuleSet analysis

19 19 Policy Overview “Policy” activity used as base type for custom activity RuleSet class contains a collection of Rules Rules are If-Then-Else expressions that evaluate and operate on activity properties Expressions are CodeDom based Priority value can be used to order rule evaluation

20 20 Policy

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

22 22 RuleSet Chaining Chaining Mechanisms Implicit based on property usage Explicit using Update statement “Partially explicit” using method attributes Additional Points Maximum execution count property Halt statement

23 23 Policy Extensibility

24 24 Summary Integrated workflow and rules capability Flexible forward chaining rules engine Rules + dynamic update => flexible workflow definition and control

25 25 Workflow Sessions Extending Workflow Capabilities With Custom Activities (COM328) Wed 3:15 – 150/151 Hall E Developing Rules-Driven Workflows (COM318) Wed 5:00 – 152/153 Hall F Developing Event-Driven State Machine Workflows (COM322) Thurs 2:15 – 515 AB Hosting and Communications in Workflow Scenarios (COM327) Thurs 5:15 – 402 AB Workflow + Messaging + Services - Developing Dist’d Apps (COM325) Thurs 3:45 – 150/151 Hall E Host Process Windows Workflow Foundation Runtime Engine Runtime Services Base Activity Library My Custom Activity Library State Machine Workflows Rules-Driven Activities Communication Activities My Workflows Introduction to Workflow in Windows Applications (COM210) Wed 1:45 – 150/151 Hall E Windows Communication Foundation Windows SharePoint Services: Developing Custom Workflows (OFF415) Thurs 11:30 – 408 AB Hands-on Labs!

26 26 More Community Resources At PDC 12 Labs: COMHOL01-12 “Ask The Experts” tables – 4 tables and lots of experts COM Track Lounge Get your copy of the “Presenting Windows Workflow Foundation” book Keep your voucher from today’s keynote and redeem at the PDC bookstore After PDC If you missed a related session, watch it on the DVD MSDN dev center: MSDN dev center: http://msdn.microsoft.com/workflow Windows Workflow Foundation community site http://www.windowsworkflow.net Channel 9 tag: http://channel9.msdn.com/tags/workflow

27 27 © 2005 Microsoft Corporation. All rights reserved. This presentation is for informational purposes only. Microsoft makes no warranties, express or implied, in this summary.


Download ppt "1 Developing Rules Driven Workflows in Windows Workflow Foundation Jurgen Willis COM318 Program Manager Microsoft Corporation."

Similar presentations


Ads by Google