runEvent

suspend fun runEvent(eventSchema: EventSchema, data: Any? = null)

Builds a fresh EventRunningScope for eventSchema — wired to this manager's own screenId, koinScope, and every collaborator attached via the attach* methods above, plus this EventManager itself (so the scope's own onTrigger/runEventInline/runEventsInline can recurse back through runEvent) — and dispatches to the dev.catbit.mosaic.client.ui.sdui.foundation.events.EventRunner registered for eventSchema's concrete class, via eventRunnerManager.

The whole call is wrapped in runSafely: an exception thrown anywhere inside the runner (one that isn't already caught and turned into an onFailure trigger by the runner itself) is logged and swallowed here rather than propagating — so one failing event doesn't crash the screen or abort whatever chain called it.

Parameters

eventSchema

the event to run.

data

value passed as eventSchema's own incomingData. null when nothing is forwarded.