addRequestNotes
Purpose
This operation adds one or more notes into a request in PPM Center.
Function
This operation adds one or more notes into a specified request. The following fields can be specified for each note:
-
Author, which can be any string value and is displayed in the originally added
by entry. The value for the Note Author field is the user account used when you call the web service server.
-
Creation Date
-
Content
The notes are grouped into a daily bucket and displayed in date order. Request note cannot be edited or deleted once added.
Related Information
The following data type:
Input
The following inputs are required for this operation:
-
Request ID
-
Collection of one or more notes
Return
Upon success, the operation returns the ID of the request.
Java Interface
AddRequestNotesResponseDocument
addRequestNotes(AddRequestNotesDocument in)
Parameters |
Description |
---|---|
AddRequestNotesDocument |
Wrapper of the request ID and the Note[]. |
AddRequestNotesResponseDocument |
Wrapper of the return code of this operation. |
Java Examples
Example: add two notes to an existing request.
. . . private void addRequestNotes(String serviceURL, String requestId) throws Exception { . . . // construct the note array Note[] notes = new Note[2]; notes[0] = Note.Factory.newInstance(); notes[0].setAuthor("Admin"); notes[0].setCreationDate(Calendar.getInstance()); notes[0].setContent("Note 1 added thru web service"); notes[1] = Note.Factory.newInstance(); notes[1].setAuthor("Admin"); notes[1].setCreationDate(Calendar.getInstance()); notes[1].setContent("Note 2 added thru web service"); // get Webservice handle DemandServiceStub stub = new DemandServiceStub(ctx, serviceURL); // Construct message to send AddRequestNotesDocument inDoc = AddRequestNotesDocument.Factory.newInstance(); AddRequestNotesDocument.AddRequestNotes addNotes = inDoc.addNewAddRequestNotes(); addNotes.setRequestId(reqId); addNotes.setNotesArray(notes); . . . } }
Errors and Exceptions
Message Code |
Message |
Cause(s) |
Possible Corrective Action |
---|---|---|---|
KNTA-11186 |
Internal error has occurred while calling PPM Web Service. Contact PPM support with the detail information if the problem persists. (KNTA-11186) Details: Missing required element {http://mercury.com/ppm/dm/service/1.0}requestId |
Missing request ID |
Add the required request ID. |
N/A |
An error occurred when adding notes to request Error in loadAndLockRequest Open API Exception 9: Request with ID 30391 was not found in the system. Import was not performed |
Request ID not found |
Provide an existing request ID. |
N/A |
java.lang.NullPointerException |
Missing author, creation date or content |
Provide complete data (author, creation date and content). |
N/A |
java.lang.IllegalArgumentException: Array element null |
Note array element is not initialized or is null |
Initialize array element with a Note object that has complete data. |