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

Syntax

'Declaration
Public Function CountWorkflows ( _
    list As SPList _
) As Dictionary(Of Guid, Integer)
'Usage
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
)

Parameters

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.

Remarks

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

See Also

Reference

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