docs: protected void addChild(ElementBase child, boolean doEvent) {
          if (!child.canAcceptParent(this)) {
              CWFException.raise(child.rejectReason);
          }
          
          if (!canAcceptChild(child)) {
              CWFException.raise(rejectReason);
          }
          
          if (doEvent) {
              beforeAddChild(child);
          }
          
          if (child.getParent() != null) {
              child.getParent().removeChild(child, false);
          }
          
          children.add(child);
          child.updateParent(this);
          
          if (doEvent) {
              afterAddChild(child);
          }
      }