Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

SPWorkflowAssociation.CreateSiteContentTypeAssociation Method

Windows SharePoint Services 3

Creates a workflow association that can then be added to a site content type.

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

public static SPWorkflowAssociation CreateSiteContentTypeAssociation(
	SPWorkflowTemplate baseTemplate,
	string name,
	string strTaskList,
	string strHistoryList
)

Parameters

baseTemplate
Type: Microsoft.SharePoint.Workflow.SPWorkflowTemplate
The workflow template on which to base this workflow association.
name
Type: System.String
The name to give this workflow association.
strTaskList
Type: System.String
The task list on which to create workflow tasks for this workflow association.
strHistoryList
Type: System.String
The list to which to log workflow history events.

Return Value

Type: Microsoft.SharePoint.Workflow.SPWorkflowAssociation
An SPWorkflowAssociation that represents the workflow association.

To associate a workflow template to a list or document library, use the AddWorkflowAssociation method of the SPList object. To associate a workflow with a content type, use the AddWorkflowAssociation method of the SPContentType object. Both of these methods take an SPWorkflowAssociation object and add it to the specified list or content type, respectively. To create the appropriate workflow association, use the CreateListAssociation, CreateListContentTypeAssociation, or CreateSiteContentTypeAssociation method of the SPWorkflowAssociation object itself.

Community Additions

ADD
Show:
© 2015 Microsoft