Partager via


EnumerateResourcesActivity Class

An activity that queries for resources in the FIM Service database and provides the resulting set to child activities.

Namespace: Microsoft.ResourceManagement.Workflow.Activities
Assembly: Microsoft.ResourceManagement (in Microsoft.ResourceManagement.dll)

Usage

'Usage
Dim instance As EnumerateResourcesActivity

Syntax

'Declaration
Public NotInheritable Class EnumerateResourcesActivity
    Inherits CompositeActivity
public sealed class EnumerateResourcesActivity : CompositeActivity
public ref class EnumerateResourcesActivity sealed : public CompositeActivity
public final class EnumerateResourcesActivity extends CompositeActivity
public final class EnumerateResourcesActivity extends CompositeActivity

Remarks

Sample usage:

  1. Set the ActorId property of the activity.

  2. Set the XPathFilter property to specify the FIM XPath query to use in the enumeration. For more information, see XPath Filter Language.

  3. Set the PageSize property.

  4. Set the Selection property to specify which attributes to retrieve for the results. The attributes that are common to all resources (those that are attributes of the base Resource object type in the FIM schema) are always returned.

  5. [Optional] Set the SortingAttributes property to specify the sorting order of the results.

  6. Bind a child activity to the EnumerateResourcesActivity activity to access the resources that the enumeration returns.

    The activity evaluatedQueryResult is bound to a declared instance of the EnumerateResourcesActivity, as a child activity, in the following example. The following example assumes a code activity evaluateQueryResult was previously declared.

    this.evaluateQueryResult = new System.Workflow.Activities.CodeActivity();
    this.enumerateResourcesActivity1.Activities.Add(this.evaluateQueryResult);
    
  7. Access the results from within the code activity that is bound to the EnumerateResourcesActivity.

    The following example returns the current item from the query results.

    ResourceType result = EnumerateResourcesActivity.GetCurrentIterationItem((CodeActivity)sender) as ResourceType;
    

Inheritance Hierarchy

System.Object
   System.Workflow.ComponentModel.DependencyObject
     System.Workflow.ComponentModel.Activity
       System.Workflow.ComponentModel.CompositeActivity
        Microsoft.ResourceManagement.Workflow.Activities.EnumerateResourcesActivity

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003 , Windows Server 2008, and Windows 2000

Target Platforms

Change History

See Also

Reference

EnumerateResourcesActivity Members
Microsoft.ResourceManagement.Workflow.Activities Namespace
Microsoft.ResourceManagement.Workflow.Activities

Other Resources

Custom Activities and Workflows