docs: function invoke(argv_, fn, msg) {
    var argv = argv_;
  
    if (_.isFunction(argv.getParams)) {
      argv = argv.getParams({});
    }
  
    if (argv.ra_file) {
      let jsonfile = argv.ra_file;
      argv = require(jsonfile);
    }
  
    var params    = {};
    params.params = _.omit(argv, 'args');
  
    _.each(argv.args, function(arg, n) {
      params.params['arg'+n] = arg;
    });
  
    var spec      = {};
    return ra.invoke(params, spec, fn, function(err) {
      var exitCode = 0;
  
      if (err) {
        exitCode = 1;
        console.error(err, "Error invoking: "+msg);
      }
  
      if (arguments.length === 1) {
        process.exit(exitCode);
        return;
      }
  
      if (arguments.length === 2) {
        if (_.isString(arguments[1])) {
          process.stdout.write(arguments[1]+'\n');
        } else {
          process.stdout.write(JSON.stringify(arguments[1])+'\n');
        }
        return;
      }
  
      /* otherwise */
      process.stdout.write(JSON.stringify(_.rest(arguments))+'\n');
      process.exit(exitCode);
    });
  }