PSWorkflowService.GetEventSubscriptionCount Method
Gets the total number of subscriptions for the specified workflow instance, event name, and correlation identifier combination.
Namespace: Microsoft.Office.Project.Server.Workflow
Assembly: Microsoft.Office.Project.Server.Workflow (in Microsoft.Office.Project.Server.Workflow.dll)
Syntax
'Declaration
Public Function GetEventSubscriptionCount ( _
workflowContext As ProjectWorkflowContext, _
instanceUid As Guid, _
eventName As String, _
correlationId As Guid _
) As Integer
'Usage
Dim instance As PSWorkflowService
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)
public int GetEventSubscriptionCount(
ProjectWorkflowContext workflowContext,
Guid instanceUid,
string eventName,
Guid correlationId
)
Parameters
- workflowContext
Type: Microsoft.Office.Project.Server.Library.ProjectWorkflowContext
Information that is related to the current instance of the workflow that is being processed.
- instanceUid
Type: System.Guid
The GUID of the workflow instance.
- eventName
Type: System.String
The name of the event.
- 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.
Implements
IPSWorkflowService.GetEventSubscriptionCount(ProjectWorkflowContext, Guid, String, Guid)
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.