次の方法で共有


Team Foundation Alerts

Team Foundation alerts are a way for users to receive notifications when certain conditions occur. You can subscribe to these alerts on your client system through Team -> Alerts.

Team Foundation sends alerts for these events -- each of these events are scoped to the active Team Project. Note that if you have subscriptions to multiple team projects and one of the following events includes items from multiple team projects, than you will only receive one e-mail notification.

  1. When a work item assigned to you is changed (created, modified)
  2. When a checkin to the current Team Project occurs
  3. When a build completes.
  4. When build status changes.

Where do Alerts Come From?

Alerts are generated following one of the activities listed in the alert subscription tab. The Team Foundation component that owns the activity, prepares an XML document and sends that to the Team Foundation Core Services component (aka "BIS") since that component owns the subscription data. When BIS matches an XML document (this is really an "event") with one or more subscribers, it begins the process of preparing an email for each of the subscriptions. This process includes content scrubbing by the Team Foundation component that owns the "event." Generally speaking, the event contains all of the information that is associated with the activity. E.g, a "checkin" event contains all of the changes that were made as part of that checkin. The list of changes is scrubbed or filtered so the email contains only those items to which the subscriber has read access. In other words, the email will only contain those items to which the subscriber could view directly.  If the subscriber lacks read access to a file that was checked in, the file is not included in the email alert.

After the event has been scrubbed, BIS takes over and prepares the actual email by invoking the XSL transform associated with the event. After the transformation, the email is then sent to the email address associated with the subscription.

This process repeats for each subscriber. You don't need to create a subscription for each user; the email address can be for a group of users.

Alert Appearance

Alerts are created from an XML document containing the alert information and an XSL transform. The XSL transforms are located on the app-tier in BISIISDIR\bisserver\events\eventschemas. The schemas for the XML documents are currently in one of two places:

  1. Team Foundation registration data
  2. The same directory as the XSL transforms

Use the inetmgr to view the Team Foundation registration data:

  1. Navigate to VSTFWeb and expand bisserver.
  2. RMB on registration.asmx and select 'Browse..."  This will start IE navigated to this page.
  3. Select the GetRegistrationEntries method.
  4. After the page loads, press invoke
  5. You'll see the registration information for the services. As of CTP, not all services were registering their schemas.

The XSL transform directly controls the look and feel of the alert. We've put a lot of effort into the upcoming Beta2 alert appearance and they should be very close to what you'll see in the shipping product. The CTP alerts contain most of the information but are inconsistent and certainly not polished.

You can change the appearance of the alerts by modifying the transform that creates the alert.  If you make changes to the transform that introduce XSL processing errors (if you don't know what these are, you might not want to make any changes to the transforms!) you will have prevented the alert from being sent. Be careful.

I'll discuss alerts and web views in an upcoming blog.

Comments