addPortfolioContent
Purpose
This operation adds one or more proposals/projects and assets to a parent portfolio.
Function
You can use this operation to add a set of content (proposals, projects, or assets) to a parent portfolio.
Limitations
The maximum number of proposal/projects and assets that can be added to a parent is 1000.
Related Information
The following related operation
Input
The following fields are required:
-
The ID of the parent portfolio
-
An array of request IDs of proposals/projects and assets
Return
This operation does not return any data.
Java Interface
AddPortfolioContentResponseDocument
addPortfolioContent(AddPortfolioContentDocument in)
Parameters |
Description |
---|---|
AddPortfolioContentDocument |
Wrapper for the input of this operation. The input includes the following fields:
|
Java Examples
public void testAddPortfolioContent(long portfolioId, long[] ids) throws Exception { System.out.println("testAddPortfolioContent started ..."); PortfolioServiceStub PFM = new PortfolioServiceStub(ctx, WSURL); AddPortfolioContentDocument addContentDoc = AddPortfolioContentDocument.Factory.newInstance(); AddPortfolioContent content = addContentDoc.addNewAddPortfolioContent(); content.setPortfolioId(portfolioId); content.setRequestIdsArray(ids); PFM.addPortfolioContent(addContentDoc); System.out.println("testAddPortfolioContent completed"); }
Errors and Exceptions
When an error occurs on this operation, you will see a description of the root cause in the server log or in the response message:
The server log content is similar to the following:
Exception in thread "main" org.apache.axis2.AxisFault: <exception:exceptionDetails xmlns:exception="http:// www.mercury.com/ppm/ws/exception"> <exception:detail>[root cause description] </exception:detail> </exception:exceptionDetails>
Possible root cause descriptions:
Message Code |
Message |
Cause(s) |
Possible Corrective Action |
---|---|---|---|
exception.authorization |
You do not have the privilege to take this action. Please consult your PPM Administrator. |
You are not authorized to create a portfolio. |
Check the user licenses and privileges (access grants) |
com.mercury.itg.pfm.service.PFMDataValidationException |
One or more of the requests you specified are not valid portfolio content. |
One of the following causes:
|
Check the request IDs of the contents. |
com.mercury.itg.pfm.service.PFMDataValidationException |
One or more of the portfolio managers do not exist in PPM |
One or more of the specified usernames do not exist in PPM Center. |
Check the usernames. |
com.mercury.itg.exceptions.ObjectNotFoundException |
Cannot load the {0} with the specified id: {1}. {0} may be deleted by another user. |
A portfolio with the specified name or ID cannot be found. |
Check the parent portfolio name or ID. |