docs: public void onClose(CmmnActivityExecution execution) {
      String id = execution.getId();
      if (execution.isCaseInstanceExecution()) {
  
        if (execution.isClosed()) {
          throw LOG.alreadyClosedCaseException("close", id);
        }
  
        if (execution.isActive()) {
          throw LOG.wrongCaseStateException("close", id, "[completed|terminated|suspended]", "active");
        }
  
      } else {
        throw LOG.notACaseInstanceException("close", id);
      }
    }