Partager via


WorkflowAssociation.Enabled - Propriété

Gets or sets a value that specifies whether new workflow instances will be allowed for this workflow association

Espace de noms :  Microsoft.SharePoint.Client.Workflow
Assemblys :   Microsoft.SharePoint.Client.Silverlight (dans Microsoft.SharePoint.Client.Silverlight.dll);  Microsoft.SharePoint.Client.Phone (dans Microsoft.SharePoint.Client.Phone.dll)  Microsoft.SharePoint.Client (dans Microsoft.SharePoint.Client.dll)

Syntaxe

'Déclaration
Public Property Enabled As Boolean
    Get
    Set
'Utilisation
Dim instance As WorkflowAssociation
Dim value As Boolean

value = instance.Enabled

instance.Enabled = value
public bool Enabled { get; set; }

Valeur de propriété

Type : System.Boolean
Returns Booleantrue if new workflow instance is allowed for this workflow association; otherwise, returns false. The default value is

Exceptions

Exception Condition
[System.InvalidOperationException]

The value is true and this workflow association is based on a non-declarative workflow template that has been deactivated. Error code: -1.

Remarques

Setting the Enabled property to false causes the workflow association not to be displayed in the user interface. This prevents users from starting new instances of the workflow. In addition, workflows that are configured to start automatically are no longer able to start automatically.

Setting the Enabled property to true does not change the values for the AllowManual, AutoStartCreate, or AutoStartChange properties. However, the option to start the workflow is again available in the user interface, and workflows that are configured to start automatically will start automatically.

Voir aussi

Référence

WorkflowAssociation classe

WorkflowAssociation - Membres

Microsoft.SharePoint.Client.Workflow - Espace de noms