* @throws ApprovalRequestExecutionException
* @throws ApprovalException
*/
private void approve(final ApprovalData approvalData, final Approval approval) throws ApprovalRequestExpiredException, ApprovalRequestExecutionException, ApprovalException {
if(approvalData.haveRequestOrApprovalExpired()){
throw new ApprovalRequestExpiredException();
}
if(approvalData.getStatus() != ApprovalDataVO.STATUS_WAITINGFORAPPROVAL){
throw new ApprovalException("Wrong status of approval request.");
}
final int numberofapprovalsleft = approvalData.getRemainingapprovals() -1;