Copy as Markdown[View as Markdown](/docs/sdk/functions/writeFlowToSystem.md)

***

# Function: writeFlowToSystem()

> **writeFlowToSystem**(`directory`): (`flow`, `system`, `options`) => `Promise`<`void`>

Defined in: flows.ts:240

Write a flow to a system in EventCatalog.

## Parameters[​](#parameters "Direct link to Parameters")

| Parameter   | Type     |
| ----------- | -------- |
| `directory` | `string` |

## Returns[​](#returns "Direct link to Returns")

`Function`

### Parameters[​](#parameters-1 "Direct link to Parameters")

| Parameter           | Type                                                                      |
| ------------------- | ------------------------------------------------------------------------- |
| `flow`              | `Flow`                                                                    |
| `system`            | { `id`: `string`; `version`: `string`; }                                  |
| `system.id`         | `string`                                                                  |
| `system.version`?   | `string`                                                                  |
| `options`           | { `format`: `"md"` \| `"mdx"`; `override`: `boolean`; `path`: `string`; } |
| `options.format`?   | `"md"` \| `"mdx"`                                                         |
| `options.override`? | `boolean`                                                                 |
| `options.path`?     | `string`                                                                  |

### Returns[​](#returns-1 "Direct link to Returns")

`Promise`<`void`>
