Event Activity Driven
Event Activity Driven
Event Activity Driven
This API is now obsolete.
Wraps an Activity whose execution is initialized by an event. This class cannot be inherited.
public ref class EventDrivenActivity sealed : System::Workflow::Activities::SequenceActivity
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.EventDrivenActivity), "Resources.EventDriven.png")] [System.Obsolete("The System.Workflow.* types are deprecated. Instead, please use the new types from System.Activities.*")] [System.Workflow.ComponentModel.Compiler.ActivityValidator(typeof(System.Workflow.Activities.EventDrivenValidator))] public sealed class EventDrivenActivity : System.Workflow.Activities.SequenceActivity
type EventDrivenActivity = class inherit SequenceActivity
Public NotInheritable Class EventDrivenActivity Inherits SequenceActivity
The following code example shows how to use the EventDrivenActivity to perform state machine transitions. This code example is part of the SimpleStateMachineWorkflow SDK sample from the StateMachineWorkflow.cs file. For more information, see Simple State Machine.
this.state1Delay = new System.Workflow.Activities.DelayActivity();
Me.state1Delay = New System.Workflow.Activities.DelayActivity
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. EventDrivenActivity is inherited from SequenceActivity; therefore, it is a sequence that has the additional restriction that the first activity should be an IEventActivity.
The EventDrivenActivity is a CompositeActivity, which means the EventDrivenActivity can contain other activities. The EventDrivenActivity is similar to the SequenceActivity activity, with some additional characteristics.
The first child of an EventDrivenActivity activity must be an activity that inherits from 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.
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 EventDrivenActivity 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 EventDrivenActivity, that activity cannot have an event handler.
For example, an activity that supports event handling can be used inside the EventDrivenActivity but the activity cannot have event handlers attached to itself.
|EventDrivenActivity() EventDrivenActivity() EventDrivenActivity() EventDrivenActivity()||
Initializes a new instance of the EventDrivenActivity class.
|EventDrivenActivity(String) EventDrivenActivity(String) EventDrivenActivity(String) EventDrivenActivity(String)||
Initializes a new instance of the EventDrivenActivity class using the name of the activity.
|Activities Activities Activities Activities||
Gets the object representing the collection, ActivityCollection, of all child activities.(Inherited from CompositeActivity)
|CanModifyActivities CanModifyActivities CanModifyActivities CanModifyActivities||
Gets or sets a value which controls whether the individual activities within Activities can be modified.(Inherited from CompositeActivity)
|Description Description Description Description||
Gets or sets the user-defined description of the Activity.(Inherited from Activity)
|DesignMode DesignMode DesignMode DesignMode||
Gets the value that indicates whether this instance is in design or run-time mode.(Inherited from DependencyObject)
|Enabled Enabled Enabled Enabled||
Gets or sets a value that indicates whether this instance is enabled for execution and validation.(Inherited from Activity)
|EnabledActivities EnabledActivities EnabledActivities EnabledActivities||
Gets the read-only collection that represents the subset of Activities that are enabled.(Inherited from CompositeActivity)
|EventActivity EventActivity EventActivity EventActivity||
Gets the event activity that drives the change.
|ExecutionResult ExecutionResult ExecutionResult ExecutionResult||
Gets the ActivityExecutionResult of the last attempt to run this instance.(Inherited from Activity)
|ExecutionStatus ExecutionStatus ExecutionStatus ExecutionStatus||
Gets the current ActivityExecutionStatus of this instance.(Inherited from Activity)
|IsDynamicActivity IsDynamicActivity IsDynamicActivity IsDynamicActivity||
Gets information about whether the activity is executing within the default ActivityExecutionContext of the workflow instance.(Inherited from Activity)
|Name Name Name Name||
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)
|Parent Parent Parent Parent||Activity)|
|ParentDependencyObject ParentDependencyObject ParentDependencyObject ParentDependencyObject||DependencyObject)|
|QualifiedName QualifiedName QualifiedName QualifiedName||
Gets the qualified name of the activity. Qualified activity names are always unique in a workflow instance.(Inherited from Activity)
|Site Site Site Site||DependencyObject)|
|UserData UserData UserData UserData||
Gets an IDictionary that associates custom data with this class instance.(Inherited from DependencyObject)
|WorkflowInstanceId WorkflowInstanceId WorkflowInstanceId WorkflowInstanceId||
Gets the Guid associated with the instance.(Inherited from Activity)
Explicit Interface Implementations
|Canceling Canceling Canceling Canceling||
Occurs when the activity execution is canceled.(Inherited from Activity)
|Closed Closed Closed Closed||
Occurs when an Activity has completed execution.(Inherited from Activity)
|Compensating Compensating Compensating Compensating||
Occurs when running a compensation method on the Activity.(Inherited from Activity)
|Executing Executing Executing Executing||
Occurs when the Activity is run.(Inherited from Activity)
|Faulting Faulting Faulting Faulting||
Occurs when an exception is raised during the running of the instance.(Inherited from Activity)
|IComponent.Disposed IComponent.Disposed IComponent.Disposed IComponent.Disposed||
Represents the method that handles the Disposed event of a component.(Inherited from DependencyObject)
|StatusChanged StatusChanged StatusChanged StatusChanged||Activity)|