O'Reilly logo

Programming Windows Workflow Foundation: Practical WF Techniques and Examples using XAML and C# by K. Scott Allen

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hierarchical State Machines

Our first state machine was relatively simple, but it did represent the basic design for conventional state machines. Sometimes, however, this straightforward approach can be difficult to manage. Imagine if the workflow for our bug-tracking software required us to allow a user to close or assign a bug — regardless of the current state of the bug. We'd have to add event-driven activities for the assigned and closed events to every state in the workflow (except the completed state). This might be fine when we only have a handful of states, but can become tedious and error prone as the state machine grows.

Fortunately, there is an easier solution. A hierarchical state machine allows us to nest child states inside parent ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required