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

Defines a step's handler for a signal from an `Ash.Signals` module.

When the signal is emitted, the records in the step that `filter` or
`read_action` selects either move to `transition_to` or run `action`.
AshWorkflow generates the read action, the transition action, the
`signals_in` listener and its policy.

# `t`

```elixir
@type t() :: %AshWorkflow.Entities.OnSignal{
  __spark_metadata__: term(),
  action: atom() | nil,
  delivery: {module(), Keyword.t()} | nil,
  emits: [AshWorkflow.Entities.Emit.t()],
  filter: term() | nil,
  from: module() | nil,
  inputs: [{atom(), atom()}] | nil,
  name: atom(),
  read_action: atom() | nil,
  transition_to: atom() | nil
}
```

# `action_name`

```elixir
@spec action_name(atom(), t()) :: atom()
```

Name of the hidden transition action, scoped by step like
`AshWorkflow.Transformers.AddActions.timeout_action_name/2`.

# `attribute_schema`

# `listener_action`

```elixir
@spec listener_action(atom(), t()) :: atom()
```

The action the listener runs: the generated transition, or the handler's `action`.

# `listener_name`

```elixir
@spec listener_name(atom(), t()) :: atom()
```

Name of the `signals_in` listener, as `react_to_signal(..., only: ...)` takes it.

# `read_action_name`

```elixir
@spec read_action_name(atom(), t()) :: atom()
```

Name of the hidden read action that selects the records in the step.

# `transitions?`

```elixir
@spec transitions?(t(), [atom()]) :: boolean()
```

Whether the handler moves the record to another of `step_names`, and so
gets a generated transition action.

---

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