docs← Back to article

Markdown for LLMs

LDC-E1344 — Transition on a non-event name

The source Markdown for this article. Copy it into your assistant or download it as a text file.

Download this articlePlain text ↗
# LDC-E1344 — Transition on a non-event name

## What it means

A transition fires on a carrier: the `on` clause must name an event or
an action declaration, the only types that occur in a history. A name
that resolves to a relation, a constant, or anything else names no
carrier — the transition could never occur — so the compiler stops at
the name.

The repair is to declare the event or action, or to point the clause
at one that exists. A transition over a real carrier fires exactly when
its history says so.

## Example

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Tenant;
relation paid(t: Tenant) kind institutional;
procedure Review(t: Tenant) {
    state Open initial;
    state Closed terminal;
    transition Decide {
        from Open;
        to Closed;
        on paid;
    }
}
```

## Fix

```law
language "law.core" version "0.2";
package demo.diagnostics version "0.1.0";
namespace "urn:law:demo:diagnostics";

entity Tenant;
relation paid(t: Tenant) kind institutional;
event Filed {
    tenant: Tenant;
}
procedure Review(t: Tenant) {
    state Open initial;
    state Closed terminal;
    transition Decide {
        from Open;
        to Closed;
        on Filed;
    }
}
```

## Engine message

The engine reports this in its own wording:

```text
example.law:13:12: error LDC-E1344: transition: name `paid` in the `on` clause does not resolve to a §79 event declaration or a §80 action — no carrier of such a type exists, and the transition would not occur under any history (§160.1)
```

## Related

- [Procedures](/constructs/procedure/) — states, transitions, and what fires them.
- [LDC-E1343](/diagnostics/LDC-E1343/) — the fields an event constructor must set.