Decision
What a decide function concluded about a command: the events it produces, that it changes nothing, or that it rejects the command. A rejection is a business outcome the caller is told about; it writes nothing unless it carries events, which are appended with it (Rejected.events).
Return a Decision only when the function's return type cannot name its events: two kinds of event without a common sealed type, a domain event and a lifecycle event. A function that produces one kind returns that event (or E? for a no-op) and rejects with reject(code, message), which throws: the compiler then knows its events without @OnCommand(produces).
From Java: a decide function returns Decision.events(...), Decision.NoOp.INSTANCE or Decision.reject(code, message), statics of this interface. A Java decide function is plain, not suspend: it cannot call DecideScope.reserve (a suspend function), and a Java saga cannot call me.ahoo.wow.api.subscribe.SagaContext.call; the test DSL (wow-test) is Kotlin only, so a Java domain's tests are written in Kotlin. A Java facade and a blocking bridge for them are planned for 10.x.
Cases may be added in a minor release, so a when over it keeps an else branch.
Inheritors
Types
The command is refused for rejection, with the events it carries: ordinary events of the aggregate, each sourced by it, appended with the rejection in one stream, never a lifecycle event (the command fails instead). Without events nothing is appended; a rejection of a creation appends nothing either.