PSWorkflowService.GetEventSubscriptionCount-Methode
Ruft die Gesamtzahl der Abonnements für den angegebenen Workflowinstanz, Ereignisname und Kombination der Korrelations-ID ab.
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
)
Parameter
workflowContext
Typ: Microsoft.Office.Project.Server.Library.ProjectWorkflowContextInformationen, die auf die aktuelle Instanz des Workflows verknüpft ist, die verarbeitet wird.
instanceUid
Typ: System.GuidDie GUID der Workflowinstanz.
eventName
Typ: System.StringDer Name des Ereignisses.
correlationId
Typ: System.GuidDie GUID der Korrelations-ID des Ereignisses. Die Korrelations-ID kann verwendet werden, um ein Ereignis innerhalb einer Workflowinstanz eindeutig zu identifizieren.
Rückgabewert
Typ: System.Int32
Die Anzahl von Abonnements für das Ereignis.
Implementiert
IPSWorkflowService.GetEventSubscriptionCount(ProjectWorkflowContext, Guid, String, Guid)
Hinweise
Aktivitäten, die ein Workflow-Ereignis verwendet bereitstellen sollten die GetEventSubscriptionCount -Methode verwenden, um festzustellen, ob alle aktiven Abonnenten für das Ereignis vorhanden sind. Wenn keine Abonnements für das Ereignis vorhanden sind, kann die Aktivität verhindern, dass das Ereignis nicht ausgelöst.