Freigeben über


Customize global workflow

You define a global workflow when you want to maintain a set of work item fields that multiple types of work items share. If you use a global workflow, you can define fields and global lists that are available to all work item types in either a team project or a team project collection.

In this topic

  • Contents of a Global Workflow

  • Defining and Managing Global Workflow

  • Example Global Workflow XML File

Contents of a Global Workflow

You can define a global workflow in a similar way that you customize a work item type. To customize or create a global workflow, you define or modify an XML file.

Note

No global workflows are defined for any Microsoft Solutions Framework (MSF) process templates. However, when you install Team Foundation Server Extensions for Project Server, a global workflow is imported to the team project collections that you configure to participate in data synchronization. For more information, see Synchronize Team Foundation Server with Project Server.

A global workflow can contain the following elements:

  • FIELD (Definition). You can specify the definitions for fields and all qualifying and conditional rules for each field. These rules are contained within a FIELDS parent element.

  • GLOBALLIST. You can specify one or more global lists as part of the global workflow. These lists are contained within a GLOBALLISTS parent element.

If you specify a field that is not currently defined for the team project or the collection, the field is created when the global workflow is imported. You cannot change the properties of fields that have already been defined for a type of work item. For example, you cannot change the attributes that are associated with the friendly name, the reference name, or reporting by modifying the global workflow.

A global workflow cannot contain the following elements and definitions:

  • HELPTEXT. You cannot specify help text for a field.

  • WORKFLOW. You cannot specify a workflow that consists of states, transitions, and reasons. Workflow is always scoped to a type of work item.

  • FORM. You cannot specify the layout of the work item form because it is always scoped to a type of work item.

Global workflow elements belong to the https://schemas.microsoft.com/VisualStudio/2008/workitemtracking/globalworkflow namespace.

Back to top

Defining and Managing Global Workflow

Task

Topic

Look up the syntax of a global workflow element. You define global workflow by using the FIELD (Definition) and GLOBALLIST elements and their child elements.

Global Workflow XML Element Reference

Create, modify, export, or import a global workflow. You manage global workflow by using the following commands in the witadmin command-line tool:

  • exportglobalworkflow:  Exports the XML file that define a global workflow.

  • importglobalworkflow:  Imports the XML file that defines a global workflow.

Import and export global workflow [witadmin]

Back to top

Example Global Workflow XML File

The following example shows how you can define two fields within the global workflow by using the FIELD (Definition) element and its supported rule elements. For more information, see All FIELD XML elements reference.

<?xml version="1.0" encoding="utf-8"?>
<GLOBALWORKFLOW>
   <FIELDS>
      <FIELD name="Project Server Enterprise Project" refname="Microsoft.Sync.ProjSrv.ProjectName" type="String">
         <ALLOWEDVALUES not="[global]\Project Collection Service Accounts" expanditems="false">
            <LISTITEM value="PsProject" />
         </ALLOWEDVALUES>
         <DEFAULT not="[global]\Project Collection Service Accounts" from="value" value="PsProject" />
      </FIELD>
      <FIELD name="Project Server Requested Project GUID" refname="Microsoft.Sync.ProjSrv.RequestedProjGuid" type="GUID">
         <ALLOWEDVALUES not="[global]\Project Collection Service Accounts" expanditems="false">
            <LISTITEM value="3aabbaa9-f204-4748-897c-47904155bc61" />
         </ALLOWEDVALUES>
         <DEFAULT not="[global]\Project Collection Service Accounts" from="value" value="3aabbaa9-f204-4748-897c-47904155bc61" />
         <WHEN field="Microsoft.Sync.ProjSrv.ProjectName" value="PsProject">
            <ALLOWEDVALUES not="[global]\Project Collection Service Accounts" expanditems="false">
               <LISTITEM value="3aabbaa9-f204-4748-897c-47904155bc61" />
            </ALLOWEDVALUES>
            <COPY from="value" value="3aabbaa9-f204-4748-897c-47904155bc61" />
         </WHEN>
      </FIELD>
   </FIELDS>
</GLOBALWORKFLOW>

Back to top

See Also

Concepts

All FIELD XML elements reference