共用方式為


使用流程範本外掛程式檔案定義根工作

您可以透過自訂 ProcessTemplate.xml 來新增、移除或變更處理流程範本外掛程式的順序。 ProcessTemplate.xml 是定義整個流程範本以及所有附屬 XML 檔案的根檔案。 這個檔案包含了成功建立 Team 專案所必須執行的所有工作群組。 每個工作群組都會參考定義了特定工作的某附屬 XML 檔 (通常位於子資料夾中)。 一般而言,您要替每一個外掛程式指定一個工作群組。

本主題內容

  • ProcessTemplate.xml 檔案的結構

  • 定義外掛程式和工作群組

  • 流程範本檔案範例

如需流程範本內容的概觀,請參閱使用流程範本檔案

ProcessTemplate.xml 檔案的結構

在每個 ProcessTemplate.xml 檔案中,您要定義中繼資料和工作群組。 中繼資料描述範本並指定要處理的外掛程式,如以下範例所示

<metadata>
    <name>MSF for Agile Software Development v5.0</name>
    <description>You can use this template to organize and track the progress and health of a small-to-medium sized agile project.</description>
    <plugins>
      <plugin name="Microsoft.ProjectCreationWizard.Classification" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.Reporting" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.Portal" wizardPage="true" />
. . .
    </plugins>
</metadata>

工作群組會指定針對每個外掛程式執行的相依性和工作,如以下範例所示:

<groups>
    <group id="Classification" description="Structure definition for the project." completionMessage="Project Structure uploaded.">
      <dependencies></dependencies>
      <taskList filename="Classification\Classification.xml" />
    </group>
    <group id="Groups" description="Create groups and assign permissions." completionMessage="Groups created and permissions assigned.">
      <dependencies>
        <dependency groupId="Classification" />
      </dependencies>
      <taskList filename="Groups and Permissions\GroupsandPermissions.xml" />
    </group>
. . .
</groups>

回到頁首

定義外掛程式和工作群組

您可以使用 ProcessTemplate 項目及其子項目自訂 ProcessTemplate.xml 檔案。 如需每個項目語法的詳細資訊,請參閱ProcessTemplate XML 項目參考

您可以依指定的順序指定下列資訊,藉以定義要處理的外掛程式和根工作。

  1. 名稱: 您可以使用此項目,將標籤指派給流程範本。 在 [新增 Team 專案精靈] 中,您可以根據流程範本的名稱指定流程範本,如以下範例所示:

    <name>Simplified Process</name>
    

    必須要有這個項目。 名稱不只出現在 [新增 Team 專案精靈] 的流程範本清單中,也出現在 [流程範本管理員] 對話方塊中。 每個流程範本的名稱在 Team 專案集合中都必須是唯一的,而且每個範本名稱長度不得包含 254 個以上的 Unicode 字元。 如果您上傳一個與現有範本相同名稱的範本,現有範本將會遭到覆寫。

  2. 描述: 您可以使用此項目定義在 [新增 Team 專案精靈] 中描述流程範本的文字,如以下範例所示:

    <description>Choose the simple process for projects that require little or no overhead and have very low cost.</description>
    

    當專案負責人或系統管理員正在決定要使用哪一個流程範本時,此文字會出現在 [新增 Team 專案精靈] 的 [選取流程範本] 畫面上。 一般而言,請試著描述在小組大小、長度、成本與其他因素方面,此流程範本適用於哪種專案。

  3. 外掛程式: 您可以使用 pluginsplugin 項目定義流程範本所使用的外掛程式集合。 您必須確定所有附屬的 XML 檔案都參考出現在此清單中的外掛程式。 您也必須指定 wizardPage 屬性 (true 或 false 值) 來指出外掛程式在 [新增 Team 專案精靈] 上是否需要一個頁面。 您必須指定將在建立 Team 專案時處理的外掛程式集合,以及外掛程式在 [新增 Team 專案精靈] 中是否應該有一個可見的頁面。

    以下 XML 示範 Visual Studio Application Lifecycle Management (ALM) 隨附的九個外掛程式分別需要使用什麼值才正確。

    <plugins>   <plugin name="Microsoft.ProjectCreationWizard.Classification" wizardPage="false"/>   <plugin name="Microsoft.ProjectCreationWizard.Reporting" wizardPage="false"/>   <plugin name="Microsoft.ProjectCreationWizard.Portal" wizardPage="true"/>   <plugin name="Microsoft.ProjectCreationWizard.Groups" wizardPage="false"/>   <plugin name="Microsoft.ProjectCreationWizard.WorkItemTracking" wizardPage="false"/>   <plugin name="Microsoft.ProjectCreationWizard.VersionControl" wizardPage="true"/>   <plugin name="Microsoft.ProjectCreationWizard.TestManagement" wizardPage="false" />   <plugin name="Microsoft.ProjectCreationWizard.Build" wizardPage="false" />   <plugin name="Microsoft.ProjectCreationWizard.Lab" wizardPage="false" /></plugins>
    
  4. 工作群組: 您可以使用 groupsgroup 項目定義工作群組。 每個工作群組都會定義處理每個外掛程式所需的資訊。 每個工作群組都會指定包含要處理之工作集合的檔案,以及此群組對於其他工作群組所擁有的選擇性相依性。 最常見而且最簡單的策略,就是每個群組、每個外掛程式建立一個 taskList 項目。

    以下範例示範某工作群組如何建立預設群組和權。 這些特定工作是在所參考的檔案 (GroupsandPermissions.xml) 中定義。 此工作群組對於 Classification 群組中的工作能夠成功完成具有相依性。

    <group id="Groups" description="Create groups and assign permissions." completionMessage="Groups created and permissions assigned.">   <dependencies>      <dependency groupId="Classification" />   </dependencies>   <taskList filename="Groups and Permissions\GroupsandPermissions.xml" /></group>
    

    您可以針對每個工作群組,定義下列資訊:

    1. ID: 指派給外掛程式的唯一識別碼。

    2. 描述: 在 [新增 Team 專案精靈] 中描述外掛程式工作的文字。

    3. 完成訊息: 當外掛程式的所有工作成功完成時,出現在 [新增 Team 專案精靈] 中的訊息。

    4. (選擇性) 失敗訊息: 當外掛程式的一個或多個工作無法完成時,出現在 [新增 Team 專案精靈] 中的訊息。

    5. (選擇性) 外掛程式相依性: 您可以使用 dependenciesdependency 項目,針對要處理的外掛程式定義一組相依性。 相依性會對應到必須在可以處理目前的外掛程式工作之前,成功完成的外掛程式。

    6. 工作檔案: 您可以使用 tasklist 項目,指定包含要處理外掛程式之一組工作的檔案。

