call
Defines a saga step with "call 'name' with { ... }" syntax.
This is the preferred alternative to backtick-escaped do keyword.
Example:
first call "reserve-inventory" with { context ->
inventoryService.reserve(context.items)
} otherwise { result ->
inventoryService.release(result.id)
}Content copied to clipboard
Defines a saga step with enum-based name: "call StepEnum.STEP with { ... }" syntax.
This provides type-safe step identification using enums instead of strings. The enum instance is preserved and can be retrieved via stepAs<E>() on events.
Example:
enum class OrderSteps { RESERVE, CHARGE, SHIP }
first call OrderSteps.RESERVE with { context ->
inventoryService.reserve(context.items)
}Content copied to clipboard