SPWorkflowManager.CountWorkflowAssociations Method
Returns the number of workflow associations, based on the specified workflow template, for the specified site collection.
Namespace: Microsoft.SharePoint.Workflow
Assembly: Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: Yes
Available in SharePoint Online
Syntax
'Declaration
Public Function CountWorkflowAssociations ( _
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.CountWorkflowAssociations(template, _
site)
public int CountWorkflowAssociations(
SPWorkflowTemplate template,
SPSite site
)
Parameters
template
Type: Microsoft.SharePoint.Workflow.SPWorkflowTemplateThe workflow template for which you want the number of associations for this site collection.
site
Type: Microsoft.SharePoint.SPSiteThe site collection for which you want the number of workflow associations based on the workflow template.
Return Value
Type: System.Int32
An Integer that represents the number of workflow associations.
Remarks
This method gets the number of workflow associations for the template specified by the template parameter for the collection of websites specified by the site parameter.
See Also
Reference
Microsoft.SharePoint.Workflow Namespace
Other Resources
Workflows in SharePoint Foundation