addDecider

fun addDecider(commandType: Class<*>, name: String, decider: DecideFunction<S>)

Adds the decide function of commandType. A decide function of a lifecycle command overrides the kernel's, to add domain rules to it: it decides the command's own lifecycle event (AggregateDeleted for DeleteAggregate) beside the aggregate's own events, NoOp or a rejection, and deciding another lifecycle event fails the command (LifecycleOverride). An override of RestoreAggregate is decided on a deleted aggregate as the kernel's is, so it takes no onDeleted. The schedule commands (wow.schedule.*) are the kernel's alone: a decide function schedules with DecideScope.schedule.