diff --git a/src/trace/traceManager.js b/src/trace/traceManager.js index 6906938c1d..9cb741bb42 100644 --- a/src/trace/traceManager.js +++ b/src/trace/traceManager.js @@ -281,4 +281,16 @@ TraceManager.prototype.checkRequestedStep = function (stepIndex) { return undefined } +TraceManager.prototype.waterfall = function (calls, stepindex, cb) { + var ret = [] + var retError = null + for (var call in calls) { + call.apply(this, [stepindex, function (error, result) { + retError = error + ret.push({ error: error, value: result }) + }]) + } + cb(retError, ret) +} + module.exports = TraceManager