code: @Override
      protected void doHandle(CommandContext ctx) throws CommandLineException {
  
          final ModelNode request = buildRequest(ctx);
          Attachments attachments = getAttachments(ctx);
          OperationBuilder builder = new OperationBuilder(request, true);
          for (String path : attachments.getAttachedFiles()) {
              builder.addFileAsAttachment(new File(path));
          }
          final ModelControllerClient client = ctx.getModelControllerClient();
          final OperationResponse operationResponse;
          try {
              operationResponse = client.executeOperation(builder.build(), OperationMessageHandler.DISCARD);
          } catch (Exception e) {
              throw new CommandLineException("Failed to perform operation", e);
          }
          try {
              final ModelNode response = operationResponse.getResponseNode();
              if (!Util.isSuccess(response)) {
                  throw new CommandLineException(Util.getFailureDescription(response));
              }
              handleResponse(ctx, operationResponse, Util.COMPOSITE.equals(request.get(Util.OPERATION).asString()));
              operationResponse.close();
          } catch (IOException ex) {
              throw new CommandLineException("Failed to perform operation", ex);
          }
      }
docs: /* (non-Javadoc)
  @see org.jboss.as.cli.handlers.CommandHandlerWithHelp#doHandle(org.jboss.as.cli.CommandContext)