Share via


SPWorkflowAssociation.SetTaskList Method

Specifies the task list on which to create workflow tasks for this workflow association.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online

Syntax

'Declaration
Public Sub SetTaskList ( _
    list As SPList _
)
'Usage
Dim instance As SPWorkflowAssociation
Dim list As SPList

instance.SetTaskList(list)
public void SetTaskList(
    SPList list
)

Parameters

Exceptions

Exception Condition
ArgumentNullException

The list parameter is null .

ArgumentException

The template of the list is not SPListTemplateType.Tasks

- or -

The task list and the history list of the association are not in the same web.

Remarks

If the workflow template requires no task list, this method does nothing and returns; otherwise, this method sets the task list on which to create workflow tasks for this workflow association.

See Also

Reference

SPWorkflowAssociation Class

SPWorkflowAssociation Members

Microsoft.SharePoint.Workflow Namespace

Other Resources

Workflows in SharePoint Foundation

Workflow Development for SharePoint Foundation

Workflow Object Model Overview in SharePoint Foundation