Compartilhar via


SPContentType.AddWorkflowAssociation method

NOTE: This API is now obsolete.

Use o método de.Add de WorkflowAssociations.

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

Syntax

'Declaração
<ObsoleteAttribute("Use WorkflowAssociations.Add() instead")> _
Public Function AddWorkflowAssociation ( _
    workflowAssociation As SPWorkflowAssociation _
) As SPWorkflowAssociation
'Uso
Dim instance As SPContentType
Dim workflowAssociation As SPWorkflowAssociation
Dim returnValue As SPWorkflowAssociation

returnValue = instance.AddWorkflowAssociation(workflowAssociation)
[ObsoleteAttribute("Use WorkflowAssociations.Add() instead")]
public SPWorkflowAssociation AddWorkflowAssociation(
    SPWorkflowAssociation workflowAssociation
)

Parâmetros

Valor retornado

Type: Microsoft.SharePoint.Workflow.SPWorkflowAssociation
A associação de fluxo de trabalho.

Exceptions

Exception Condition
ArgumentException

O objeto SPWorkflowAssociation já existe na coleção, ou se baseia em um modelo de fluxo de trabalho inadequado.

ArgumentNullException

O objeto SPWorkflowAssociation é a null reference (Nothing in Visual Basic).

Ver também

Referência

SPContentType class

SPContentType members

Microsoft.SharePoint namespace

WorkflowAssociations