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