SPList.AddWorkflowAssociation-Methode
HINWEIS: Diese API ist veraltet.
Eine Workflowzuordnung der Liste hinzugefügt werden.
Namespace: Microsoft.SharePoint
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Syntax
'Declaration
<ObsoleteAttribute("Use WorkflowAssociations.Add() instead")> _
Public Function AddWorkflowAssociation ( _
workflowAssociation As SPWorkflowAssociation _
) As SPWorkflowAssociation
'Usage
Dim instance As SPList
Dim workflowAssociation As SPWorkflowAssociation
Dim returnValue As SPWorkflowAssociation
returnValue = instance.AddWorkflowAssociation(workflowAssociation)
[ObsoleteAttribute("Use WorkflowAssociations.Add() instead")]
public SPWorkflowAssociation AddWorkflowAssociation(
SPWorkflowAssociation workflowAssociation
)
Parameter
workflowAssociation
Typ: Microsoft.SharePoint.Workflow.SPWorkflowAssociationEin SPWorkflowAssociation -Objekt, das den Workflow enthält.
Rückgabewert
Typ: Microsoft.SharePoint.Workflow.SPWorkflowAssociation
Eine Workflowzuordnung, die hinzugefügt wurde.
Ausnahmen
Ausnahme | Bedingung |
---|---|
ArgumentNullException | Das an den workflowAssociation -Parameter übergebene Argument ist ein Nullverweis (Nothing in Visual Basic). |
ArgumentException | Die IsDeclarative -Eigenschaft der Workflowzuordnung ist true, aber benutzerdefinierte Workflows für diese Webanwendung nicht aktiviert sind. Weitere Informationen finden Sie unter der UserDefinedWorkflowsEnabled -Eigenschaft. Die Workflowzuordnung verweist auf eine Aufgabenliste oder eine Verlaufsliste aus, die nicht auf derselben Website wie die Liste die Workflowzuordnung hinzugefügt wird. Die Workflowzuordnung ist ungültig – beispielsweise, wenn die Name -Eigenschaft ein Nullverweis (Nothing in Visual Basic). |