AutoRegisteredStep

A base class for Steps that automatically register themselves into the global StepRegistry.

This is useful when you want to avoid manually invoking registerSteps {} and instead rely on instantiation to handle registration.

Example:

class FraudCheck : AutoRegisteredStep<RiskContext>() {
override val name = "FraudCheck"
override suspend fun execute(context: RiskContext): StepResult = ...
}

// Somewhere during initialization:
FraudCheck() // Automatically registers itself

⚠️ Use this class only when instantiating steps early during setup.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
abstract val name: String

The unique name of the step. Used for debugging, logging, and result tracking.

Functions

Link copied to clipboard
abstract suspend fun execute(context: C): StepResult

Executes the step logic using the given context.