Package net.jspcontrols.wizard.impl

Provides implementations of core wizard components: like state, transition and wizard controller.

See:
          Description

Class Summary
Wizard This class containts base implementation of wizard controller and handles wizard traversal.
WizardStep Represents a state of a wizard Finite State Machine (FSM).
WizardTransition Represents a state transition.
 

Package net.jspcontrols.wizard.impl Description

Provides implementations of core wizard components: like state, transition and wizard controller.

Easy Wizard state machine

Easy Wizard is designed as a specific type of FSM.

  • It does not allow cycles
  • State transition are ranked

    The important concept of weight is borrowed from graph theory. Transitions in Easy Wizard are weighted, or ranked. Weight allows to set an order of transitions. That is, to set the preference of some transitions over others.

    Instead of calculating the transition based on current state and command, Easy Wizard iterates over all transitions defined for current state and validates them. This is possible, because transitions in Easy Wizard are objects, not just string identifiers. If a transition considers itself valid, then FSM moves from its current state to the state identified by chosed transition.

    What about the data and domain model? Here comes another feature of Easy Wizard: its states refer to domain data (or directly store the needed data). Each state refers only to the data that it can modify. Thus, it is very easy to update data which is relevant to current state of FSM.

    What if domain model cannot be updated? The answer is simple: Easy Wizard does not move from the current state, until at least one valid outgoing transition is availaible. Transitions can validate any conditions they need, and most often they check the validity of input data and the validity of domain model. So, if domain model cannot be updated, then flow engine cannot move forward either. This is how flow engine is synchronized with domain model.