Skip to content

API reference / @node-ts/bus-core / WorkflowState

Abstract Class: WorkflowState ​

Defined in: packages/bus-core/src/workflow/workflow-state.ts:22

A base workflow state definition to model and persist the state of a workflow throughout its lifespan.

Extended by ​

Constructors ​

Constructor ​

ts
new WorkflowState(): WorkflowState;

Returns ​

WorkflowState

Properties ​

PropertyModifierTypeDefault valueDescriptionDefined in
$nameabstractstringundefinedA unique name for the workflow state. This should be formatted in a namespace style, ie: 'company/application/workflow-name' eg: $name = 'node-ts/bus-core/my-workflow'packages/bus-core/src/workflow/workflow-state.ts:44
$statuspublicWorkflowStatusundefinedMarks if the workflow is currently running or has endedpackages/bus-core/src/workflow/workflow-state.ts:37
$versionpublicnumber0Used to manage concurrency when storing the workflow state. This value is incremented each time the data is persisted which keeps locking of data low.packages/bus-core/src/workflow/workflow-state.ts:32
$workflowIdpublicstringundefinedUnique identifier of the workflow statepackages/bus-core/src/workflow/workflow-state.ts:26

Released under the MIT License.