addPositionLines

Purpose

This operation adds position lines to a staffing profile in PPM Center.

Function

This operation enables external applications to add position lines to a staffing profile in PPM Center identified by staffing profile ID. The operation returns the resultObjectType object.

To perform this operation, the user must meet the following conditions:

  • Have the edit staffing profile access grant

  • In the Staffing profile ACL list

  • Be the project manager and resource manager

Related information

The following data types:

Input

An array of positionLineType object.

Return

An array of resultObjectType object

Java Interface

public OperationResultWSBean[]
addPositionLines(PositionLineWSBean[] ids)

Parameters

Description

ids

Wrapper of the positionLineType object array

Java Examples

Example: adds position lines

private ResultObjectType[] addPositionLines(String
serviceURL, PositionLineType[] ids) throws Exception{
    ResultObjectType[] resultType = null;
    StaffingProfileServiceStub stub = new
StaffingProfileServiceStub(ctx, serviceURL);
    AddPositionLinesDocument inDoc =
AddPositionLinesDocument.Factory.newInstance();
    AddPositionLinesDocument.AddPositionLines addPL =
inDoc.addNewAddPositionLines();
    addPL.setPositionLineArray(ids);
    // Invoke web service
    AddPositionLinesResponseDocument outDoc =
stub.addPositionLines(inDoc);
    resultType =
outDoc.getAddPositionLinesResponse().getPositionIdArray();
    return resultType;
}

Errors and Exceptions

Possible root cause descriptions:

Message Code

Message

Cause(s)

Possible Corrective Action

exception.exceededThreshold

The web service call exceeds the threshold limit for processing. Please batch your updates

The number of position lines in one Web service call is limited to 50.

The web service call exceeds the threshold limit for processing

Reduce the number of position lines in the Web service call

exception.authorization

You do not have the privilege to take this action. Please consult your PPM Administrator

You do not have the required access grants for this operation

Verify that your account has the required access grants

exception.cannotLoadSP

Staffing profile id {0} does not exist

The staffing profile ID does not exist

Specify a different staffing profile ID

exception.cannotEditStaffingProfile

User cannot edit staffing profile {0}

You do not have the required access grants for this operation

Verify that your account has the required access grants

exception.cannotAssignResources

User cannot assign resources to position {0}

You are not the resource pool manager or resource manager

Verify that your account has the required access grants

exception.hasDuplicateAssignments

Position {0} has duplicate assignments in input XML

The input position has duplicate assignments in the Web service call

Specify a different assignment for the position

exception.hasDuplicateSkills

Position {0} has duplicate skills in input XML

The input position has duplicate skills in the Web service call

Specify a different skill for the position