Share via


IPSWorkflowService.GetEventSubscriptionCount Method

Gets the total number of subscriptions for the specified workflow instance, event name, and correlation identifier combination.

Namespace:  Microsoft.Office.Project.Server.Library
Assembly:  Microsoft.Office.Project.Server.Library (in Microsoft.Office.Project.Server.Library.dll)

Syntax

'Declaration
Function GetEventSubscriptionCount ( _
    workflowContext As ProjectWorkflowContext, _
    instanceUid As Guid, _
    eventName As String, _
    correlationId As Guid _
) As Integer
'Usage
Dim instance As IPSWorkflowService
Dim workflowContext As ProjectWorkflowContext
Dim instanceUid As Guid
Dim eventName As String
Dim correlationId As Guid
Dim returnValue As Integer

returnValue = instance.GetEventSubscriptionCount(workflowContext, _
    instanceUid, eventName, correlationId)
int GetEventSubscriptionCount(
    ProjectWorkflowContext workflowContext,
    Guid instanceUid,
    string eventName,
    Guid correlationId
)

Parameters

  • instanceUid
    Type: System.Guid
    The GUID of the workflow instance.
  • correlationId
    Type: System.Guid
    The GUID of the correlation identifier of the event. The correlation identifier can be used to uniquely identify an event within a workflow instance.

Return Value

Type: System.Int32
The number of subscriptions to the event.

Remarks

Activities that provide a workflow consumable event should use the GetEventSubscriptionCount method to determine whether there are any active subscribers for the event. If there are no subscriptions for the event, the activity can choose to not raise the event.

See Also

Reference

IPSWorkflowService Interface

IPSWorkflowService Members

Microsoft.Office.Project.Server.Library Namespace