Bagikan melalui


TRANSITION Element

You use the TRANSITION element to specify a valid progression or regression from one state to another for a type of work item. The TRANSITION element is a required child element of the TRANSITIONS element.

Schema Hierarchy

WITD

    WORKITEMTYPE

        WORKFLOW

            TRANSITIONS

                TRANSITION

<xs:element name="TRANSITION" type="Transition" maxOccurs="unbounded"/>

<TRANSITION from="NameOfStartingState" to="NameOfEndingState" for="UserGroupName" not="UserGroupName">
    <ACTIONS> . . . </ACTIONS>
    <REASONS> . . . </REASONS>
    <FIELDS> . . . </FIELDS>
</TRANSITION>

Attributes and Elements

The following sections describe attributes, child elements, and parent elements.

Attributes

Attribute

Description

from

Required. The name of the state from which the work item is transitioning.

to

Required. The name of the state to which the work item is transitioning.

for

Transition attribute.

Optional. The name of a user or group who is allowed to perform the transition.

not

Transition attribute.

Optional. The name of a user or group who is restricted from performing the transition.

Child Elements

Element

Description

ACTIONS

Optional. Defines a collection of ACTION elements that each define an action string that can be used when calling the WorkItem.GetNextState method to get the post-action state of the work item.

REASONS

Required. A collection of DEFAULTREASON and REASON elements that define valid reasons the work item can complete the transition.

FIELDS (Workflow)

Optional. A collection of FIELD (Workflow) elements that reference the field definitions that are defined for the type of work item.

Parent Elements

Element

Description

TRANSITIONS

Required. A collection of TRANSITION elements that define the valid state transitions for the work item type.

Remarks

TRANSITION is a required child element of TRANSITIONS.

You must define exactly one transition to move the work item from nothing (from="") to a named state such as Active. This transition identifies the default state for a new work item.

minOccurs="1"

maxOccurs="unbounded"

Example

<TRANSITION from="Active" to="Resolved">
   . . .
   <REASONS>
      <DEFAULTREASON value="Fixed"/>
      <REASON value="Deferred"/>
      <REASON value="Duplicate"/>
      <REASON value="As Designed"/>
      <REASON value="Unable to Reproduce"/>
      <REASON value="Obsolete"/>
   </REASONS>
   . . .
</TRANSITION>

See Also

Concepts

Designing the Workflow

Other Resources

Defining and Customizing Work Item Workflow

Change History

Date

History

Reason

January 2011

Moved syntax to the top of the topic, removed links to topics that have been removed, and removed information about the schema.

Information enhancement.