flowed
Version:
A fast and reliable flow engine for orchestration and more uses in *Node.js*, *Deno* and the browser
26 lines • 882 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.FlowPausing = void 0;
const types_1 = require("../../types");
const flow_state_1 = require("./flow-state");
class FlowPausing extends flow_state_1.FlowState {
getStateCode() {
return types_1.FlowStateEnum.Pausing;
}
paused(error) {
this.setState(types_1.FlowStateEnum.Paused);
if (error) {
this.log({ n: this.runStatus.id, m: 'Flow paused with error.', e: 'FP' });
this.execFinishReject(error);
}
else {
this.log({ n: this.runStatus.id, m: 'Flow paused.', e: 'FP' });
this.execFinishResolve();
}
}
postProcessFinished(error, _stopFlowExecutionOnError) {
this.runStatus.state.paused(error);
}
}
exports.FlowPausing = FlowPausing;
//# sourceMappingURL=flow-pausing.js.map