call

infix fun call(name: String): SagaStepWithBuilder<C, R>

Defines the next saga step with "then call 'name' with { ... }" syntax.

Example:

then call "charge-payment" with { context ->
paymentService.charge(context.amount)
} otherwise { result ->
paymentService.refund(result.transactionId)
}

infix inline fun <E : Enum<E>> call(step: E): SagaStepWithBuilder<C, R>

Defines the next saga step with enum-based name. The enum instance is preserved and can be retrieved via stepAs<E>() on events.