ProjectTeam Method

Description

The Service for Enterprise Data Maintenance (EDM) provides the ProjectTeam method to easily add, replace, update, or remove individual resources from an existing project team on Microsoft Office Project Server 2003.

ProjectTeam is designed to act on the entire team in one project. It does not require that resources exist in the Enterprise Resource Pool. If the resources are enterprise resources, the Service for EDM maps them to the Enterprise Resource Pool.

Note If a resource is on a team and is not included in the Resources list in the ProjectTeam request, that resource is removed from the project.

The Service for EDM ensures that, when the ProjectTeam request is completed, each resource in the request exists as a valid member of the team for the specified project. If any one of the project team alterations fails, no changes are made.

The Service for EDM makes changes in the following order:

  1. Resource replacements

  2. Deletion of existing resources that are not on the list within the <Resources> tag

  3. Addition of resources not currently in the project

Syntax

<Request>
   <ProjectTeam>
      <ProjectID></ProjectID>
      <ProjectName></ProjectName>
      <Replacements>
         <Resource>
            <Name></Name>
            <ReplacementName></ReplacementName>
         </Resource>
      </Replacements>
      <Resources>
         <Resource>
            <Name></Name>
            <Phonetic></Phonetic>
            <NTAccount></NTAccount>
            <EmailAddress></EmailAddress>
            <Type></Type>
            <IsGeneric></IsGeneric>
            <Initials></Initials>
            <Code></Code>
            <Group></Group>
            <WorkGroup></WorkGroup>
            <MaxUnits></MaxUnits>
            <PeakUnits></PeakUnits>
            <CanLevel></CanLevel>
            <AccrueAt></AccrueAt>
            <StandardRate></StandardRate>
            <StandardRateFormat></StandardRateFormat>
            <OvertimeRate></OvertimeRate>
            <OvertimeRateFormat></OvertimeRateFormat>
            <CostPerUse></CostPerUse>
         </Resource>
      </Resources>
   </ProjectTeam>
</Request>

Parameters

In general, the ProjectTeam syntax combines the PDS methods ProjectResourcesReplace, ProjectResourcesCreate, and ProjectResourcesDelete. See the topics of those PDS methods for parameter descriptions, with the following exceptions:

ProjectID* or *ProjectName

Either the ProjectID or the ProjectName is required. If ProjectID is specified, the Service for EDM uses the ProjectName value from the call to the ProjectsStatus method. If only the ProjectName is specified, the service gets the ProjectID value from ProjectsStatus.

ProjectName is the concatenation of the project identifier and version, separated by a period (for example, TestProject.Published).

Note The recommended practice is to use ProjectName if any project is checked out. If ProjectTeam includes only the ProjectID, and any project is checked out, the Service for EDM currently does not pass ProjectID to the PDS ProjectsStatus method.

Replacements

Optional. Calls ProjectResourcesReplace for each resource within the Replacements block. Replacement resources must be in the Enterprise Resource Pool.

Resources

Optional. Valid parameters for resources added to a project are the same as the parameters for creating enterprise resources using the PDS methods ResourcesAdd and ResourcesUpdate.

Note EUID is not a valid parameter within ProjectTeam, because Project Server maps resources by name to the Enterprise Resource Pool.

Return Value

The reply structure depends on the verbosity level and the request data. In general, the reply to a Service for EDM request shows a record of Conversations between the Service for EDM and the PDS.

AllSucceeded has a value of 0 (False) or 1 (True). One Conversation can include the record of one or more PDS requests and replies, and always ends with a Service for EDM <Summary with STATUS and HRESULT for that conversation.

A general reply with verbosity set to 2 shows all of the PDS requests and replies. If the verbosity is set to 1, the reply shows only the failed PDS requests.

<Reply>
   <AllSucceeded></AllSucceeded>
   <Conversations>
      <Conversation>
         <Request></Request>
         <Reply></Reply>
         <Summary>
            <STATUS></STATUS>
            <HRESULT></HRESULT>
         </Summary>
      </Conversation>
      <Conversation>
         <Request></Request>
         <Reply></Reply>
         <Request></Request>
         <Reply></Reply>
            -- can be multiple PDS requests and replies --
         <Summary>
            <STATUS></STATUS>
            <HRESULT></HRESULT>
         </Summary>
      </Conversation>
   </Conversations>
</Reply>

Remarks

To determine which PDS calls a specific Service for EDM request makes, set the verbosity level to 2 or 3 (see Configuring the Service for EDM).

The Service for EDM first calls the PDS ProjectsStatus method to confirm or get the ProjectID and ProjectName for subsequent calls, and to determine whether the project is checked out and the user has access permission. It can then call the following PDS methods, depending on the request:

ProjectsCheckout checks out the specified project using the full project name.

ProjectData gets the project data including all tasks, resources, and assignments.

ProjectResourcesBatch contains the necessary calls to ProjectResourcesReplace, ProjectResourcesDelete, and ProjectResourcesCreate.

ProjectResourcesReplace performs any resource replacements (if required).

ProjectResourcesCreate adds any new resources to the team (if required).

ProjectResourcesDelete deletes any existing resources from the team (if required).

ProjectsCheckin checks in the specified project.

ProjectViewTablesCreate publishes the project changes and synchronizes the views.

Any inconsistencies or failures result in failure of the entire call.