step
Alternative syntax: "step 'name' does { ... }"
This provides a more concise alternative to "first do / then do".
Example:
step "reserve-inventory" does { context ->
inventoryService.reserve(context.items)
}Content copied to clipboard
infix fun <C, R, S : Any> StatefulSagaBuilder<C, R, S>.step(name: String): StatefulStepActionBuilder<C, R, S>
Alternative syntax: "step 'name' does { ... }"
Example:
step "take-payment" does { cart ->
updateState { it.copy(amount = payment.amount) }
createTransaction(cart, payment)
}Content copied to clipboard