SPWorkflowManager.CountWorkflowAssociations method

Returns the number of workflow associations, based on the specified workflow template, for the specified site collection.

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

Syntax

'Declaration
Public Function CountWorkflowAssociations ( _
    template As SPWorkflowTemplate, _
    site As SPSite _
) As Integer
'Usage
Dim instance As SPWorkflowManager
Dim template As SPWorkflowTemplate
Dim site As SPSite
Dim returnValue As Integer

returnValue = instance.CountWorkflowAssociations(template, _
    site)
public int CountWorkflowAssociations(
    SPWorkflowTemplate template,
    SPSite site
)

Parameters

  • site
    Type: Microsoft.SharePoint.SPSite

    The site collection for which you want the number of workflow associations based on the workflow template.

Return value

Type: System.Int32
An Integer that represents the number of workflow associations.

Remarks

This method gets the number of workflow associations for the template specified by the template parameter for the collection of websites specified by the site parameter.

See also

Reference

SPWorkflowManager class

SPWorkflowManager members

Microsoft.SharePoint.Workflow namespace

Other resources

Workflows in Windows SharePoint Services

Workflow Development for Windows SharePoint Services

Workflow Object Model in Windows SharePoint Services Overview