private void saveNotes(
     String execIdentifier,
     Integer objectId,
     String notes,
     ObjNote objnote,
     String owner,
     String visibility,
     IEngUserProfile profile)
     throws Exception {
   logger.debug("IN");
   try {
     IObjNoteDAO objNoteDAO = DAOFactory.getObjNoteDAO();
     objNoteDAO.setUserProfile(profile);
     if (objnote != null) {
       // Modify note
       objnote.setContent(notes.getBytes());
       objnote.setIsPublic((visibility.equalsIgnoreCase("PUBLIC") ? true : false));
       objNoteDAO.modifyExecutionNotes(objnote);
     } else {
       // Insert new note
       objnote = new ObjNote();
       objnote.setContent(notes.getBytes());
       objnote.setExecReq(execIdentifier);
       objnote.setIsPublic((visibility.equalsIgnoreCase("PUBLIC") ? true : false));
       objnote.setOwner(owner);
       objNoteDAO.saveExecutionNotes(objectId, objnote);
     }
   } finally {
     logger.debug("OUT");
   }
 }