stateEvent
fun <S> stateEvent(ref: AggregateRef, state: S, vararg events: Any, version: Int = 1, commandType: String = ".Command", commandId: String = "command-", requestId: String = "request-", commitTime: Long = DEFAULT_START.toEpochMilli(), scope: Scope = Scope.NONE, causation: Causation? = null, headers: Map<String, String> = emptyMap(), operator: Operator? = null): StateEvent<S>
The commit of events at version of ref, leaving it in state, as a processor's handler receives it: the events of its own context as their classes, those of a stream it reads from another context as the classes of that context's api, or publishedEvents for those it has no class of at their revision. The command's ids default to command-<version> and request-<version>, and the commit time to DEFAULT_START.