共用方式為


Process template XML elements reference

Azure DevOps Server 2022 - Azure DevOps Server 2019 | TFS 2018 - TFS 2013

You can customize the root file for a process template to add or remove plug-in files. The root file defines all the plug-ins and tasks used to create a project in Azure DevOps Services or an on-premises Team Foundation Server (TFS). The root file, named ProcessTemplate, is located in the container folder for the process template files. For more information, see Overview of process template files.

The parent element of the root plug-in file is the ProcessTemplate element, which must have only one metadata and one groups element defined. You must assign a unique name to each process template within a project collection, and the name cannot be longer than 124 Unicode characters.

Note

For Hosted XML process model: If you import a process template with the same name and GUID as an existing process, the existing process is updated along with all projects that reference that process.

For On-premises XML process model: If you upload a process template with the same name as an existing template, the existing template will be overwritten.

ProcessTemplate syntax structure

The root plug-in for process templates must be specified in its own file in the ProcessTemplate container element and conform to the schema for process templates.

The following example shows the structure of the root ProcessTemplate element. For a more extensive example, see Define the root tasks.

<?xml version="1.0" encoding="utf-8"?>  
<ProcessTemplate>  
      <metadata> . . . </metadata>  
      <groups> . . .</groups>  
</ProcessTemplate>  

Metadata element reference

The following syntax shows the structure of the metadata element and its child elements.

<metadata>  
    <name>ProcessTemplateName</name>  
    <description>ProcessTemplateDescription </description>  
    <version type="ID" major="Number1" minor="Number2" />  
    <plugins>  
      <plugin name="Microsoft.ProjectCreationWizard.pluginID" wizardPage="true | false" />  
. . .  
    </plugins>  
</metadata>  
Element Description and syntax
description Required child element of metadata. Defines the text of the description that appears in the New Team Project Wizard for the process template.
<description>ProcessTemplateDescription</description>
metadata Required child element of ProcessTemplate. Container element for specifying required information for the plug-in to be processed by the New Team Project Wizard.
<metadata>
<name> . . . </name>
<description> . . . </description>
<version type="ID" major="Number1" minor="Number2/>
<plugins> . . . </plugins>
</metadata>
name Required child element of metadata. Defines the name of the process template, which must be unique across the project collection. The maximum length of the name is 124 characters.
<name>ProcessTemplateName</name>
plugin Required child element of plugins. Specifies the name of a plug-in file to include in the process template creation and specifies whether the plug-in should have a visible page in the New Team Project Wizard.
<plugin name="Microsoft.ProjectCreationWizard.PluginName wizardPage="true &#124; false" />
plugins Required child element of metadata. Container element that defines the plug-ins for the process template.
<plugins>
<plugin> . . . </plugin>
</plugins>
version Required child element of metadata.< Specifies a unique ID and major and minor revision numbers to identify the version of the process template.
<version type="ID" major="Number1" minor="Number2 " />

Groups element reference

The following syntax shows the structure of the groups element and its child elements.

<groups>  
      <group id="groupId" description="GroupDescription" completionMessage="SuccessMessage">  
      <dependencies>   
         <dependency groupId="dependentGroupId" />  
. . .  
      </dependencies>  
      <taskList filename="RelativePathAndFileName" />  
      </group>  
. . .  
</groups>  
Element Description and syntax
dependencies Required child element of group. Specifies dependencies that the group has on other groups.
<dependencies>
<dependency>. . . </dependency>
</dependencies>
dependency 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.
<dependency groupId="groupId" />
group Required child element of groups. Identifies a set of tasks for a plug-in to run during project creation. The following values are valid for each attribute:
- id: Specifies a name that identifies the task group. If another task group depends on this group, it references this ID. You must assign a unique value for the ID within the plug-in file.
- description: Specifies the message to indicate, during project creation, that the task group is being processed.
- completionMessage: Specifies the message to indicate, during project creation, that the task group completed successfully. Maximum length is 256 characters.
- failureMessage: Specifies the message to indicate, during project creation, that the task group failed to complete successfully.

<group id="TaskGroupId" description="TaskGroupDescription" completionMessage="SuccessMessage" failureMessage="FailureMessage">
<dependencies> . . . <dependencies>
<taskList> . . . </taskList>
</group>
groups Required child element of ProcessTemplate. Container element that defines the set of task groups that will run during project creation.
<groups>
<group> . . . </group>
</groups>
tasklist Specifies an XML file that contains the list of tasks to run. The list of tasks for a group must always be in a separate XML file. For more information about how to specify these files, see Define the tasks to process a plug-in.
<taskList filename="filePath" />