SPList.AddWorkflowAssociation - Méthode
Remarque : cette API est désormais obsolète.
Adds a workflow association to the list.
Espace de noms : Microsoft.SharePoint
Assembly : Microsoft.SharePoint (dans Microsoft.SharePoint.dll)
Syntaxe
'Déclaration
<ObsoleteAttribute("Use WorkflowAssociations.Add() instead")> _
Public Function AddWorkflowAssociation ( _
workflowAssociation As SPWorkflowAssociation _
) As SPWorkflowAssociation
'Utilisation
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
)
Paramètres
workflowAssociation
Type : Microsoft.SharePoint.Workflow.SPWorkflowAssociationAn SPWorkflowAssociation object that represents the workflow.
Valeur renvoyée
Type : Microsoft.SharePoint.Workflow.SPWorkflowAssociation
The workflow association that was added.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The argument passed to the workflowAssociation parameter is une référence Null (Rien dans Visual Basic). |
ArgumentException | The IsDeclarative property on the workflow association is true, but user-defined workflows are not enabled for this Web application. For more information, see the UserDefinedWorkflowsEnabled property. The workflow association references a task list or a history list that is not on the same Web site as the list to which the workflow association is added. The workflow association is not valid—for example, if the Name property is une référence Null (Rien dans Visual Basic). |