> ## Documentation Index
> Fetch the complete documentation index at: https://nestcrate.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# nestrs-workflows API

> Reference for WorkflowsModule, WorkflowsService, WorkflowInstance, and approval waits.

Crate: [`nestrs-workflows`](https://docs.rs/nestrs-workflows/1.7.1) · Feature: `workflows` · Guide: [Workflows](https://nestcrate.dev/ecosystem/workflows.md)

```toml theme={null}
nestrs-workflows = "1.7.1"
```

## `WorkflowsModule::register`

Exports `WorkflowsService`.

## `WorkflowsService`

```rust theme={null}
pub async fn start(&self, name: &str, input: Value) -> WorkflowInstance
pub async fn get(&self, id: &str) -> Option<WorkflowInstance>
pub async fn complete_step(&self, id: &str, step: &str, result: Value)
    -> Result<WorkflowInstance, String>
pub async fn wait_for_approval(&self, id: &str) -> Result<WorkflowInstance, String>
pub async fn approve(&self, id: &str) -> Result<WorkflowInstance, String>
```

## `WorkflowInstance`

Contains `id`, workflow `name`, `input`, `steps: HashMap<String, Value>`, and `status: WorkflowStatus`.

## `WorkflowsOptions`

`store: SharedWorkflowStore` — default `InMemoryWorkflowStore::shared()`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.