Microsoft released the first Community Technology preview version of The State Machine Based on wf4. You can download it from codeplex, including an installation file, a user guide, and source code. You can read the User Guide directly. If you don't want to read it, read this article.
1. Install
. NET Framework 4 and Visual Studio 2010 are required. After installation, you can see that the state machine is classified as follows in the toolbox:
2. Use
I provide a panorama built using the wf4 state machine ctp1, which basically contains all the features of this version. As follows:
2. 1. The state of a state machine can contain multiple sub-states. The connections between states are called transition. transition can be used to set trigger, conditon, and action.
2. Self-transition is supported, and the status can return to itself for loop.
2. 3. Multiple finalstates can be terminated.
2.4.state: the trigger and conditon are both separated. The trigger and Conditon of the State are separated by the shared condition, and statemachine can be placed in the action to implement the subflow.
2. 5. multiple points of input and output in each State.
. You can use XAML or code to create a State Machine workflow. For code examples, see the examples in user guide.
. Query of the current execution status and history status is not supported currently.
. The jump between States cannot be controlled on the program.
Let's briefly introduce these.