first
Starts the first saga step with "first do 'name' with { ... }" syntax.
Example:
first do "reserve-inventory" with { context ->
inventoryService.reserve(context.items)
}Content copied to clipboard
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)
}Content copied to clipboard