with

infix suspend fun <C, R, S : Any> ResumeId<C, R, S>.with(ctx: C): ResumeOutcome<R, S>

Second half of the saga resume "id" with ctx DSL chain.

Calls the typed saga.resume(RunId(id), ctx) extension and returns its outcome.

This function is suspend infix — it must be called from a coroutine scope. The infix modifier is fully compatible with suspend in Kotlin.

Usage

val outcome = saga resume "order-42" with context

Return

ResumeOutcome discriminated by journal state.

Parameters

ctx

The saga context forwarded to the resume call.