Defining Dependencies for Task Groups and Tasks in Plug-in Files

When you add a task group or a task to a plug-in file, you must add them in the correct sequence and declare any dependencies that the group or task has on the successful completion of other task groups or tasks. A task can depend on other tasks, requiring other tasks to complete before primary task can run. For example, the task to create work item queries cannot run until all the tasks to create work item types have successfully completed. Therefore, the task to upload work item queries depends on the task to upload the types of work items.

In this topic

  • Required Plug-ins and Plug-in Dependencies

  • Defining Task Group Dependencies

  • Defining Task Dependencies

Required Plug-ins and Plug-in Dependencies

The following illustration shows the dependent relationships that are defined for the process template for Microsoft Solutions Framework (MSF) for Agile Software Development v5.0. As the illustration shows, the plug-in for Work Item Tracking depends on the successful completion of the plug-in for Groups and Permissions, which depends on the successful completion of the plug-in for Classifications. The plug-ins for both Test Management and Version Control depend on the completion of the first three plug-ins. The plug-ins for Build, Lab, Reports, and Portal depend on the completion of the plug-in for Version Control.

Process Template Plug-in Dependencies

Tip

If you define your task groups and tasks in each plug-in file in the same order as their dependencies, you make reading the file and eliminating dependency problems easier.

Dependencies can be used to indicate the order in which plug-ins run in the New Team Project Wizard. Some plug-ins are always dependent on other plug-ins. Also, not all plug-ins are required for a process template.

The following table identifies which plug-ins depend on other plug-ins. Only the plug-in for Classifications is required. All other plug-ins are optional. For more information about each plug-in, see Working with Process Template Files.

Plug-in

Dependent Plug-ins

Build

Groups, VersionControl

Classifications

None

Groups

Classifications

Lab

Build, Classifications, Groups, WorkItemTracking

Portal

Classifications, Reporting, VersionControl, and WorkItemTracking

Reporting

Classifications, VersionControl, and WorkItemTracking

TestManagement

Classifications, Groups, and WorkItemTracking

VersionControl

Classifications, Groups, and WorkItemTracking

WorkItemTracking

Classifications and Groups

Back to top

Defining Task Group Dependencies

Use the dependency element in tasks and groups to indicate when a dependency exists. The following example shows how to use the dependency element to specify that the WorkItemTracking task group depends on the Classification and Groups task groups.

<group id="WorkItemTracking"
   description="Workitem definitions uploading."
   completionMessage="Workitem definitions uploaded.">
   <dependencies>
      <dependency groupId="Classification"/>
      <dependency groupId="Groups"/>
   </dependencies>
   <taskList filename="WorkItem Tracking\WorkItems.xml"/>
</group>

Note

The groupId element references the id element value in the other group.

The following table describes the elements that you use to define task group dependencies. For more information about how to define task groups, see ProcessTemplate XML Elements Reference.

Element

Syntax

Description

dependencies

<dependencies>
<dependency>. . . </dependency>
</dependencies>

Required child element of group.

Specifies the other groups on which a group depends.

dependency

<dependency groupId="groupId" />

Optional child element of dependencies.

Specifies the ID of another task group on which this group depends. The other group must complete its tasks before this task group can start.

Back to top

Defining Task Dependencies

The following example shows how to use the dependency element to specify that the WorkItems task depends on the task with an ID of "WITs."

<task
   id="WIs"
   name="WorkItems"
   plugin="Microsoft.ProjectCreationWizard.WorkItemTracking"
   completionMessage="Work items uploaded"
   completionDescription = "Processing the actual work items used by work item tracking">
   <dependencies>
      <dependency taskId="WITs" />
   </dependencies>

The following table describes the elements that you use to define task dependencies. For more information about how to define tasks, see Defining the Tasks to Process a Plug-in.

Element

Syntax

Description

dependencies

<dependencies>
<dependency>. . . </dependency>
</dependencies>

Optional child element of task.

Specifies the other tasks on which a task depends.

dependency

<dependency taskId="taskId" />

Optional child element of dependencies.

Specifies the ID of another task on which this task depends. The other task must complete its tasks before this task can start.

Back to top

See Also

Concepts

Customizing Process Templates

Defining the Tasks to Process a Plug-in

Defining the Root Tasks Using the Process Template Plug-in File

Change History

Date

History

Reason

April 2011

Added information about and the syntax for dependency elements.

Information enhancement.