Welcome to EMC Consulting Blogs Sign in | Join | Help

Crispin Parker's Blog

About Scrum for Team System and .Net development

Scrum for Team System v3 – Event Service

This post relates to Team Foundation Server 2010 and the Scrum for Team System version 3 process template.

Now that the SfTS version 3 beta 2 is out the door, I have a chance to reflect back on some of the work that went into getting it this far. One component I am partially fond of is the Event Service.

The event service has been a component of the SfTS template solution since version 2. The chances are that you never noticed it busily working away in the background rolling up states and summing up work remaining figures. This much is also true in the version 3 template, it works quietly in background to make your project housekeeping easier and to give you useful figures. But in SfTS v3 it does a lot more heavy lifting.

So what is it?

The event service is a web application that is installed into the TFS AT (Team Foundation Server Application Tier) when you select the “Service” feature of the SfTS installer. The TFS AT passes a set of change data to the service endpoint whenever an altered work item is saved.

Using a set of configuration rules, the service examines the changes to determine if they affect any work items in the project. If changes to work items are required, the rules define the new values and the service updates the work item(s).

You can see the service changes made to your work items by examining the work item history. The name of the service and the action taken is included in the history details.

image

Controlling the service and synchronising work items:

The installed web application includes three service end points. The first is called by TFS in the event of a work item change, the other two are called manually by the TFS administrator.

 

 

Service Control

Unsurprisingly, this web service end point allows you to control the service! Actually, it allows you to start, stop and check the status of the work item changed service.

 image image

The service control end point is located at:

  • http://[TFSHOST]:[TFSPORT]/ScrumforTeamSystem/3.0/ServiceControl.asmx

 

Synchronise All

The “Sync All” service schedules a special job in the event service queue. Upon de-queuing a sync all request, the service will load all work items [in the specified project] and apply any rule matches. In this way, you can use this service to correct and synchronise all the work items. Obviously, this is a process intensive exercise and should only be executed when the TFS instance is not under any heavy load, possibly out of office hours.

image image

This service end point requires two parameters;

  • tfsAddress – The project collection URL.
  • projectName – The project name to synchronise.

 

 

The sync all end point is located at:

  • http://[TFSHOST]:[TFSPORT]/ScrumforTeamSystem/3.0/SyncAll.asmx

 

Under the hood:

As the service runs in background, you can’t see much action while it’s working. However, you can get to see more by enabling event logging.

Event Logging

To set this up, you will need to create and edit files on the TFS AT.

  1. Create an empty, accessible log file.

    The event service runs under the same app pool as the TFS AT. In order to make log entries, the app pool user account must have write permission to the target log file. The easiest way to accomplish this is to create local file and give the “everybody” group full permission over it.

    Example: c:\users\[Profile Name]\AppData\Local\Temp\SfTSEvent.log
  2. Open the event service “web.config” file.

    The configuration file is located at:

    C:\[Program Files]\Scrum for Team System\Services\web.config

    Note: You may have to open the file with elevated privileges.
  3. Add the log file path to the relevant setting value.

    Change:

    <setting name="LogFilePath" serializeAs="String">
      <value/>
    </setting>

    To:

    <setting name="LogFilePath" serializeAs="String">
      <value>c:\users\[Profile Name]\AppData\Local\Temp\SfTSEvent.log</value>
    </setting>
  4. Save the config file.

Now the details of the event service actions will be written to the log file.

Well that's it for a high level look at the event service. In future posts I'll discuss the Work Item Changed event, Transition rules, Aggregation rules and customisations.

Links

Regards,

Crispin Parker,
Senior Practice Consultant,
EMC Consulting.

Published 02 December 2009 16:56 by crispin.parker

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Crispin Parker's Blog said:

This post relates to the Team Foundation Server Scrum for Team System process template event service.

January 15, 2010 18:23
 

Crispin Parker's Blog said:

This blog relates to the Scrum for Team System version 3 template installation process. The SfTS v3 installer

January 22, 2010 11:50
 

Simon Bennett's Blog said:

It’s always been possible to descope work in the Scrum for Team System template. But the method employed

January 22, 2010 18:09
 

Crispin Parker's Blog said:

This post relates to Team Foundation Server and the Scrum for Team System process template. Previously

January 26, 2010 14:03
 

Crispin Parker's Blog said:

This post relates to Team Foundation Server 2010 RC, the Scrum for Team System version 3 process template

March 5, 2010 10:57
 

Yezdaan said:

I added the log file and nothing is being written to it.  Is there something else I need to do?  I made sure the permissions are right.  

October 14, 2010 04:45
 

crispin.parker said:

@Yezdaan - The log file must reside in a location that is accessable to the TFS Application Pool user. The identity that executes the TFS AppPool may not have permissions to write to file and sometimes is not covered by the "EveryOne" user group. Try using the default system temp folder and explicitly giving the TFS AppPool user account full permission on the target file.

Check List:

* Target file exists (it needs to manually created)

* Service Web.Config set to correct file path.

* File accessable to TFS AppPool user.

Crispin

October 14, 2010 09:26
 

Crispin Parker's Blog said:

A recent question in the Scrum for Team System Q &amp; A site has highlighted that there is a lack of

December 10, 2010 18:00
 

Gordon Doherty said:

Hi,

I have ensured that all three things are in place:

* Target file exists (it needs to manually created)

* Service Web.Config set to correct file path.

* File accessable to TFS AppPool user. (<-This was NetworkService for me)

...but still the event log file is empty?

Thanks,

Gordon

May 17, 2011 14:46

Leave a Comment

(required) 
(optional)
(required) 
Submit

This Blog

Syndication

News

Powered by Community Server (Personal Edition), by Telligent Systems