# `AshWorkflow.Calculations.PendingDeadlines`
[🔗](https://github.com/team-alembic/ash_workflow/blob/v0.12.0/lib/ash_workflow/calculations/pending_deadlines.ex#L1)

Ash calculation listing the timeouts and `every` entries still ahead of a
record in its current step, soonest first.

Each entry is a map with `:name`, `:due_at`, `:kind` (`:action`,
`:transition` or `:every`) and `:target` (the destination step for
transition timeouts, `nil` otherwise).

## What this is not

This is the schedule *implied* by the DSL and the record's current field
values — `field + fire_after`, or the `fire_at` field itself, computed on read.

A deadline leaves the list once it has fired. A transition timeout changes
the state when it fires. An action timeout does not, so its entry is omitted
while its `<step>_<timeout>_fired_at` column holds an instant at or after
its `due_at`. A timeout that is due but has not fired yet still appears with
a `due_at` in the past.

Firing an `every` writes its own last-fired column, so its `due_at` is
always the next instant it will run.

An `every` with `backoff` reports the grown gap, and one that has used up
its `max_fires` in the current step visit is omitted.

A timeout whose `field` is `nil` on the record has no derivable deadline and
is omitted. An `every` whose column is `nil` is different: it has never
fired, and its interval is measured from `state_entered_at` instead — see
`AshWorkflow.Entities.Every` — so its entry reports one whole interval after
the record entered the step, rather than being omitted.

# `describe`

# `has_calculate?`

# `has_expression?`

# `strict_loads?`

---

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