LinearOnboardingState

Where a run is. Either not yet started, paused on a step, or finished (completed or skipped).

Inheritors

Types

Link copied to clipboard

Reached by running past the last step of the top plan. result is the root plan's outcome, such as a query to launch when handing off to the browser, or null. This state is terminal.

Link copied to clipboard
data class InProgress(val rootPlanId: LinearOnboardingPlanId, val currentPlan: LinearOnboardingPlan, val currentStepIndex: Int) : LinearOnboardingState.Started

Paused on currentStep, the currentStepIndex-th step of currentPlan, waiting for the next event. currentPlan is the frame on top of the stack and may be a side plan. rootPlanId is the root plan.

Link copied to clipboard
Link copied to clipboard

Reached through LinearOnboardingTransition.AbortPlan, which clears the whole frame stack. This state is terminal.

Link copied to clipboard

A run that has started, whether in progress or finished. rootPlanId is the id of the root plan, the one at the bottom of the stack. It stays the same across side plans, so a consumer can scope to a single flow no matter which step is current.