Condividi tramite


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

  • site
    Type: Microsoft.SharePoint.SPSite

    The 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

SPWorkflowManager Class

SPWorkflowManager Members

Microsoft.SharePoint.Workflow Namespace

Other Resources

Workflows in SharePoint Foundation

Workflow Development for SharePoint Foundation

Workflow Object Model Overview in SharePoint Foundation