# `Dmn.Result`
[🔗](https://github.com/FeeJai/BDM/blob/dmn-v0.1.0/apps/dmn/lib/dmn/result.ex#L1)

What `Dmn.evaluate_all/4` gives: the values of the decisions that were asked for, and the diagnostics of every element that was run.

| Field | Is |
| ----- | -- |
| `values` | the value of each decision asked for, by the name it was asked for by |
| `diagnostics` | the `Dmn.Diagnostic`s of the run, in the order the elements ran, each with the element and the place in it; the errors of an element that could not be compiled are here too |
| `ran` | the keys of the elements that were run, in order |

# `t`

```elixir
@type t() :: %Dmn.Result{
  diagnostics: [Dmn.Diagnostic.t()],
  ran: [Dmn.Compiled.key()],
  values: %{optional(String.t()) =&gt; Feel.Value.t()}
}
```

# `diagnostics`

```elixir
@spec diagnostics(t(), String.t()) :: [Dmn.Diagnostic.t()]
```

The diagnostics of an element, by its key.

    iex> result = %Dmn.Result{diagnostics: [Dmn.Diagnostic.new(:error, :x, "x", element: "d1"), Dmn.Diagnostic.new(:info, :y, "y", element: "d2")]}
    iex> Enum.map(Dmn.Result.diagnostics(result, "d1"), & &1.code)
    [:x]

---

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