docs: function waitForJob(wfapiUrl, jobUuid, cb) {
      assert.string(wfapiUrl, 'wfapiUrl');
      assert.string(jobUuid, 'jobUuid');
      assert.func(cb, 'cb');
  
      var client = restifyClients.createJsonClient({url: wfapiUrl, agent: false});
      pollJob(client, jobUuid, function (err, job) {
          if (err)
              return cb(err, job);
          var result = job.chain_results.pop();
          if (result.error) {
              var errmsg = result.error.message || JSON.stringify(result.error);
              return cb(new Error(errmsg), job);
          } else {
              return cb(null, job);
          }
      });
  }