- SingleResult save (String sessionID,
RPMObject container, RPMObjectScope scope, ReloadType reloadtype)
The save method applies changes to the specified containers. The
save method starts by applying the changes to the specified container,
it then follows the objects linked to this container depending on the
scope parameter.
In the case that the delete flag of a container is set to true,
the save method deletes the specified container.
If there are errors during the save process, each error is
registered and sent back in the SaveResult.
Some containers have restrictions about their usage in the save
method. For details, refer to the container specific documentation in
chapter 5.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail with and will return an RPM
Exception.
- The parameter container,
defines the container to save. If the value of this parameter is null,
the method will fail and will return an RPM Exception.
- The parameter scope, defines
the linked objects that will be followed during the save method. If
the value of this parameter is null, only the specified container will
be saved and no links will be followed.
- The parameter reloadtype,
defines the type of reload performed during the save operation. It
affects the structure returned in the SingleResult.
Possible values are the following:
- None: This value denotes that the containers will
not be reloaded during the save call. The rpmObject returned in the SingleResult will be null.
- SavedResult: This value denotes that the saved
containers will be reloaded during the save call. The rpmObject
returned in the SingleResult will
correspond to the new version of the containers in the RPM database.
- ReloadResult: This value denotes that the save
method will reload all the containers, starting from the specified
container parameter, and will also follow all the specified scopes in
the scope parameter.
- Returns the SingleResult object. This object contains the
following information:
- boolean successful: A flag that indicates if the task was
successful or not.
- RPMObject rpmObject: The state of the container after the
save operation is performed. The objects contained in this field
depend on the specified reloadType parameter. Please note that the
order of the returned object arrays is not guaranteed to match the
order of the arrays that were saved.
- RPMException[] exceptions: An array containing all the
exceptions that occurred during the save operation.
- Result delete (String sessionID, RPMObject
container)
This method deletes an object from the RPM database.
If the delete call fails, it will throw an RPM Exception.
- The parameter sessionID, is the
session identifier obtained during the login call. If this parameter
is invalid, the method will fail and will return an RPM Exception.
- The parameter container, is the
container to delete. If this parameter is null, the method will fail
and will return an RPM Exception.
- ArrayResult loadFromXpath (String sessionID,
String XPath, RPMObjectScope scope)
This method performs a query to find a list of containers that
depend on the conditions specified in the XPath.
- The parameter sessionID, is the
session identifier obtained during the login call. If this parameter
is invalid, the method will fail and will return an RPM Exception.
- The parameter XPath, is a query
to be executed. Refer to section about XPaths in chapter 4 for
details. If the XPath query syntax is invalid, the method will fail
and return an RPM Exception.
- The parameter scope, indicates
which linked objects shall be loaded during the operation. If this
parameter is null, only the containers found by the query will be
loaded.
- Returns ArrayResult.rpmObjectList, the array of containers
that match the desired query.
- ArrayResult loadArrayFromID (String
sessionID, RPMObject[] rpmObjectArray, RPMObjectScope scope)
This method performs a query to find a list of containers using
their unique identifiers.
- The parameter sessionID, is the
session identifier obtained during the login call. If this parameter
is invalid, the method will fail and will return an RPM Exception.
- The parameter rpmObjectArray,
is an array of RPM Objects. The IDs of those containers must be set
before this method is called. If this parameter is invalid, the method
will fail and will return an RPM Exception.
- The parameter scope, indicates
which linked objects shall be loaded during the operation. If the
value of this parameter is null, only the containers found by the
query will be loaded.
- Returns ArrayResult.rpmObjectList, the array of reloaded
containers.
- SingleResult loadFromID(String sessionID,
RPMObject rpmObject, RPMObjectScope scope)
This method performs a query to find a specific container using
its unique identifier.
- The parameter sessionID, is the
session identifier obtained during the login call. If this parameter
is invalid, the method will fail and will return an RPM Exception.
- The parameter rpmObject, is the
container to be loaded. The ID of this container must be set before
this method is called. If this parameter is invalid, the method will
fail and will return an RPM Exception.
- The parameter scope, indicates
which linked objects are to be loaded during the operation. If the
value of this parameter is null, only the containers found by the
query will be loaded.
- Returns SingleResult.rpmObject, the loaded container.
- SingleResult assignScoreCard (String sessionID,
RPMObject objectToAssign, RPMObjectScope objectToAssignScope,
Scorecard scoreCardToAssign, ReloadType reloadType)
The assignScorecard method assigns a Scorecard object to an
RPMObject. There are three types of RPMObjects that are amenable for
scorecard assignment, Asset, GenericProject and AbstractScope and their subclasses.
You can also assign scorecards to their subclasses.
It is assumed for the assignment, that the Scorecard has already
been created and saved during the design phase and that the RPMObject
has already been saved. Once the scorecard has been assigned, any
changes to the Scorecard will not affect the AssignedScorecard.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail with and will return an RPM
Exception.
- The parameter objectToAssign
defines the container to save. If this parameter’s value is null,
the method will fail and return an RPM Exception.
- The parameter objectToAssignScope
defines the scope which defines the linked objects that will be loaded
during the assignScorecard method. If this parameter’s value is null,
only the specified container will be loaded after the assignment. It
is recommended to set the ScorecardScope structure in the
objectToAssignScope in order to load the AssignedScorecard.
- The parameter scorecardToAssign
defines the Scorecard to be assigned to the objectToAssign. This
should be a scorecard that has been saved with the same context as the
objectToAssign.
- The parameter reloadtype
defines the type of reload performed during the save operation. It
affects the structure returned in the SingleResult.
The possible values are:
- None: The containers will not be reloaded during
the save call. The rpmObject returned in the SingleResult will be
null.
- SavedResult: The saved containers will be reloaded
during the save call. The rpmObject returned in the SingleResult will
correspond to the new version of the containers in the RPM database.
- ReloadResult: The save method will reload all the
containers starting from the specified container parameter and follow
all the scopes specified in the scope parameter.
- Returns SingleResult object. SingleResult.rpmObject is the
objectToAssign after the assignment was completed
- SingleResult assignScoreCardToResource (String sessionID, GenericProject project,
Resource objectToAssign, ResourceScope objectToAssignScope,
Scorecard scoreCardToAssign, ReloadType reloadType)
The assignScoreCardToResource method assigns a Scorecard object to a
Resource. By comparison to the assignScoreCard method, it requires the GenericProject the
scorecard should be attached to. The Resource has a different scorecard for each project.
It is assumed for the assignment, that the Scorecard has already
been created and saved during the design phase and that the Resource
has already been saved. Once the scorecard has been assigned, any
changes to the Scorecard will not affect the AssignedScorecard. This method
returns a Resource which has its assignedScorecard field updated.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail with and will return an RPM
Exception.
- The parameter projectToRate defines
the GenericProject object for which the resource will be evaluated.
- The parameter objectToAssign
defines the container to save. If this parameter’s value is null,
the method will fail and return an RPM Exception.
- The parameter objectToAssignScope
defines the scope which defines the linked objects that will be loaded
during the assignScorecard method. If this parameter’s value is null,
only the specified container will be loaded after the assignment. It
is recommended to set the ScorecardScope structure in the
objectToAssignScope in order to load the AssignedScorecard.
- The parameter scorecardToAssign
defines the Scorecard to be assigned to the objectToAssign. This
should be a scorecard that has been saved with the same context as the
objectToAssign.
- The parameter reloadtype
defines the type of reload performed during the save operation. It
affects the structure returned in the SingleResult.
The possible values are:
- None: The containers will not be reloaded during
the save call. The rpmObject returned in the SingleResult will be
null.
- SavedResult: The saved containers will be reloaded
during the save call. The rpmObject returned in the SingleResult will
correspond to the new version of the containers in the RPM database.
- ReloadResult: The save method will reload all the
containers starting from the specified container parameter and follow
all the scopes specified in the scope parameter.
- Returns SingleResult object. SingleResult.rpmObject is the
objectToAssign after the assignment was completed
- SingleResult publishScorecard
(String sessionID, AssignedScorecard assignedScorecard,
AbstractScorecardScope scorecardScope)
The publishScorecard publishes an assignedScorecard. This
operation has two results, the assignedScorecard becomes available for
portfolio analysis and the assignedScorecard values are versioned which
allows a user to return to history assignedScorecard values and compare
versions. For more information refer to RPM's scorecard documentation.
A user can publish an assignedScorecard as many
times as desired, each publication marks new version. Once an
assignedScorecard is published, it will continue to be as such. The
assignedScorecard can be deactivated by a user, using the
AssignedScorecardState (for more information refer to
AssignedScorecardState documentation).
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPM
Exception.
- The parameter assignedScorecard
defines the assignedScorecard to publish
- The parameter assignedScorecardScope
is the scope that defines the assignedScorecard elements which will be
loaded and returned. If the value is set to null, only the
assignedScorecard will be loaded.
- Returns AssignedScorecard
object. SingleResult.rpmObject is the assignedScorecard after the
publication has been completed.
- SingleResult sendStaffingRequest(String
sessionID, GenericCommunicationScope scope, RPMObject attachment,
Resource [] recipients, String subject, String comments, Calendar
dueDate)
This function sends a staffing request to the
specified recipients.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPMException.
- The parameter scope identifies
the GenericCommunicationScope with which the StaffingRequest container
is reloaded.
- The parameter attachment
defines the RPMObject to be attached to the staffing request. The
attachment must be an instance of one of the following containers:
Project, Proposal. If this parameter is invalid, the method will fail
and return an RPMException.
- The parameter recipients
defines the resources to send the staffing request to. All of the
specified resources must be assigned to a pool as a resource manager.
If any of the resources do not exist, or the same resource is
specified twice, the method will fail and return an RPMException.
- The parameter subject defines
the subject of the staffing request. If this string exceed the maximum
250 characters, the method will fail and return an RPMException.
- The parameter comments defines
the comments to be included in the staffing request. If this string
exceed the maximum 3990 characters, the method will fail and return an
RPMException.
- The parameter dueDate defines
the deadline to respond to the staffing request.
- Returns SingleResult object.
This object contains the StaffingRequest sent, reloaded using the
specified GenericCommunicationScope. It also contains any exceptions
raised during the execution of this function.
- SingleResult sendWorkflowResponse(String sessionID,
WorkflowResponse response, WorkflowResponseScope scope)
This function sends a response to an existing
staffing request or workflow step notification.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPMException.
- The parameter scope identifies
the WorkflowReponseScope with which the WorkflowResponse container is
reloaded.
- The parameter response defines
the response to send to the staffing request or workflow step
notification. The response must be an existing response, obtained by
loading an existing StaffingRequest or WorkflowStepNotification
container with WorkflowResponse in scope. For staffing requests, the
only fields that need to be updated before calling this function are comments
and state. Comments must not exceed the maximum of 4095
characters, and state must be 'Accepted' or 'Rejected'. For workflow step
notifications, only comments, effort and response can be updated.
The value of effort can only be updated if hours can be logged against the task, as defined in the workflow process.
If the step is of type
"Checklist", then the response must set the complete flag of all ChecklistItems to true.
If the step is of type "Vote", then only a single VoteResponse and VoteResponseReason can
have the selected flag set to true.
If this parameter is invalid, the method will fail and return an RPMException.
- Returns SingleResult object.
This object contains the WorkflowResponse sent, reloaded using the
specified WorkflowResponseScope. It also contains any exceptions
raised during the execution of this function.
- SingleResult saveWorkflowResponse(String sessionID,
WorkflowResponse response, WorkflowResponseScope scope)
This function saves a response to an existing
workflow step notification of type checklist.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPMException.
- The parameter scope identifies
the WorkflowReponseScope with which the WorkflowResponse container is
reloaded.
- The parameter response defines
the response to send to the staffing request or workflow step
notification. The response must be an existing response, obtained by
loading an existing WorkflowStepNotification container with WorkflowResponse
in scope. Only comments and response can be updated.
Comments must not exceed the maximum of 4095 characters.
If this parameter is invalid, the method will fail and return an RPMException.
- Returns SingleResult object.
This object contains the WorkflowResponse saved, reloaded using the
specified WorkflowResponseScope. It also contains any exceptions
raised during the execution of this function.
- SingleResult updateReadAndFolder(String
sessionID, WorkflowResponse response, WorkflowResponseScope scope)
This function updates the read and folder
attributes of the workflow response.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPMException.
- The parameter scope identifies
the WorkflowReponseScope with which the WorkflowResponse container is
reloaded.
- The parameter response defines
the response to update. The response must be an existing response,
obtained by loading an existing StaffingRequest or
WorkflowStepNotification container with WorkflowResponse in scope. If
this parameter is invalid, the method will fail and return an RPMException.
- Returns SingleResult object.
This object contains the WorkflowResponse sent, reloaded using the
specified WorkflowResponseScope. It also contains any exceptions
raised during the execution of this function.
- Result transferUnderScope(String
sessionID, AbstractAggregateScope scopeElement, WorkElement
workElement)
This function transfers a workElement container under Scope.
Transfers must occur within the same project; a cross transfer under
scope is not valid.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPMException.
- The parameter scopeElement
identifies the AbstractAggregateScope to which the workElement should
be transferred. The abstractScope container must be previously saved
and its project field must be populated with a GenericProject that has
an ID. This can be achieved by reloading a saved abstractScope
container with the project in scope.
- The parameter workElement
identifies the WorkElement that should be transferred under the
abstractScope specified. The workElement must be previously saved.
WorkElements of type GenericProject cannot be transferred.
- Returns Result object. This
object contains any exceptions that were raised while performing the
transfer.
- Result transferUnderWBS(String
sessionID, WorkElement workElement, AbstractScope abstractScope)
This function transfers an AbstractScope container under WBS.
Once the AbstractScope is transferred, it becomes a SummaryTask
container in WBS. However, when AbstractTask.task is set to true,
then saved, the object becomes a Task. Once the object is transferred under
WBS, it becomes a Task, and not a SummaryTask.
If the workElement or the workElement's ID is null, the
abstractScope will be transferred under the abstractScope's WBS
Project root.
Transfers must occur within the same project; a cross transfer
without a move is not valid.
- The parameter sessionID defines
the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPMException.
- The parameter abstractScope
identifies the AbstractScope that should be transferred under WBS. The
abstractScope container must be previously saved and its project field
must be populated with a GenericProject that has an ID. This can be
achieved by reloading a saved abstractScope container with the project
in scope.
- The parameter workElement
identifies the WorkElement to which the abstractScope container should
be transferred.
- Returns Result object. This
object contains any exceptions that were raised while performing the
transfer.
- SingleResult
createObjectFromTemplate (String sessionID, RPMObject inputObject,
RPMObject templateObject, RPMObjectScope scope)
This generic function creates an object using a template. If
fields are set within the input object and are overwritten by the
corresponding template field, the method will not fail but will return
a warning indicating the fields in question.
The
inputObject and
the templateObject should not be
null, they should be valid
and an instance of the containers mentioned below, otherwise, the
method will fail and return an RPM Exception.
- GenericProject:
- Input: Proposal, Project, WorkOrganization
- Template: Proposal, Project, WorkOrganization
- WorkElement
- Input: Milestone, Task, SummaryTask, WorkProduct,
Deliverable
- Template: Milestone, Task, SummaryTask, WorkProduct,
Deliverable
- ScopeElement
- Input: Action, Issue, Requirement, Risk, ChangeRequest,
Defect, ServiceRequest
- Template: Action, Issue, Requirement, Risk, ChangeRequest,
Defect, ServiceRequest
- The parameter sessionID
defines the session identifier obtained during the login call. If this
parameter is invalid, the method will fail and return an RPM
Exception.
- The parameter inputObject
defines the object that will conform to the templateObject.
- The parameter templateObject
defines the object that will be used to modify the inputObject
- The parameter workElementScope
is the scope that defines the object element which will be loaded and
returned if the value is set to null.
- Returns SingleResult object. This object contains the
inputObject once all fields in the template have been applied to the
inputObject and any exceptions that were raised while performing the
changes.