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
Syntax
'Declaration
Public Function CountWorkflows ( _
association As SPWorkflowAssociation _
) As Integer
'Usage
Dim instance As SPWorkflowManager
Dim association As SPWorkflowAssociation
Dim returnValue As Integer
returnValue = instance.CountWorkflows(association)
public int CountWorkflows(
SPWorkflowAssociation association
)
Parameters
association
Type: Microsoft.SharePoint.Workflow.SPWorkflowAssociationThe workflow association for which you want the number of workflow instances.
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 workflow association specified by the association parameter.
See Also
Reference
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation