Edit

Share via


Activity.GetActivityByName Method

Definition

Returns the instance of the Activity whose name is requested from the set of all activities running under the root activity of this instance that is within the workflow.

Overloads

GetActivityByName(String)

Returns the instance of the Activity whose name is requested from the set of all activities running under the root activity of this instance, which is within the workflow.

GetActivityByName(String, Boolean)

Returns the instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

Remarks

Calling GetActivityByName from within the constructor of a custom activity is not supported and can have unexpected results.

GetActivityByName(String)

Returns the instance of the Activity whose name is requested from the set of all activities running under the root activity of this instance, which is within the workflow.

public:
 System::Workflow::ComponentModel::Activity ^ GetActivityByName(System::String ^ activityQualifiedName);
public System.Workflow.ComponentModel.Activity GetActivityByName (string activityQualifiedName);
member this.GetActivityByName : string -> System.Workflow.ComponentModel.Activity
Public Function GetActivityByName (activityQualifiedName As String) As Activity

Parameters

activityQualifiedName
String

The name of the Activity to search for.

Returns

The instance of the Activity whose name is requested from the set of all activities running under the root activity of this instance.

Exceptions

activityQualifiedID is a null reference (Nothing in Visual Basic).

Remarks

Calling GetActivityByName from within the constructor of a custom activity is not supported and can have unexpected results.

Applies to

GetActivityByName(String, Boolean)

Returns the instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

public:
 System::Workflow::ComponentModel::Activity ^ GetActivityByName(System::String ^ activityQualifiedName, bool withinThisActivityOnly);
public System.Workflow.ComponentModel.Activity GetActivityByName (string activityQualifiedName, bool withinThisActivityOnly);
member this.GetActivityByName : string * bool -> System.Workflow.ComponentModel.Activity
Public Function GetActivityByName (activityQualifiedName As String, withinThisActivityOnly As Boolean) As Activity

Parameters

activityQualifiedName
String

The name of the Activity to search for.

withinThisActivityOnly
Boolean

The value that indicates whether to limit the search to activities contained within this instance.

Returns

The instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

Exceptions

activityQualifiedID is a null reference (Nothing in Visual Basic).

Remarks

Returns the instance of the Activity whose name is requested from the set of all activities under the root the Activity of this instance if the second parameter is false and under the current Activity if the second parameter is true.

Calling GetActivityByName from within the constructor of a custom activity is not supported and can have unexpected results.

Applies to