# `AshWorkflow.Entities.TransitionLog`
[🔗](https://github.com/team-alembic/ash_workflow/blob/v0.12.0/lib/ash_workflow/entities/transition_log.ex#L1)

Configures an opt-in transition log for a workflow.

When present, `AshWorkflow.Changes.RecordEvent` appends one row per workflow
event to `resource`, and the resource gains the `state_at/2` and `history/1`
code interface functions and a public `has_many :transitions` relationship to
`resource`. A `:transitions` relationship defined on the workflow resource
takes precedence.

The log resource itself is user-owned, not generated — see
`AshWorkflow.Verifiers.ValidateTransitionLog` for the schema it must satisfy.

# `t`

```elixir
@type t() :: %AshWorkflow.Entities.TransitionLog{
  __spark_metadata__: term(),
  belongs_to_actor: [AshWorkflow.Entities.BelongsToActor.t()],
  resource: module()
}
```

# `attribute_schema`

# `belongs_to_actor`

```elixir
@spec belongs_to_actor(t()) :: AshWorkflow.Entities.BelongsToActor.t() | nil
```

Returns the configured actor capture, or `nil` if none is configured.

# `recorded_actor`

```elixir
@spec recorded_actor(t(), term()) :: term()
```

Returns the actor a log row records for `actor`, or `nil` if it records none.

It is `nil` when no actor capture is configured, when `actor` is `nil`, and
when `skip_other_actors?` is set and `actor` is not a `destination` struct.

---

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