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)

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 Windows SharePoint Services

Workflow Development for Windows SharePoint Services

Workflow Object Model in Windows SharePoint Services Overview