LinearOnboardingOrchestrator
Drives one linear onboarding run at a time. It walks a LinearOnboardingPlan's steps, skips any whose LinearOnboardingStep.precondition is false, and publishes the current position as state. A step can branch by returning a LinearOnboardingTransition. LinearOnboardingTransition.SwitchTo pushes a side plan, and LinearOnboardingTransition.ReturnAndAdvance pops back to its caller.
It never touches UI. Renderers observe state and report user actions through onEvent.
Implementations are thread-safe and run calls one at a time. Step and plan callbacks run inside that same serialization, so they must not call back into startPlan or onEvent. A reentrant call throws IllegalStateException instead of deadlocking.
Properties
Where the run currently is. It starts as LinearOnboardingState.NotStarted, becomes LinearOnboardingState.InProgress on the first startPlan, and ends at LinearOnboardingState.Completed or LinearOnboardingState.Skipped. Starting again from a terminal state goes back to InProgress. Once a run has started it is never NotStarted again.
Functions
Passes event to the current step's LinearOnboardingStep.transition and applies the result. Does nothing before the run starts or after it ends.