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
| Property | Modifier | Type | Default value | Description | Defined in |
|---|---|---|---|---|---|
$name | abstract | string | undefined | A 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 |
$status | public | WorkflowStatus | undefined | Marks if the workflow is currently running or has ended | packages/bus-core/src/workflow/workflow-state.ts:37 |
$version | public | number | 0 | Used 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 |
$workflowId | public | string | undefined | Unique identifier of the workflow state | packages/bus-core/src/workflow/workflow-state.ts:26 |