Wraps an Activity whose execution is initialized by an event. This class cannot be inherited.
Assembly: System.Workflow.Activities (in System.Workflow.Activities.dll)
[<Sealed>] [<ToolboxBitmapAttribute(typeof(EventDrivenActivity), "Resources.EventDriven.png")>] [<ObsoleteAttribute("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")>] type EventDrivenActivity = class inherit SequenceActivity end
Gets the value that indicates whether this instance is in design or run-time mode.(Inherited from DependencyObject.)
Gets or sets a value that indicates whether this instance is enabled for execution and validation.(Inherited from Activity.)
Gets the event activity that drives the change.
Gets or sets the name of this instance. This name must conform to the variable naming convention of the programming language that is being used in the Workflow project.(Inherited from Activity.)
Gets the qualified name of the activity. Qualified activity names are always unique in a workflow instance.(Inherited from Activity.)
Occurs when the activity execution is canceled. (Inherited from Activity.)
Occurs when an exception is raised during the running of the instance.(Inherited from Activity.)
Represents the method that handles the Disposed event of a component.(Inherited from DependencyObject.)
Defines the processing procedure when the subscribed-to event occurs.(Inherited from SequenceActivity.)
This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.
It is a CompositeActivity that is used to handle an event; typically it can be raised from the host or by the runtime in response to a delay timer expiring. is inherited from SequenceActivity; therefore, it is a sequence that has the additional restriction that the first activity should be an IEventActivity.
The first child of an IEventActivity. All subsequent children can be activities of any type. The IEventActivity blocks and waits for the pending occurrence of some events, such as starting a timer or the arrival of a message. When the event occurs, the IEventActivity finishes running and then all subsequent activities are executed.activity must be an activity that inherits from
When the StateMachineWorkflowActivity contains an , the has some restrictions:
The IEventActivity.may contain one, and only one, activity of type
The HandleExternalEventActivity must be the first child activity. An HandleExternalEventActivity cannot be in the event handler for a child activity and cannot be a child to the if the HandleExternalEventActivity is not the first child.
As long as the first activity is the HandleExternalEventActivity, the event handler can contain any activities. If an activity other than HandleExternalEventActivity is contained in , that activity cannot have an event handler.
For example, an activity that supports event handling can be used inside thebut the activity cannot have event handlers attached to itself.
The following code example shows how to use the Simple State Machine.to perform state machine transitions. This code example is part of the SimpleStateMachineWorkflow SDK sample from the StateMachineWorkflow.cs file. For more information, see
Available since 3.0
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.