UNPKG

@node-ts/bus-workflow

Version:

A workflow engine for orchestrating logic flows in distributed applications.

38 lines 1.31 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.WorkflowData = exports.WorkflowStatus = void 0; const tslib_1 = require("tslib"); const inversify_1 = require("inversify"); var WorkflowStatus; (function (WorkflowStatus) { /** * The workflow is still active and has not yet finished */ WorkflowStatus["Running"] = "running"; /** * The workflow has completed and will not receive further messages */ WorkflowStatus["Complete"] = "complete"; /** * A pseudo status to indicate that changes to the current state should not be persisted */ WorkflowStatus["Discard"] = "discard"; })(WorkflowStatus = exports.WorkflowStatus || (exports.WorkflowStatus = {})); /** * A base workflow data definition to model and persist the state of a workflow throughout * its lifespan. */ let WorkflowData = class WorkflowData { constructor() { /** * Used to manage concurrency when storing the workflow data. This value is incremented * each time the data is persisted which keeps locking of data low. */ this.$version = 0; } }; WorkflowData = tslib_1.__decorate([ inversify_1.injectable() ], WorkflowData); exports.WorkflowData = WorkflowData; //# sourceMappingURL=workflow-data.js.map