SPWorkflowManager.CountWorkflows method (SPWorkflowTemplate, SPSite)

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

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

Syntax

'Declaration
Public Function CountWorkflows ( _
    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.CountWorkflows(template, _
    site)
public int CountWorkflows(
    SPWorkflowTemplate template,
    SPSite site
)

Parameters

Return value

Type: System.Int32
A 32-bit integer that represents the number of workflow associations.

Remarks

This method gets the number of workflows associated with the template specified by the template parameter for the collection of websites specified by the site parameter.

See also

Reference

SPWorkflowManager class

SPWorkflowManager members

CountWorkflows overload

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