code: @Override
    public void createAttachmentComment(String taskId, String processInstanceId, String attachmentName, boolean create) {
      if (isHistoryEnabled()) {
        String userId = Authentication.getAuthenticatedUserId();
        CommentEntity comment = getCommentEntityManager().create();
        comment.setUserId(userId);
        comment.setType(CommentEntity.TYPE_EVENT);
        comment.setTime(getClock().getCurrentTime());
        comment.setTaskId(taskId);
        comment.setProcessInstanceId(processInstanceId);
        if (create) {
          comment.setAction(Event.ACTION_ADD_ATTACHMENT);
        } else {
          comment.setAction(Event.ACTION_DELETE_ATTACHMENT);
        }
        comment.setMessage(attachmentName);
        getCommentEntityManager().insert(comment);
      }
    }
docs: /*
  (non-Javadoc)
  
  @see org.activiti.engine.impl.history.HistoryManagerInterface# createAttachmentComment(java.lang.String, java.lang.String, java.lang.String, boolean)