undo

infix fun undo(compensation: suspend (R) -> Unit): SagaStepConfiguration<C, R>

Defines compensation logic with "and undo { ... }" syntax (suspend function).

Example:

and undo { result -> inventoryService.release(result.id) }