@rudderstack/workflow-engine
Version:
A generic workflow execution engine
24 lines • 971 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CustomInputStepExecutor = void 0;
const composable_1 = require("./composable");
/**
* CustomInputStepExecutor customizes the input and
* then invokes step executor with the new input.
*/
class CustomInputStepExecutor extends composable_1.ComposableStepExecutor {
constructor(inputTemplateExecutor, nextExecutor) {
super(nextExecutor);
this.inputTemplateExecutor = inputTemplateExecutor;
}
async prepareData(input, executionBindings) {
const result = await this.inputTemplateExecutor.execute(input, executionBindings);
return result.output;
}
async execute(input, executionBindings) {
const customInput = await this.prepareData(input, executionBindings);
return super.execute(customInput, executionBindings);
}
}
exports.CustomInputStepExecutor = CustomInputStepExecutor;
//# sourceMappingURL=custom_input.js.map