AshWorkflow.Calculations.PendingDeadlines (AshWorkflow v0.6.0)

Copy Markdown View Source

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

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

What this is not

This is the schedule implied by the DSL and the record's current field values — field + fire_after, computed on read. It is not a record of what has already fired.

For a transition timeout that distinction does not arise: firing changes the state, so the deadline leaves the list. But a non-repeating action timeout does not change state, so its deadline keeps being derivable after it has fired, and it will still appear here with a due_at in the past. Read a past due_at as "was due", not "will fire".

A timeout whose field is nil on the record has no derivable deadline and is omitted.

Summary

Functions

describe(opts)

Callback implementation for Ash.Resource.Calculation.describe/1.

has_calculate?()

has_expression?()

Callback implementation for Ash.Resource.Calculation.has_expression?/0.

strict_loads?()

Callback implementation for Ash.Resource.Calculation.strict_loads?/0.