---
url: >-
  https://node-ts.github.io/bus/api/bus-test/classes/TestFunctionRoundTripWorkflowState.md
---
[API reference](../../index.md) / [@node-ts/bus-test](../index.md) / TestFunctionRoundTripWorkflowState

# Class: TestFunctionRoundTripWorkflowState

Defined in: [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:8](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L8)

The state of a workflow declared with `defineWorkflow`, with nested types, used to check that its state survives
a round trip through a persistence

## Extends

* [`WorkflowState`](../../bus-core/classes/WorkflowState.md)

## Constructors

### Constructor

```ts
new TestFunctionRoundTripWorkflowState(): TestFunctionRoundTripWorkflowState;
```

#### Returns

`TestFunctionRoundTripWorkflowState`

#### Inherited from

[`WorkflowState`](../../bus-core/classes/WorkflowState.md).[`constructor`](../../bus-core/classes/WorkflowState.md#constructor)

## Properties

| Property | Modifier | Type | Default value | Description | Overrides | Inherited from | Defined in |
| ------ | ------ | ------ | ------ | ------ | ------ | ------ | ------ |
| <a id="property-name"></a> `$name` | `public` | `string` | `TestFunctionRoundTripWorkflowState.NAME` | 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' | [`WorkflowState`](../../bus-core/classes/WorkflowState.md).[`$name`](../../bus-core/classes/WorkflowState.md#property-name) | - | [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:10](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L10) |
| <a id="property-status"></a> `$status` | `public` | [`WorkflowStatus`](../../bus-core/enumerations/WorkflowStatus.md) | `undefined` | Marks if the workflow is currently running or has ended | - | [`WorkflowState`](../../bus-core/classes/WorkflowState.md).[`$status`](../../bus-core/classes/WorkflowState.md#property-status) | bus-core/dist/workflow/workflow-state.d.ts:32 |
| <a id="property-version"></a> `$version` | `public` | `number` | `undefined` | 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. | - | [`WorkflowState`](../../bus-core/classes/WorkflowState.md).[`$version`](../../bus-core/classes/WorkflowState.md#property-version) | bus-core/dist/workflow/workflow-state.d.ts:28 |
| <a id="property-workflowid"></a> `$workflowId` | `public` | `string` | `undefined` | Unique identifier of the workflow state | - | [`WorkflowState`](../../bus-core/classes/WorkflowState.md).[`$workflowId`](../../bus-core/classes/WorkflowState.md#property-workflowid) | bus-core/dist/workflow/workflow-state.d.ts:23 |
| <a id="property-checkpoints"></a> `checkpoints` | `public` | `Date`\[] | `undefined` | - | - | - | [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:18](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L18) |
| <a id="property-customer"></a> `customer` | `public` | [`TestCustomer`](TestCustomer.md) | `undefined` | - | - | - | [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:16](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L16) |
| <a id="property-orderid"></a> `orderId` | `public` | `string` | `undefined` | - | - | - | [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:12](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L12) |
| <a id="property-startedat"></a> `startedAt` | `public` | `Date` | `undefined` | - | - | - | [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:14](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L14) |
| <a id="property-name-1"></a> `NAME` | `static` | `string` | `'@node-ts/bus-test/test-function-round-trip-workflow-state'` | - | - | - | [bus-test/src/helpers/test-function-round-trip-workflow-state.ts:9](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-test/src/helpers/test-function-round-trip-workflow-state.ts#L9) |
