Partager via


ApprovalActivity Class

An activity that is used to obtain approval for a request.

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

Usage

'Usage
Dim instance As ApprovalActivity

Syntax

'Declaration
<ToolboxItemAttribute(GetType(ActivityToolboxItem))> _
<DesignerAttribute(GetType(ActivityDesigner), GetType(IDesigner))> _
Public NotInheritable Class ApprovalActivity
    Inherits SequenceActivity
[ToolboxItemAttribute(typeof(ActivityToolboxItem))] 
[DesignerAttribute(typeof(ActivityDesigner), typeof(IDesigner))] 
public sealed class ApprovalActivity : SequenceActivity
[ToolboxItemAttribute(typeof(ActivityToolboxItem))] 
[DesignerAttribute(typeof(ActivityDesigner), typeof(IDesigner))] 
public ref class ApprovalActivity sealed : public SequenceActivity
/** @attribute ToolboxItemAttribute(System.Workflow.ComponentModel.Design.ActivityToolboxItem) */ 
/** @attribute DesignerAttribute(System.Workflow.ComponentModel.Design.ActivityDesigner, System.ComponentModel.Design.IDesigner) */ 
public final class ApprovalActivity extends SequenceActivity
ToolboxItemAttribute(System.Workflow.ComponentModel.Design.ActivityToolboxItem) 
DesignerAttribute(System.Workflow.ComponentModel.Design.ActivityDesigner, System.ComponentModel.Design.IDesigner) 
public final class ApprovalActivity extends SequenceActivity

Remarks

The ApprovalActivity activity can be used in the authorization phase to obtain an approval for a submitted Request. (For more information, see Request Processing). The activity creates an Approval instance that is associated with the approval activity. If a valid approver rejects a request before the ApprovalActivity is completed, the approval immediately fails, and the workflow and associated request are terminated.

After an Approval instance is created, the approval activity continues only until the minimum number of approval responses is met, as specified by Threshold. After the threshold is met, the ApprovalActivity recomputes the list of approvers and verifies that each ApprovalResponse is valid.

When the ApprovalActivity activity starts, if any approvers that are defined in the Approvers field do not exist, or a parameter lookup is not valid (based on the workflow lookup grammar), an exception is thrown, and the workflow is terminated. If the timeout threshold is reached and no valid escalation is defined, the workflow terminates with a 'Terminated' status and the associated request is denied.

If the requester is also a computer approver, the activity automatically creates an ApprovalResponse instance on behalf of the requester. This behavior enables approval activities that have thresholds of 1 to auto-approve themselves.

Inheritance Hierarchy

System.Object
   System.Workflow.ComponentModel.DependencyObject
     System.Workflow.ComponentModel.Activity
       System.Workflow.ComponentModel.CompositeActivity
         System.Workflow.Activities.SequenceActivity
          Microsoft.ResourceManagement.Workflow.Activities.ApprovalActivity

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

See Also

Reference

ApprovalActivity Members
Microsoft.ResourceManagement.Workflow.Activities Namespace
Microsoft.ResourceManagement.Workflow.Activities
Approvers

Other Resources

ApprovalResponse
Approval