TFS generates some event messages by its event handlers when there are activities on the TFS server. You can write a web service to listen to those messages. Then you just need to subscribe your web services to TFS. But how do you know the communication is established OK? Sometimes,  nothing happens after you subscribed and trigger the event. Very quick, you can use the following query to debug.

SELECT TOP 10 DATEADD(hour, -6, StartTime) as StartTimeCDT, Result, ResultMessage 

FROM [Tfs_Configuration].[dbo].[tbl_JobHistory]

WHERE JobId = 'A4804DCF-4BB6-4109-B61C-E59C2E8A9FF7'
--AND Result <> 0 

ORDER BY StartTime DESC

Things you need are

  • SQL client (MSSMS)
  • Know the database name for your TFS configuration (might be Tfs_xxxConfiguration if you use prefix when you installed it)
  • Adjust your time difference to UTC
Things you will get are
  • Time stamp of the event hand-over – usually within 3 minutes of the actual event happens, depends on how you set the response time
  • Result – 0 means OK without errors. If you are debugging, you may want to show all so you can track and compare the good and bad ones
  • ResultMessage – You have to set the NotificationJobLogLevel to 2 to be able to see any meaningful error details
Advertisements