SPWorkflowManager.CountWorkflows Method (SPWorkflowAssociation)

Returns the number of workflow instances for the specified workflow association.

Namespace:  Microsoft.SharePoint.Workflow
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online


Public Function CountWorkflows ( _
    association As SPWorkflowAssociation _
) As Integer
Dim instance As SPWorkflowManager
Dim association As SPWorkflowAssociation
Dim returnValue As Integer

returnValue = instance.CountWorkflows(association)
public int CountWorkflows(
    SPWorkflowAssociation association


Return Value

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


This method gets the number of workflows associated with the workflow association specified by the association parameter.

See Also


SPWorkflowManager Class

SPWorkflowManager Members

CountWorkflows Overload

Microsoft.SharePoint.Workflow Namespace

Other Resources

Workflows in SharePoint Foundation

Workflow Development for SharePoint Foundation

Workflow Object Model Overview in SharePoint Foundation