Windows Workflow Foundation (7)-sequential workflow and state machine Workflow
Sequential Workflow
MS-help: // Ms. winwf. v1.en/winwf_gettingstarted/html/EA 68a 735 -5A 68-43b4-8ed8-b3bc 9842f 4ba.htm
The sequential workflow style is only input. This type of workflow is suitable for repeated and relatively fixed operations, such as defining a group of activities and letting them go in a fixed order.
A sequential workflow runs from start to end in a fixed order. If the process of a sequential workflow is completely definite, it is not all right. For example, you can useListenActivity (event listening), orParalledIn this way, a strict sequence of events is broken.
For more information about workflow creation, see workflow creation mode.
State Machine Workflow
MS-help: // Ms. winwf. v1.en/winwf_gettingstarted/html/f0b837d0-9d74-41dc-9724-13acbcd 3c 433. htm
In this style, the Creator builds a workflow into a state machine. A workflow is composed of multiple States. One of the statuses is specified as the starting status. Each status can receive a group of specified events. Event triggering will cause status migration. When the State is migrated to the terminated state, the workflow ends. The following table listsWWFActivities related to the state machine in the activity library of the framework.
activity |
Description |
Eventdriven |
this activity is used for States driven by external events. eventdriven the first sub-activity of the activity must be implemented ieventactivity interface. |
setstate |
specifies a migration to another State |
state |
represents a state in the state machine; it may contain other State activities. |
Stateinitialization |
The execution starts as soon as the status enters (unlikeEventdrivenIn this way, you need to wait for external events). It can contain other activities. |
For more information, see workflow creation mode.