1 / 26

Building State Machine Workflows with Windows Workflow Foundation

MID305. Building State Machine Workflows with Windows Workflow Foundation . Ron Jacobs Sr. Program Manager Microsoft. Windows Workflow Foundation. Tooling. VS Designer. VS Debugger. Rehosted Designer. AppFabric / Host.

starbuck
Download Presentation

Building State Machine Workflows with 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. MID305 Building State Machine Workflows with Windows Workflow Foundation Ron Jacobs Sr. Program Manager Microsoft

  2. Windows Workflow Foundation Tooling VS Designer VS Debugger Rehosted Designer AppFabric / Host • Windows Workflow Foundation provides declarative authoring of programs that coordinate work • Activities • Runtime • Tooling Workflow Activity Library WF Runtime Extensions Persistence Tracking …

  3. State Machine “It is a behavior model composed of a finite number of states, transitions between those states, and actions, similar to a flow graph in which one can inspect the way logicruns when certain conditions are met.” Wikipedia – Finite State Machine

  4. States State Transition

  5. States Insert Card Close Authorized? Open

  6. Control Flow Which one should I use? Control React Flowchart Sequence State Machine

  7. State Machine in the real world Proof Of Dispatch (EPOD) Repair Load Order Received Proof Of Collection (EPOC) Proof Of Delivery (EPOD) Delivered Picked Up

  8. Security Door Requirements • Authorize Card Keys • Log Door Open/Close Events • Warn Security When Door is open too long • AuthorizeKey • DoorOpened • DoorClosed

  9. Security Door demo

  10. Seven Steps To State Machine Happiness how to…

  11. Step 1: .NET Platform Update 1 • Microsoft .NET Framework 4 Platform Update 1 – Design-time Package for Visual Studio 2010 SP1 (KB2495593) • Installs the everything and configures Visual Studio. • Microsoft .NET Framework 4 Platform Update 1 (KB2478063) • Contains the runtime files for the platform update. • Use for production environments

  12. Step 2: Hands On Lab • Introduction to State Machine Hands On Lab

  13. Step 3: Target Framework Web Apps / Workflow Services All Others

  14. Step 4: Scenarios

  15. Step 4: States / Transitions • States are destinations where you wait • Door Closed / Door Open • Create an enum or constants to describe your states in code • Transitions are events where you respond • Tip: One Trigger per Transition • Triggers • Card Inserted • Open Timeout • Conditions • Card Authorized

  16. Step 5: Actions • Entry / Exit • Do every time you enter / exit the state • Transition • Do every time the trigger event occurs and the condition is met

  17. Step 6: Tests • Get Microsoft.Activities.UnitTesting (Now via NuGet!) • Create your tests as you build your scenarios • Stub calls to external systems • Learn to love Red / Green / Refactor Unit Tests included in the Introduction to State Machine Hands On Lab

  18. Step 7: Follow • Blogs • appfabric.tv • AppFabric • Ron Jacobs • Twitter • @appfabric • @ronljacobs • Facebook • Appfabric • Ron Jacobs

  19. ATM State Machine demo

  20. Required Slide Speakers, please list the Breakout Sessions, Interactive Discussions, Labs, Demo Stations and Certification Exam that relate to your session. Also indicate when they can find you staffing in the TLC. Related Content • Interactive Sessions • Windows Workflow Foundation (WF) 4.0 in the Real World: Principles for Incorporating WF 4.0 into the Big Enterprise • Hands-on Labs • Introduction to State Machine • Product Demo Stations • Middleware & Integration booth 14

  21. Required Slide Track PMs will supply the content for this slide, which will be inserted during the final scrub. Track Resources • Windows Azure Platform Training Kit • Windows Server AppFabric Training Kit • BizTalk 2010 Developer Training Kit • AppFabric Team Blog • Windows Azure AppFabric on MSDN • Windows Server AppFabric on MSDN

  22. Resources • Connect. Share. Discuss. http://northamerica.msteched.com Learning • Sessions On-Demand & Community • Microsoft Certification & Training Resources www.microsoft.com/teched www.microsoft.com/learning • Resources for IT Professionals • Resources for Developers http://microsoft.com/technet http://microsoft.com/msdn

  23. Complete an evaluation on CommNet and enter to win!

  24. © 2011 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.

More Related