handleEvent

suspend fun handleEvent(event: Event): EitherNel<EventHandlingError, List<BusinessObject>>

Attempts to handle the given event by applying it to the BusinessObject to which it is targeted. If the event is successfully applied, the affected BusinessObjects are stored/updated in the BusinessObjectStore and the event is stored in the EventStore. If the event is not successfully applied, the event is not stored and the BusinessObjects are not updated.

Return

A List of BusinessObjects that were affected by the event if the operation was successful

A List of EventHandlingErrors if the operation was not successful