This API is now obsolete.
Service activity that implements an operation defined by a Windows Communication Foundation (WCF) service contract.
public ref class ReceiveActivity sealed : System::Workflow::Activities::SequenceActivity, System::Workflow::Activities::IEventActivity, System::Workflow::ComponentModel::IActivityEventListener<System::Workflow::ComponentModel::QueueEventArgs ^>
[System.Drawing.ToolboxBitmap(typeof(System.Workflow.Activities.ReceiveActivity), "Design.Resources.ReceiveActivity.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.ReceiveActivityValidator))] [System.Serializable] public sealed class ReceiveActivity : System.Workflow.Activities.SequenceActivity, System.Workflow.Activities.IEventActivity, System.Workflow.ComponentModel.IActivityEventListener<System.Workflow.ComponentModel.QueueEventArgs>
type ReceiveActivity = class inherit SequenceActivity interface IEventActivity interface IActivityEventListener<QueueEventArgs>
Public NotInheritable Class ReceiveActivity Inherits SequenceActivity Implements IActivityEventListener(Of QueueEventArgs), IEventActivity
This material discusses types and namespaces that are obsolete. For more information, see Deprecated Types in Windows Workflow Foundation 4.5.
The ReceiveActivity activity is used when a workflow implements an operation defined in a WCF service contract. The ReceiveActivity can implement an operation from an already defined service contract or can define the service contract and operation within the workflow itself. The latter is known as a workflow-first contract.
The ReceiveActivity activity supports a set of predefined message exchange patterns. These patterns include:
The client that sends the message does not expect the service to send a response. The contract operation should have a void return type.
Receive request - Send response
After a message is received and processed by the ReceiveActivity activity, a response is sent back to the client. When the contract operation has a void return type, an acknowledgement is sent back to the send activity.
Receive request - Send fault
After a message is received and processed by the ReceiveActivity activity, a response or a fault is sent back to the client.
To ensure that persistence performs properly and does not persist transient messages, make sure that child activities of the ReceiveActivity do not persist by themselves. This can occur if the child activities go idle when a persistence provider was created with
UnloadOnIdle set to
true, for instance.
This activity is part of .NET Framework 3.5. For the equivalent activity in .NET Framework 4, see Receive.
|ReceiveActivity() ReceiveActivity() ReceiveActivity() ReceiveActivity()||
Initializes a new instance of the ReceiveActivity class.
|ReceiveActivity(String) ReceiveActivity(String) ReceiveActivity(String) ReceiveActivity(String)|
|Activities Activities Activities Activities||
Gets the object representing the collection, ActivityCollection, of all child activities.(Inherited from CompositeActivity)
|CanCreateInstance CanCreateInstance CanCreateInstance CanCreateInstance||
Gets or sets whether the operation causes a new workflow service instance to be created.
|CanModifyActivities CanModifyActivities CanModifyActivities CanModifyActivities||
Gets or sets a value which controls whether the individual activities within Activities can be modified.(Inherited from CompositeActivity)
|Context Context Context Context||
Gets the context information for this activity.
|ContextToken ContextToken ContextToken ContextToken||
Represents a token that can be used to specify the context that should be used to correlate the exchange between a ReceiveActivity activity and the client that the activity is communicating with.
|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)
|FaultMessage FaultMessage FaultMessage FaultMessage||
The exception that is returned when a receive activity completes execution.
|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)
|ParameterBindings ParameterBindings ParameterBindings ParameterBindings||
Gets the collection of bindable parameters as found in the service's formal parameter list.
|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)
|ServiceOperationInfo ServiceOperationInfo ServiceOperationInfo ServiceOperationInfo||
Defines the contract and service operation that the ReceiveActivity activity implements.
|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)
|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)
|OperationValidation OperationValidation OperationValidation OperationValidation||
Occurs when a message is received for an operation and validation is required.
|StatusChanged StatusChanged StatusChanged StatusChanged||Activity)|