getResourceParticipation
Purpose
This operation fetches participations of resources in various resource pools.
Function and Parameters
This operation returns an array of resource distribution groups from PPM Center according to a specified list of (maximum 1,000) resource IDs. The user performing this operation must have the following access grant:
-
View Resource
Required Fields:
Optional Fields: None
Limitations:
-
Maximum 1,000 ResourceReferences can be passed in a single invocation.
Related Information
setResourceParticipation - to set resource participations
Input
An array of ResourceReference.
Return
An array of ResourceParticipation.
Java Interface
GetResourceParticipationResponseDocument getResourceParticipation (GetResourceParticipationDocument in)
|
Parameters |
Description |
|---|---|
|
GetResourceParticipationDocument |
Wrapper array of resource references. (ResourceReference[]) |
|
GetResourceParticipationResponseDocument |
Wrapper for the resource participation array. (ResourceParticipationBean[]) |
Java Examples
Example: get resource participation.
/**
* This is a wrapper method around the
getResourceParticipation web service, which reads the
participation of
* resources in resource pools. This method handles the
details of creating the document, invoking the web service
* and unwrapping the response.
*
* @param participation Zero or more
ResourceParticipation objects, which encapsulate the
participation details
* for a resource.
* @throws Exception
*/
public ResourceParticipation[]
getResourceParticipation(ResourceReference[] resources) throws
Exception {
ResourceServiceStub service = new
ResourceServiceStub(ctx, RESOURCE_SERVICE);
GetResourceParticipationDocument getParticipationDoc =
GetResourceParticipationDocument.Factory.newInstance();
getParticipationDoc.addNewGetResourceParticipation().setResourc eArray(resources);
return
service.getResourceParticipation(getParticipationDoc).getGetRes
ourceParticipationResponse().getResourceParticipationArray();
}
/**
* Return a resource reference object with the given name
and ID.
*/
ResourceReference resourceRef(Long id, String name) {
ResourceReference ref =
ResourceReference.Factory.newInstance();
if (id != null) ref.setId(id.longValue());
ref.setName(name);
return ref;
}
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. |
See above for list of access grants required for this operation. |
|
error.ws.maxResources |
The maximum number of resource to process in a single web service transaction may not exceed 1000. |
The number of resource exceeds 1,000. |
Break up the list of resource into smaller chunks and process over multiple transactions. |

