next

abstract suspend fun next(input: StepInput = StepInput.None): StepResult

Drives the workflow forward by exactly one host-visible step. It is the only advancement mechanism.

A wrong input type for the current step is returned as StepResult.Failed with EngineError.InvalidNextInput — it is not thrown.

Cancelling the caller leaves work under way running, so a submit is never half sent. A scanner step still waiting for an Activity ends with it, though: nothing was sent, and the next call starts it again.