When working with state machine workflow's the SetStateActivity is one of the more important activities to use. The main reason is that is the one used to transition from one state to another. You can actually transition state in a different way as well using the StateMachineWorkflowInstance.SetState() function but the SetStateActivity is by far the most often used.
One of the cool features of the SetStateActivity that may not be immediately obvious is the fact that it doesn't do the state switch immediately. Instead it saved the new target start in an internal property, named NextStateName on the StateMachineExecutionState type to be exact, and only does the state switch when the current EventDrivenActivity or StateInitializationActivity is finished. And just to be clear those are the only two activities where you can use a SetStateActivity.
So the cool part is that you don't need to have the SetStateActivity right at the bottom of the EventDrivenActivity but it can be anywhere in the execution flow. Something that might make the execution logic quite a bit easier.
And the second cool behavior is that you can actually execute multiple SetStateActivity objects with different TargetStateName definitions and only the last one will be executed. Again something that might make the logic quite a bit simple as you can set a default TargetStateName at the beginning of your and make changes to the target as exceptional cases arise.
Both of these behaviors are especially important as the TargetStateName is a meta property, meaning it cannot be changed at runtime but only at design time. So the option of dynamically changing the SetStateActivity doesn't really exist.
Base class for all workflow activities.
23-11-2009 15:15:37 - -80.126.16.139
Provides the transition to a State Activity in a state machine workflow.
23-11-2009 15:28:25 - -80.126.16.139
Provides the transition to a State Activity in a state machine workflow.
23-11-2009 15:28:25 - -80.126.16.139
Represents a state in a State Machine Workflow Activity.
23-11-2009 15:30:00 - -80.126.16.139
Represents a state in a State Machine Workflow Activity.
23-11-2009 15:30:00 - -80.126.16.139
Represents a state in a State Machine Workflow Activity.
23-11-2009 15:30:00 - -80.126.16.139
Provides the transition to a State Activity in a state machine workflow.
23-11-2009 15:28:25 - -80.126.16.139
Represents a state in a State Machine Workflow Activity.
23-11-2009 15:30:00 - -80.126.16.139
Represents a state in a State Machine Workflow Activity.
23-11-2009 15:30:00 - -80.126.16.139
Represents a state in a State Machine Workflow Activity.
23-11-2009 15:30:00 - -80.126.16.139
Provides the transition to a State Activity in a state machine workflow.
23-11-2009 15:28:25 - -80.126.16.139
Provides the transition to a State Activity in a state machine workflow.
23-11-2009 15:28:25 - -80.126.16.139
Provides the transition to a State Activity in a state machine workflow.
23-11-2009 15:28:25 - -80.126.16.139
Wraps an Activity whose execution is initialized by an event.
23-11-2009 15:22:02 - 121.244.168.101
Click to read this topic
23-11-2009 15:30:25 - xiqclvfz-86.161.231.146
Provides the transition to a State Activity in a state machine workflow.