first

Starts the first saga step with "first do 'name' with { ... }" syntax.

Example:

first do "reserve-inventory" with { context ->
inventoryService.reserve(context.items)
}

Starts the first saga step with "first do 'name' with { ... }" syntax.

Example:

first `do` "take-payment" with { cart ->
updateState { it.copy(amount = payment.amount) }
createTransaction(cart, payment)
}