Team System:team Foundation Server Event Service

Source: Internet
Author: User
Tags web services xsl xsl file

Microsoft builds Team Foundation Server (TFS) as a collection of primary and secondary services, including version control, work item tracking, and EventService services. I classify eventservice as a secondary service, or rather a support service. EventService provides a set of events that, when triggered, can perform actions such as sending an e-mail message or invoking a SOAP-based WEB service.

In this column, I'll explain what out-of-the-box events are available in the Visual studio® user interface, what events EventService provides, how to create and manage subscriptions, and how to create your own WEB services to receive and handle events. Although I will use Visual Studio 2008 and TFS 2008, much of this column also applies to TFS 2005.

Project Alerts

If you start to install Visual Studio 2008 with Team Foundation Client (TFC) and connect to an existing one, you will have access to the Team menu on the main menu bar. At this point, there is a menu item named "Project Alert." If you select this menu item, Visual Studio Opens the Project Alerts dialog box, where you can create an e-mail subscription for up to four events (see Figure 1). TFS will convert the body of the e-mail message to plain text or HTML format, depending on your preferences.

Figure 1 Project alerts for TFC

Visual Studio provides the following four events: Project Check-in, build completion, build status changes, and other people who have changed the work items assigned to you. For each event, you can enter one or more e-mail addresses (separated by semicolons). An event to select the format of an e-mail message (HTML or plain text). Note that TFS can raise more events than those listed in the Project Alerts dialog box. (Details will be introduced later.) )

Controlling e-mail message Formats

TFS controls the format of alert e-mail messages through a set of XSL transformations. In the folder C:\Program Files\Microsoft Visual Studio 2008 Team Foundation Server\Web Services\services\v1.0\transforms, there are 28 text Thing These files are grouped into the following four categories: Emailtemplate, plantextxsl, XSD, and XSL. Microsoft uses an XSD file to define the data layout of the provided events. The Event Service uses XSL and plaintextxsl files to convert XML data into the body of an e-mail message. Microsoft created an XSL file for the four events displayed in the Project Alert dialog box. Note that in TFS 2008, Microsoft has enhanced the build completion event and thus created a new XSL file with the number 2 followed.

Finally, the Emailtemplate file references the other 5 events provided by EventService. However, Microsoft no longer uses or supports these files. Instead, use the datachangedevent.xsl file. The Project Alerts dialog box does not provide these events, so to subscribe to them and receive e-mail notifications, you need to use one of the command-line tools provided by Microsoft (BisSubscribe.exe) or write some of your own code.

To control the format of notification e-mail messages, you need to edit the appropriate transformation files. For events that are provided through the Project Alerts dialog box, you need to edit one or more XSL files. For HTML-formatted e-mail messages, you will find that the core layout of all events is stored in teamfoundation.xsl. You should first create a backup copy of all the files that you want to change, and then test the changes. After the changes are complete, TFS will use the modified transformation the next time the event is raised.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.