code: @Override
      protected void doHandle(CommandContext ctx) throws CommandFormatException {
  
          boolean result = ctx.getBatchManager().discardActiveBatch();
          if(!result) {
              throw new CommandFormatException("There is no active batch to discard.");
          }
      }
docs: /* (non-Javadoc)
  @see org.jboss.as.cli.handlers.CommandHandlerWithHelp#doHandle(org.jboss.as.cli.CommandContext)