PSWorkflowService.RegisterForEvent Method
Registers a workflow activity for an event that is raised for the workflow.
Namespace: Microsoft.Office.Project.Server.Workflow
Assembly: Microsoft.Office.Project.Server.Workflow (in Microsoft.Office.Project.Server.Workflow.dll)
Syntax
'Declaration
Public Sub RegisterForEvent ( _
workflowContext As ProjectWorkflowContext, _
instanceUid As Guid, _
eventName As String, _
correlationId As Guid, _
subscriptionUid As Guid _
)
'Usage
Dim instance As PSWorkflowService
Dim workflowContext As ProjectWorkflowContext
Dim instanceUid As Guid
Dim eventName As String
Dim correlationId As Guid
Dim subscriptionUid As Guid
instance.RegisterForEvent(workflowContext, _
instanceUid, eventName, correlationId, _
subscriptionUid)
public void RegisterForEvent(
ProjectWorkflowContext workflowContext,
Guid instanceUid,
string eventName,
Guid correlationId,
Guid subscriptionUid
)
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 activity instance.
- eventName
Type: System.String
The name of the event that is being registered.
- 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.
- subscriptionUid
Type: System.Guid
The GUID that is supplied by the caller to register for the event. The registration is defined by the specified instance, event name, and correlation identifier.
Implements
IPSWorkflowService.RegisterForEvent(ProjectWorkflowContext, Guid, String, Guid, Guid)
Remarks
Project Server workflows integrate with the SPWorkflowExternalDataExchangeService to support raising events within the workflow.
Events that do not need to be uniquely identified within the workflow can use the workflow instance identifier for the correlation identifier. For example, the OnProjectSubmit event uses the workflow instance identifier as the correlation identifier.