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

Inspecting State Machines

Think about the user interface that we want to provide for our bug-tracking service. We wouldn't want to give the user the option to create exceptions. For instance, we wouldn't want to offer a Close This Bug button when the bug is in a state that will not transition to the closed state. Instead, we want the user interface to reflect the current state of the bug and only allow the user to perform legal actions. We can do this with the help of the StateMachineWorkflowInstance class.

StateMachineWorkflowInstance

The StateMachineWorkflowInstance class provides an API for us to manage and query a state machine workflow. As shown in the class diagram in the screenshot below, this API includes properties we can use to fetch the ...

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