rosario linking om framework naren datha. rosario link types customizable work item link types with...

Post on 31-Mar-2015

215 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

Rosario Linking OM Framework

Naren Datha

Rosario link types• Customizable work item link types with rich query abilities and rules to represent topologies• Comes with built-in link types such as

– Parent/Child for tree hierarchy links– Predecessor/Successor link types

Link type topologies• Topology assigns a set of rules to link types.

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.

Directed NetworkLink 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.

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

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

Creating new Link Types

• Decide which topology to use• New WitAdmin utility. Link options:

– ExportLinkType– ImportLinkType– ListLinkTypes– DeactivateLinkType– ReactivateLinkType

• Create xml file for linktype definition. Example:<LinkTypes> <LinkType ReferenceName=“MyCompany.LinkTypes.MyTree"

ForwardName=“My Child" ReverseName=“My Parent" Topology="Tree" />

</LinkTypes>

• Run “WitAdmin ImportLinkType”

Getting work item linktypes in OM• Work item link types are defined per server• WorkItemStore.WorkItemLinkTypes has list of registered linktypes

Accessing links in a workitem

• Each work item has 2 collections: WorkItemLinks for current links and WorkItemLinkHistory for add/remove history

• Important properties of Link object:– SourceId, TargetId– AddedDate, RemovedDate

Creating and Deleting links

Querying links from UI

Query for links - WIQL

SELECT [System.Id], [System.Links.LinkType], [System.Title]

FROM WorkItemLinksWHERE

mode(MustContain)

([Source].[System.TeamProject] = @project)

And (System.Links.LinkType = 'System.LinkTypes.Related')

And ([Target].[System.WorkItemType] = 'Task')

Running link query

• Use query class in object model

Using results of link query

TargetId SourceId

1 -111 1111 1112 1

121 12122 1213 1

Output from results Tree representation of results

Hierarchical data is returned as SourceId, TargetId pairs. TargetId is id for the result, and SourceId is source of link such as Parent. Below diagram shows how tree can be visualized from result list results on the left

How the tree is constructed on VSIP client?

Target Id

Source Id

1 -1

11 1

111 11

12 1

101 12

102 12

13 1

index

Parent index

Level

0 -1 0

1 1 1

2 11 2

3 1 1

4 12 2

5 12 2

6 1 0

From Server Computed in client Drawing on paint event

Result list view

Paging work items

• Our result list can handle large number of items because it pages the items from server as user scrolls

• “Query” function in WorkItemStore can be used for paging specified Ids and specified Fields from server.

Example Usage:

Customizing Links Control

-Multiple links controls can be hosted in a form with each control showing specified set of link types-Links control now can show customized columns-Links are grouped by link types

top related