Creates a workflow association that can then be added to a list.
Public Shared Function CreateListAssociation ( _ baseTemplate As SPWorkflowTemplate, _ name As String, _ taskList As SPList, _ historyList As SPList _ ) As SPWorkflowAssociation
Dim baseTemplate As SPWorkflowTemplate Dim name As String Dim taskList As SPList Dim historyList As SPList Dim returnValue As SPWorkflowAssociation returnValue = SPWorkflowAssociation.CreateListAssociation(baseTemplate, _ name, taskList, historyList)
public static SPWorkflowAssociation CreateListAssociation( SPWorkflowTemplate baseTemplate, string name, SPList taskList, SPList historyList )
The argument passed to the baseTemplate parameter is nullNothingnullptra null reference (Nothing in Visual Basic); or the argument to the name parameter is nullNothingnullptra null reference (Nothing in Visual Basic); or the template requires a task list (the default) and the argument to the taskList parameter is nullNothingnullptra null reference (Nothing in Visual Basic); or the template requires a history list (the default) and the argument to the historyList parameter is nullNothingnullptra null reference (Nothing in Visual Basic).
The string passed to the name parameter contains only spaces or tabs.
To associate a workflow template with a list or document library, use the AddWorkflowAssociation method of the SPList object. This method takes an SPWorkflowAssociation object and adds it to the specified list.