SPWorkflowAssociationCollection.AddCore method

Adds the specified workflow association to the collection.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)

Syntax

'Declaration
<SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.ProtectedMethod)> _
Protected Sub AddCore ( _
    wa As SPWorkflowAssociation, _
    id As Guid, _
    list As SPList, _
    forceUtilityListCreation As Boolean _
)
'Usage
Dim wa As SPWorkflowAssociation
Dim id As Guid
Dim list As SPList
Dim forceUtilityListCreation As Boolean

Me.AddCore(wa, id, list, forceUtilityListCreation)
[SubsetCallableExcludeMemberAttribute(SubsetCallableExcludeMemberType.ProtectedMethod)]
protected void AddCore(
    SPWorkflowAssociation wa,
    Guid id,
    SPList list,
    bool forceUtilityListCreation
)

Parameters

  • id
    Type: System.Guid

    The globally unique identifier (GUID) of the workflow association to be added.

  • forceUtilityListCreation
    Type: System.Boolean

    true to forcibly create the tasks list and history list if they do not exist; otherwise, false.

Remarks

This method adds the specified workflow association to the database to provide the core implementation for adding a workflow association.

If the wa parameter is null , the workflow can be started manually, and the user does not have permissions, or the workflow association is declarative but user-defined workflow is not enabled, a ArgumentException is thrown.

See also

Reference

SPWorkflowAssociationCollection class

SPWorkflowAssociationCollection members

Microsoft.SharePoint.Workflow namespace