This API is now obsolete.
Runs a set of child activities at the same time. This class cannot be inherited.
public ref class ParallelActivity sealed : System::Workflow::ComponentModel::CompositeActivity, System::Workflow::ComponentModel::IActivityEventListener<System::Workflow::ComponentModel::ActivityExecutionStatusChangedEventArgs ^>
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.ParallelActivity), "Resources.Parallel.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.ParallelValidator))] [System.Workflow.Runtime.DebugEngine.WorkflowDebuggerStepping(System.Workflow.Runtime.DebugEngine.WorkflowDebuggerSteppingOption.Concurrent)] public sealed class ParallelActivity : System.Workflow.ComponentModel.CompositeActivity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.ActivityExecutionStatusChangedEventArgs>
type ParallelActivity = class inherit CompositeActivity interface IActivityEventListener<ActivityExecutionStatusChangedEventArgs>
Public NotInheritable Class ParallelActivity Inherits CompositeActivity Implements IActivityEventListener(Of ActivityExecutionStatusChangedEventArgs)
The following code example shows how to create a new instance of the ParallelActivity class, add the ParallelActivity class to the WhileActivity class, and add two SequenceActivity classes to the ParallelActivity class. This code example is part of the WhileAndParallel SDK sample from the WhileAndParallelWorkflow.Designer.cs file. For more information, see Using While and Parallel.
workflowRuntime.WorkflowLoaded += OnWorkflowLoad;
AddHandler currentWorkflowRuntime.WorkflowLoaded, AddressOf OnWorkflowLoaded
This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.
The order in which child activities are run is non-deterministic.
The ParallelActivity is a CompositeActivity, which means the ParallelActivity can contain other activities. The SequenceActivity activity is the only activity that can be the child of a ParallelActivity.
Only one activity can run at a time.
The ParallelActivity only finishes when all children are complete.
The ParallelActivity is especially useful when there are one or more blocking activities, such as the DelayActivity activity, in one or more of the branches. In this scenario, the ParallelActivity actually switches to a different branch when the DelayActivity is blocked. If there are no blocking activities in any one of the ParallelActivity branches then the activity uses a non-deterministic sequence.
|ParallelActivity() ParallelActivity() ParallelActivity() ParallelActivity()||
Initializes a new instance of the ParallelActivity class.
|ParallelActivity(String) ParallelActivity(String) ParallelActivity(String) ParallelActivity(String)||
Initializes a new instance of the ParallelActivity class using the name of the 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)|
|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)
|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)