OnStateEvent
Marks a function as a handler for state events, indicating that the function should be invoked when a state event is emitted. This annotation is used in conjunction with the OnMessage annotation to specify the type of message and default function name.
The value
parameter allows specifying one or more aggregate names to which this state event handler applies.
Examples:
@OnStateEvent
fun onStateEvent(changed: Changed, state: State) {
//...
}
Content copied to clipboard
Remote Context:
@OnStateEvent
fun onStateEvent(changed: Changed, stateRecord: StateRecord) {
val state = stateRecord.toState<StateData>()
//...
}
Content copied to clipboard
Author
ahoo wang