docs: @Override
      protected void doHandle(CommandContext ctx) throws CommandLineException {
  
          final boolean v = verbose.isPresent(ctx.getParsedCommandLine());
  
          final OperationResponse response;
          boolean failed = false;
          boolean hasFile = file.getValue(ctx.getParsedCommandLine()) != null;
          try {
              final ModelNode request = buildRequest(ctx);
              OperationBuilder builder = new OperationBuilder(request, true);
              for (String path : getAttachments(ctx).getAttachedFiles()) {
                  builder.addFileAsAttachment(new File(path));
              }
              final ModelControllerClient client = ctx.getModelControllerClient();
              try {
                  response = client.executeOperation(builder.build(), OperationMessageHandler.DISCARD);
              } catch(Exception e) {
                  throw new CommandFormatException("Failed to perform operation: " + e.getLocalizedMessage());
              }
              if (!Util.isSuccess(response.getResponseNode())) {
                  String msg = formatBatchError(ctx, response.getResponseNode());
                  if (msg == null) {
                      msg = Util.getFailureDescription(response.getResponseNode());
                  }
                  throw new CommandFormatException(msg);
              }
  
              ModelNode steps = response.getResponseNode().get(Util.RESULT);
              if (steps.isDefined()) {
                  // Dispatch to non null response handlers.
                  final Batch batch = ctx.getBatchManager().getActiveBatch();
                  int i = 1;
                  for (BatchedCommand cmd : batch.getCommands()) {
                      ModelNode step = steps.get("step-" + i);
                      if (step.isDefined()) {
                          if (cmd.getResponseHandler() != null) {
                              cmd.getResponseHandler().handleResponse(step, response);
                          }
                          i += 1;
                      }
                  }
              }
  
          } catch(CommandLineException e) {
              failed = true;
              if (hasFile) {
                  throw new CommandLineException("The batch failed with the following error: ", e);
              } else {
                  throw new CommandLineException("The batch failed with the following error "
                          + "(you are remaining in the batch editing mode to have a chance to correct the error)", e);
              }
          } finally {
              // There is a change in behavior between the file and the added command
              // With a file, the batch is discarded, whatever the result.
              if (hasFile) {
                  ctx.getBatchManager().discardActiveBatch();
              } else if (!failed) {
                  if (ctx.getBatchManager().isBatchActive()) {
                      ctx.getBatchManager().discardActiveBatch();
                  }
              }
          }
  
          if(v) {
              ctx.printDMR(response.getResponseNode());
          } else {
              ctx.printLine("The batch executed successfully");
              super.handleResponse(ctx, response.getResponseNode(), true);
          }
      }