SPWorkflowManager.CountWorkflows Method (SPList)

Returns the identifiers of the workflow associations on the list and the count of instances for each association.

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


Public Function CountWorkflows ( _
    list As SPList _
) As Dictionary(Of Guid, Integer)
Dim instance As SPWorkflowManager
Dim list As SPList
Dim returnValue As Dictionary(Of Guid, Integer)

returnValue = instance.CountWorkflows(list)
public Dictionary<Guid, int> CountWorkflows(
    SPList list


Return Value

Type: System.Collections.Generic.Dictionary<Guid, Int32>
A Dictionary object that represents the identifiers of the associations on the list and the values that are the number of running instances for each related association.


This method gets the number of workflows associated with the list specified by the list 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