effectKey

fun effectKey(block: suspend (C, S) -> String): StatefulSagaBuilder<C, R, S>

Attach an effect-key lambda to the current step.

The lambda receives the current context C and the pre-step saga state S and must return a non-blank string that uniquely identifies the step's side effect within a run. Blank keys are rejected at Intent-append time with IllegalStateException.

Must be called after step.

Return

This builder for method chaining.

Parameters

block

Lambda that computes the effect-key from context and state.

Throws