---
url: >-
  https://node-ts.github.io/bus/api/bus-core/interfaces/MessageWorkflowMapping.md
---
[API reference](../../index.md) / [@node-ts/bus-core](../index.md) / MessageWorkflowMapping

# Interface: MessageWorkflowMapping\<MessageType, WorkflowStateType>

Defined in: [packages/bus-core/src/workflow/message-workflow-mapping.ts:7](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-core/src/workflow/message-workflow-mapping.ts#L7)

A mapping definition between an incoming message and 0..\* workflow state instances in persistence.

## Type Parameters

| Type Parameter | Default type |
| ------ | ------ |
| `MessageType` *extends* [`Message`](../../bus-messages/classes/Message.md) | [`Message`](../../bus-messages/classes/Message.md) |
| `WorkflowStateType` *extends* [`WorkflowState`](../classes/WorkflowState.md) | [`WorkflowState`](../classes/WorkflowState.md) |

## Properties

| Property | Type | Description | Defined in |
| ------ | ------ | ------ | ------ |
| <a id="property-lookup"></a> `lookup` | (`message`, `attributes`) => `string` | `undefined` | A lookup function that resolves a value used to lookup workflow state | [packages/bus-core/src/workflow/message-workflow-mapping.ts:14](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-core/src/workflow/message-workflow-mapping.ts#L14) |
| <a id="property-mapsto"></a> `mapsTo` | keyof `WorkflowStateType` & `string` | The field in workflow state where the lookup value is matched against | [packages/bus-core/src/workflow/message-workflow-mapping.ts:22](https://github.com/node-ts/bus/blob/2e6cf65c27833b707ae31ee623cfb6343770f434/packages/bus-core/src/workflow/message-workflow-mapping.ts#L22) |
