Welcome to MSDN Blogs Sign in | Join | Help

Rosario - Customing Link Types Primer

With Rosario, you can define multiple link types. This allows for you to customize link types to match your processes. This blog post is a primer in how to do that.

Quick-start guide on creating a new link type: 

Here's how to create a new link type:

  1. From the command shell, go to “Program Files\Microsoft Visual Studio 9.0\Common7\IDE”
  2. Run "witadmin.exe exportlinktype /s ServerName /n System.LinkTypes.Dependency /f mylinktype.xml”
  3. View the mylinktype.xml file that was created. It should look like this:

<?xml version="1.0" encoding="utf-8"?>

<LinkTypes>

  <LinkType ReferenceName="System.LinkTypes.Dependency" ForwardName="Successor" ReverseName="Predecessor" Topology="Dependency" />

</LinkTypes>

  1. Edit the mylinktype.xml file to look like this.

<LinkTypes>

  <LinkType ReferenceName="MyLinks.LinkTypes.MyLink" ForwardName="My Successor" ReverseName="My Predecessor" Topology="Dependency" />

</LinkTypes>


NOTE: It is important to change the namespace from “System.” To “MyLinks.” (or some other name), because “System.” Is a protected namespace.

  1. Run “witadmin.exe importlinktype /s ServerName /f mylinktype.xml
  2. Go to your Team Explorer and select “Refresh Cache”, or close and reopen your Visual Studio.

The new link item type should now be available to use from your forms.

What is that "topology" field for?

Now, what is that “topology” field in the definition XML. Topology assigns a set of rules that are enforced for that link type. There are four topologies to select from:

Network

Link types of this topology have essentially no rules and no directionality. You can have circular relationships, and the link looks the same from both sides.

Example XML:

<LinkTypes>

  <LinkType ReferenceName="MyLinks.LinkTypes.MyRelated" ForwardName="My Related" ReverseName="My Related" Topology="Network" />

</LinkTypes>

Directed Network

Link types of this topology are like Network links, except there is directionality. You can specify a name that appears at each end of the link. In other words, the link looks differently depending from which side you view it.

Example XML:

<LinkTypes>

  <LinkType ReferenceName="MyLinks.LinkTypes.MyDependent" ForwardName="My Dependent" ReverseName="My Provider" Topology="DirectedNetwork" />

</LinkTypes>

 

Dependency

Link types of this topology are like Directed Network links in that they have directionality, but an additional constraint to prevent circular relationships.

Example XML:

<LinkTypes>

  <LinkType ReferenceName="MyLinks.LinkTypes.MyPred" ForwardName="My Successor" ReverseName="My Predecessor" Topology="Dependency" />

</LinkTypes>

 

Tree

Link types of this topology are essentially trees, it enforces a one-to-many relationship and doesn’t allow circularity.

Example XML:

<LinkTypes>

  <LinkType ReferenceName="MyLinks.LinkTypes.MyTree" ForwardName="My Child" ReverseName="My Parent" Topology="Tree" />

</LinkTypes>

 

 There you have it. Creating link types in a 343 words. Let us know how it goes.

Published Friday, August 17, 2007 5:17 PM by Gregg Boer
Filed under: , ,

Comments

# MSDN Blog Postings &raquo; Rosario - Customing Link Types Primer

# VSTS Links - 08/21/2007

Tuesday, August 21, 2007 9:27 AM by Team System News

The Teams WIT Tools Blog on Rosario - Customizing Link Types Primer. Naren on New custom controls posted...

# Teams WIT Tools : Rosario - Customing Link Types Primer

Saturday, May 31, 2008 4:49 PM by Dating

With Rosario, you can define multiple link types. This allows for you to customize link types to match your processes. This blog post is a primer in how to do that. Quick-start guide on creating a new link type: Here's how to create a new link type: Fro

# Teams WIT Tools : Rosario - Customing Link Types Primer

Friday, June 06, 2008 4:26 AM by Weddings

With Rosario, you can define multiple link types. This allows for you to customize link types to match your processes. This blog post is a primer in how to do that. Quick-start guide on creating a new link type: Here's how to create a new link type: Fro

# Customizing Work Item Link Types in TFS 2010

Friday, June 05, 2009 11:17 AM by Teams WIT Tools

A long time ago (almost 2 years ago), I blogged about how to customize link types. Since the Beta1 has

Anonymous comments are disabled
 
Page view tracker