Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Section #1. State Workflow Example

Section #1. State Workflow Example

Another workflow pattern is modeled by the StateMachineWorkflowActivity class. Control is outside of the workflow itself. Human beings or machines decide what action is executed by the workflow next. The workflow itself restricts the choices available. The result of each possible choice is represented by a state of the workflow. The workflow has one initial, and one end state.

To illustrate this pattern, we will build a trivial insurance claim evaluation system. Each claim can be in one of four states: Created, Gathering Information, Under Evaluation, or Processed. The initial state is Created. A claim can go from the Created state to the Gathering Information state. From the Gathering Information state it can go to the Under Evaluation state. From that state it can either go back to the Gathering Information state or go to the final Processed state. The only information we have about the claim is the name of the person filing the claim and the amount of the claim. We will use a Windows Forms application as the workflow host.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint