Subscribing to Team Foundation Server Events

In my previous post, Setting up Continuous Integration with Team Build, you probably noticed that all we really did was set up a simple web service that subscribed to the check-in event on the Team Foundation Server.

One might ask, then, what other Team Foundation Server events can I subscribe to?

Here's a list, in alphabetical order, of all the Team Foundation Server events in version 1.0:

TFS Event nameNotes
AclChangedEvent!
BranchMovedEvent
BuildCompletionEvent*
BuildStatusChangedEvent
CheckinEvent
CommonStructureChangedEvent
DataChangedEvent*
IdentityChangedEvent
IdentityCreatedEvent!
IdentityDeletedEvent!
MembershipChangedEvent!
NodeCreatedEvent
NodePropertiesChangedEvent
NodeRenamedEvent
NodesDeletedEvent
ProjectCreatedEvent*
ProjectDeletedEvent
WorkItemChangedEvent

(!) = These events may not work properly, per Microsoft's Pete Sheill
(*) = These events are used internally by TS itself in a default TFS install

You can use the bissubscribe.exe command-line utility to subscribe and unsubscribe from these events:

C:\>BisSubscribe.exe
BisSubscribe - Team Foundation Server BisSubscribe Tool
(C) Copyright 2006 Microsoft Corporation. All rights reserved.

BisSubscribe.exe

Usage:

BisSubscribe /eventType  /address  [/deliveryType EmailHtml|EmailPlaintext|Soap]
  [/server ] [/filter ] [/tag ]
BisSubscribe /unsubscribe /id  [/server ]

where:

eventType:    The name of the event.  Case sensitive.
filter:       (default none) A filter expression.
address:      The email address or webmethod URL for the subscriber.
server:       The Team Foundation Server name.
tag:          (default none) A field to later use to identify this subscription.
deliveryType: (default Soap) EmailHtml|EmailPlaintext|Soap indicating the preferred format.
id:           The integer id for the subscription to be deleted when unsubscribing.

Unfortunately, although you can add and delete subscriptions to your heart's content, there's no way to list what subscriptions currently exist on the Team Foundation Server. It's an odd oversight. To see the subscription list, you have to run a query on a TFS table, TfsIntegration.tbl_subscription:

You can clearly see where a few of these subscriptions are set via the Team System Email Notifications UI. And there's our continuous integration subscription at the bottom, too.

If you look in the

C:\Program Files\Microsoft Visual Studio 2005 Team Foundation Server\TF Setup

folder on the server, you'll find even more information on these events, including xsd definitions, email templates, and more:

But if you're thinking about creating your own custom ad-hoc event integration, I recommend checking out these great pre-built Visual Studio 2005 samples contributed by the Team System community:

If you know of any other helpful TFS event handling code samples, please post a reference to them in the comments!

posted on Monday, July 03, 2006 1:49 PM by jatwood

Comments

# VSTS Links - 7/5/2006

Dave McKinstry on ASP.NET 1.1 projects with Team Foundation Version Control , Understanding ChangeSets...
Wednesday, July 05, 2006 9:18 PM by Team System News

# Automatic email notifications when a work item is assigned


A common request in Team System shops is for an automatic email notification when a work item is assigned...
Thursday, July 13, 2006 1:40 PM by Team System

# Automatic email notifications when a work item is assigned


A common request in Team System shops is for an automatic email notification when a work item is assigned...
Thursday, July 13, 2006 1:43 PM by Team System

# TFSのイベントを購読しよう

タイトルは英語で書いたほうがニュアンスつかめるかも。Subscribing to Team Foundation Server EventsTFSでイベントが起こったときに独自のWebサービスを呼び出したり、E-mailを送信させたりすることができるように設定するにはってことらしい。これを行うための準備として、前回のエントリで紹介したVisaul...
Tuesday, July 25, 2006 6:41 PM by 寝ても覚めても.NET(?)

# FAQ on VSTS subscriptions and common problems


I was collecting links & pointers to answer common questions in forums related to TFS eventing...
Wednesday, July 26, 2006 4:20 PM by Naren's Blog

# FAQ on VSTS subscriptions and common problems


I was collecting links & pointers to answer common questions in forums related to TFS eventing...
Friday, July 28, 2006 10:19 AM by Naren's Blog

# How to filter the Build Completion Event

One of the fields that ships with the standard Bug Work Item Type in Team Foundation is called “Found...
Tuesday, September 05, 2006 9:30 AM by Jason Prickett's Blog

# FAQ on VSTS subscriptions and common problems

I was collecting links & pointers to answer common questions in forums related to TFS eventing and
Thursday, October 12, 2006 5:16 PM by Naren's Blog

# VSTS Links and Resources

VSTS Links and Resources
Monday, December 18, 2006 7:17 AM by Tiago Pascoal

# VSTS Links and Resources

Last week we did a four days workshop on Visual Studio Team Systems . We have collected a number of resources
Monday, December 18, 2006 7:41 AM by Tiago Pascoal

# VSTS Links and Resources

VSTS Links and Resources
Monday, December 18, 2006 7:46 AM by Tiago Pascoal

# VSTS Links and Resources

Last week we did a four days workshop on Visual Studio Team Systems . We have collected a number of resources
Monday, December 18, 2006 8:04 AM by Tiago Pascoal's WebLog

# VSTS Links and Resources

Last week we did a four days workshop on Visual Studio Team Systems . We have collected a number of resources
Monday, December 18, 2006 8:09 AM by Tiago Pascoal's WebLog

# VSTS Links and Resources

Last week we did a four days workshop on Visual Studio Team Systems . We have collected a number of resources
Monday, December 18, 2006 8:13 AM by Community Blogs

# VSTS Links and Resources

Last week we did a four days workshop on Visual Studio Team Systems . We have collected a number of resources
Monday, December 18, 2006 8:44 AM by Community Blogs

# How to filter the Build Completion Event

One of the fields that ships with the standard Bug Work Item Type in Team Foundation is called “Found
Wednesday, January 10, 2007 6:06 AM by Jason Prickett's Blog

# FAQ on VSTS subscriptions and common problems

I was collecting links & pointers to answer common questions in forums related to TFS eventing and
Tuesday, February 06, 2007 10:54 AM by Naren's Blog

# re: Subscribing to Team Foundation Server Events

The TFS Event Handler prototype is now live!

Get it from http://www.codeplex.com/tfseventhandler
Tuesday, June 19, 2007 1:23 AM by Martin Hinshelwood

# Continuous Integration mit Team Foundation Server 1.0

Zu diesem Thema befinden sich im Netz einige quellen, wie sich mit TFS Continuous Integration realisieren...
Monday, July 02, 2007 5:54 AM by E#

# Continuous Integration mit Team Foundation Server 1.0

Zu diesem Thema befinden sich im Netz einige quellen, wie sich mit TFS Continuous Integration realisieren...
Tuesday, July 03, 2007 3:02 AM by E#

# FAQ on VSTS subscriptions and common problems

I was collecting links & pointers to answer common questions in forums related to TFS eventing and
Wednesday, January 23, 2008 9:42 AM by Naren's Blog