# `WorkflowStem.Adapters.PersistenceAdapter`
[🔗](https://github.com/fosferon/workflow_stem/blob/main/lib/workflow_stem/adapters/persistence_adapter.ex#L1)

Interface adapter for execution persistence and checkpoint storage.

The stem runtime is shared across tenants; persistence must remain tenant-scoped.

# `get_execution`

```elixir
@callback get_execution(WorkflowStem.Types.tenant_id(), WorkflowStem.Types.execution_id()) ::
  {:ok, map()} | {:error, term()}
```

# `list_executions`

```elixir
@callback list_executions(WorkflowStem.Types.tenant_id(), map()) ::
  {:ok, [map()]} | {:error, term()}
```

# `save_checkpoint`

```elixir
@callback save_checkpoint(
  WorkflowStem.Types.tenant_id(),
  WorkflowStem.Types.execution_id(),
  map()
) ::
  {:ok, map()} | {:error, term()}
```

# `save_execution`

```elixir
@callback save_execution(WorkflowStem.Types.tenant_id(), map()) ::
  {:ok, map()} | {:error, term()}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
