This topic has not yet been rated - Rate this topic

SPWorkflowAssociation.Enabled Property

Gets or sets a value that indicates whether the workflow association is enabled.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
[ClientCallableAttribute]
public bool Enabled { get; set; }

Property Value

Type: System.Boolean
true if it is enabled; otherwise, false.
Exception Condition
InvalidOperationException

The corresponding workflow feature is deactivated or the workflow is not deployed as part of a feature.

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.

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