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;
if(numberofapprovalsleft < 0){
throw new ApprovalException("Error already enough approvals have been done on this request.");
}
approvalData.setRemainingapprovals(numberofapprovalsleft);
final Collection<Approval> approvals = approvalSession.getApprovals(approvalData);
approvals.add(approval);
approvalSession.setApprovals(approvalData, approvals);