getResourcePools

Purpose

This operation fetches resource pool objects in PPM Center based on the resource pool IDs.

Function and Parameters

This operation returns one or more resource pool objects according to a specified list of resource pool IDs from PPM Center. If no IDs are specified or if there are no resource pools with those IDs, no records are returned.

The user performing this operation must have one of the following access grants:

  • View Resource Pools

  • View All Resource Pools

  • Edit Resource Pool

  • Edit All Resource Pools

Required Fields:

  • Resource pool IDs

Optional Fields: None

Limitations

Performance might be an issue if more than a few thousand resource pools are read at once.

Input

Resource pool IDs

Return

An array of ResourcePool.

Java Interface

CreateResourcePoolsResponseDocument createResourcePools( CreateResourcePoolsDocument in)

Parameters

Description

GetResourcePoolsDocument

Wrapper array of resource pool IDs. To construct this parameter:

long [] ids;

GetResourcePoolsResponseDocument

Wrapper for the resource pool array. (WSResourcePoolBean[])

Java Examples

Example: read resource pools.

/**
 * This is a wrapper method around the getResourcePools web
service, which reads resource pools by ID. This
 * method handles the details of creating the document, invoking
the web service and unwrapping the response.
 *
* @param ids The primary keys of the resource pools to
retrieve.
* @return The resource pools that match the given primary
keys; primary keys that don't correspond to entities in the
database are silently ignored.
* @throws Exception
*/
ResourcePool[] getResourcePools(long[] ids) throws Exception {
    ResourceServiceStub service = new ResourceServiceStub(ctx,
WSURL);
GetResourcePoolsDocument getResourcePoolsDoc =
GetResourcePoolsDocument.Factory.newInstance();
GetResourcePools getResourcePools =
getResourcePoolsDoc.addNewGetResourcePools();
getResourcePools.setResourcePoolIdArray(ids);
GetResourcePoolsResponseDocument responseGet =
service.getResourcePools(getResourcePoolsDoc);
    debugPrint(responseGet, "get response");
    return
responseGet.getGetResourcePoolsResponse().getResourcePoolArray(
);
}

Errors and Exceptions

When an error occurs on this operation, you will see a description of the root cause in the log or in the response message:

The server log file 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. Consult your PPM Administrator.

You do not have the required access grants for this operation.

Verify that your account has the required access grants.