回到頁首

流程範本檔案範例

下列語法會列出 Microsoft Visual Studio Scrum 1.0 之 ProcessTemplate.xml 檔案的內容。 您可以從 Microsoft 網站的下列頁面存取此範本:Microsoft Visual Studio Scrum 1.0 (英文)。

<?xml version="1.0" encoding="utf-8"?>
<ProcessTemplate>
  <metadata>
    <name>Microsoft Visual Studio Scrum 1.0</name>
    <description>By using this template, you can organize and track the progress and health of a small-to-medium sized Scrum project.</description>
    <plugins>
      <plugin name="Microsoft.ProjectCreationWizard.Classification" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.Reporting" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.Portal" wizardPage="true" />
      <plugin name="Microsoft.ProjectCreationWizard.Groups" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.WorkItemTracking" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.VersionControl" wizardPage="true" />
      <plugin name="Microsoft.ProjectCreationWizard.TestManagement" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.Build" wizardPage="false" />
      <plugin name="Microsoft.ProjectCreationWizard.Lab" wizardPage="false" />
    </plugins>
  </metadata>
  <groups>
    <group id="Classification" description="Structure definition for the project." completionMessage="Project structure uploaded.">
      <dependencies></dependencies>
      <taskList filename="Classification\Classification.xml" />
    </group>
    <group id="Groups" description="Create groups and assign permissions." completionMessage="Groups created and permissions assigned.">
      <dependencies>
        <dependency groupId="Classification" />
      </dependencies>
      <taskList filename="Groups and Permissions\GroupsAndPermissions.xml" />
    </group>
    <group id="WorkItemTracking" description="Work item definitions uploading." completionMessage="Work item tracking tasks completed.">
      <dependencies>
        <dependency groupId="Classification" />
        <dependency groupId="Groups" />
      </dependencies>
      <taskList filename="WorkItem Tracking\WorkItems.xml" />
    </group>
    <group id="VersionControl" description="Creating version control." completionMessage="Version control task completed.">
      <dependencies>
        <dependency groupId="Classification" />
        <dependency groupId="Groups" />
        <dependency groupId="WorkItemTracking" />
      </dependencies>
      <taskList filename="Version Control\VersionControl.xml" />
    </group>
    <group id="Build" description="Build default processes uploading." completionMessage="Build default processes uploaded.">
      <dependencies>
        <dependency groupId="VersionControl" />
        <dependency groupId="Groups" />
      </dependencies>
      <taskList filename="Build\Build.xml" />
    </group>
    <group id="Lab" description="Creating Lab." completionMessage="Lab task completed.">
      <dependencies>
        <dependency groupId="Classification" />
        <dependency groupId="Groups" />
        <dependency groupId="WorkItemTracking" />
        <dependency groupId="Build" />
      </dependencies>
      <taskList filename="Lab\Lab.xml" />
    </group>
    <group id="TestManagement" description="Test Management default configurations uploading." completionMessage="Test Management default configurations uploaded.">
      <dependencies>
        <dependency groupId="Classification" />
        <dependency groupId="Groups" />
        <dependency groupId="WorkItemTracking" />
      </dependencies>
      <taskList filename="Test Management\TestManagement.xml" />
    </group>
    <group id="Reporting" description="Project reports uploading." completionMessage="Project reporting tasks completed.">
      <dependencies>
        <dependency groupId="Classification" />
        <dependency groupId="WorkItemTracking" />
        <dependency groupId="VersionControl" />
      </dependencies>
      <taskList filename="Reports\ReportsTasks.xml" />
    </group>
    <group id="Portal" description="Creating project portal site" completionMessage="Project portal tasks completed.">
      <dependencies>
        <dependency groupId="Classification" />
        <dependency groupId="Reporting" />
      </dependencies>
      <taskList filename="Windows SharePoint Services\WssTasks.xml" />
    </group>
  </groups>
</ProcessTemplate>

回到頁首

請參閱

概念

使用流程範本檔案

自訂流程範本

其他資源

ProcessTemplate XML 項目參考