SPWorkflowAssociation.CreateWebContentTypeAssociation-Methode

Erstellt eine Workflowzuordnung, die dann zu einem Inhaltstyp hinzugefügt werden kann, die auf Websiteebene ausgelegt ist.

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

Syntax

'Declaration
Public Shared Function CreateWebContentTypeAssociation ( _
    baseTemplate As SPWorkflowTemplate, _
    name As String, _
    taskListName As String, _
    historyListName As String _
) As SPWorkflowAssociation
'Usage
Dim baseTemplate As SPWorkflowTemplate
Dim name As String
Dim taskListName As String
Dim historyListName As String
Dim returnValue As SPWorkflowAssociation

returnValue = SPWorkflowAssociation.CreateWebContentTypeAssociation(baseTemplate, _
    name, taskListName, historyListName)
public static SPWorkflowAssociation CreateWebContentTypeAssociation(
    SPWorkflowTemplate baseTemplate,
    string name,
    string taskListName,
    string historyListName
)

Parameter

  • taskListName
    Typ: System.String

    Der Aufgabenliste auf der Workflowaufgaben für diese Workflowzuordnung erstellt.

  • historyListName
    Typ: System.String

    Die Liste der workflowverlaufsereignisse protokolliert.

Rückgabewert

Typ: Microsoft.SharePoint.Workflow.SPWorkflowAssociation
Eine Workflowzuordnung.

Ausnahmen

Ausnahme Bedingung
ArgumentNullException

baseTemplate oder name ist Null .

\endash oder \endash

Die Workflow-Vorlage ist privat und kann nicht erneut verknüpft werden.

\endash oder \endash

Die Workflowvorlage erfordert eine Aufgabenliste und taskListName Null ist.

\endash oder \endash

Die Workflowvorlage erfordert eine Verlaufsliste aus, und historyListName Null ist.

ArgumentException

Der Parameter name enthält nur Leerzeichen oder Tabstopps.

Hinweise

Sie können die Workflowzuordnung, die durch diese Methode zu einem Inhaltstyp auf Standortebene zurückgegeben wird, durch Aufrufen der AddWorkflowAssociation(SPWorkflowAssociation) -Methode eines die Inhaltstypen in die inhaltstypauflistung der Website hinzufügen.

Siehe auch

Referenz

SPWorkflowAssociation Klasse

SPWorkflowAssociation-Member

Microsoft.SharePoint.Workflow-Namespace

ContentTypes