attempt

suspend fun attempt(ref: AggregateRef, work: suspend () -> Unit): Boolean

Runs work on ref: true when it succeeded, after which an entry parking ref is resolved; false when it failed in a way that skips the aggregate (skippable), which is then parked; any other failure is thrown, and the work stops there. A failure is not skipped without its entry: one the ledger does not take stops the work.