# `WorkflowStem.ExecutionStore`
[🔗](https://github.com/fosferon/workflow_stem/blob/main/lib/workflow_stem/execution_store.ex#L1)

In-memory execution store for the workflow stem.

Phase 3: this is intentionally simple and deterministic to support rapid iteration.
Persistence is introduced later via the persistence adapter.

Keyed by `execution_id` and stores `{tenant_id, workflow_handle, profile, runtime}`.

# `entry`

```elixir
@type entry() :: %{
  execution_id: WorkflowStem.Types.execution_id(),
  tenant_id: WorkflowStem.Types.tenant_id(),
  workflow_handle: WorkflowStem.Types.workflow_handle(),
  profile: WorkflowStem.Types.profile(),
  runtime: WorkflowStem.Types.runtime()
}
```

# `child_spec`

Returns a specification to start this module under a supervisor.

See `Supervisor`.

# `delete`

```elixir
@spec delete(WorkflowStem.Types.execution_id()) :: :ok
```

# `ensure_started`

```elixir
@spec ensure_started() :: :ok
```

# `fetch`

```elixir
@spec fetch(WorkflowStem.Types.execution_id()) ::
  {:ok, entry()} | {:error, :not_found}
```

# `list`

```elixir
@spec list(WorkflowStem.Types.tenant_id()) :: [entry()]
```

# `put`

```elixir
@spec put(entry()) :: :ok
```

# `update`

```elixir
@spec update(WorkflowStem.Types.execution_id(), (entry() -&gt;
                                             {:ok, entry()} | {:error, term()})) ::
  {:ok, entry()} | {:error, term()}
```

---

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