# `AshWorkflow.Charts.Graph.Edge`
[🔗](https://github.com/team-alembic/ash_workflow/blob/v0.12.0/lib/ash_workflow/charts/graph/edge.ex#L1)

One way a record can move from one step to another, as
`AshWorkflow.Charts.Graph.build/2` gives it to a chart backend.

`kind` says what moves the record, and `name` says which declaration:

* `:transition` — a caller runs the transition `name`. `label` is its name.
* `:on_success` — the step's action `name` succeeds. `label` is the action's
  name.
* `:on_error` — the step's action `name` fails. `label` is `on_error`.
* `:on_signal` — the signal `name` arrives. `label` is the signal's name.
* `:timeout` — the timeout `name` fires. `label` is its deadline, such as
  `after 7 days` or `at offer_expires_at`.
* `:undo` — the generated `undo` action rewinds the move from `to` to
  `from`. `label` is `undo`.

`condition` is the route's `when` expression as text, for one route of a
conditional transition or a conditional `on_success`, and `nil` for an edge
without a condition. `fallback?` is `true` for the last route of a
conditional `on_success` when that route has no `when`: it is taken only
when no earlier route matched, so a backend draws it as "otherwise", not as
a route that is always taken.

# `kind`

```elixir
@type kind() :: :transition | :on_success | :on_error | :on_signal | :timeout | :undo
```

# `t`

```elixir
@type t() :: %AshWorkflow.Charts.Graph.Edge{
  condition: String.t() | nil,
  fallback?: boolean(),
  from: atom(),
  kind: kind(),
  label: String.t(),
  name: atom(),
  to: atom()
}
```

---

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