msepm.hsquared.be
Eventing Architecture Server-side events and the Queue Creating an Event Handler A statusing example Deploying an Event Handler Event Handlers and config files
Eventing Service is part of core SSP application Event Handlers in WSS config DB at PWA site level Independent event handlers for each PWA PWA includes Event Catalog to manage custom Event Handlers Multiple event handlers possible Pre and post events
Call PSI method Raise Event Invoke Event Handler Run custom code Event Arguments Modified Event Arguments Cancel pre- event End Continue
Pre-events fired when the Queue job is about to start NOT when you perform the action! Post-events fired when the queue job completed successfully If queue job fails or is cancelled, the post-event will not fire
Exceptions Some PSI calls have no corresponding queue job Pre-event fired before action is performed Post-event fired after action completed Ex.: StatusingStatusUpdating, StatusingStatusUpdated
Create a class library project Set references Microsoft.Office.Project.Server.Events.Receivers.dll Microsoft.Office.Project.Server.Library.dll Develop the event handler code Deploy the event handler Register the event handler with Project Server using Project Web Access
Creating a Project Server custom Event Handler
Only published updates in Reporting DB Not possible to report on missing updates Difficult to implement task update checks Impossible to detect 0h registrations No incremental export possible
Insert task updates in a custom DB Add status to keep track of approval status Saved, submitted, accepted, rejected Add timestamp and/or export state Allows for incremental exports
EPM 2007 DB EPM 2007 DB Task Updates Save Task Updates Save Custom DB Custom DB Task Updates Submit Accept Reject Task Updates Submit Accept Reject Queue Event Service Event Service
Creating a custom Statusing solution
Building an incremental export module Building a real-time export module Real-time timesheet reporting No more waiting for queue Use pre-event to implement task update quality checks
NOT a replacement for out-of-the-box statusing flow Go in and out Events stop normal code execution. Make sure you dont add delays! Keep an eye on performance! Might be necessary to offload the custom DB to a dedicated server
Two options GAC Shared assembly Sign with strong name key! Bin directory Code isolation Register Event Handler in PWA
Event Handler = assembly No assembly config file Add configsource to config of calling.dll Microsoft.Office.Project.Server.Eventing.exe.config
Event Handler and Configuration File
Slideshow Partial Code Sample Project 2007 SDK