Class TransitionExecutor
TransitionExecutor is the central execution engine for state transitions, managing the intricate process of moving from one GUI state to another. It coordinates all aspects of a transition including action execution, state activation/deactivation, hidden state management, and cascading transitions.
Transition anatomy:
- FromTransition: Actions and state changes originating from the source state
- ToTransition: Recognition and finalization of the target state
- Cascading Transitions: Additional states activated as side effects
- Exit Transitions: States deactivated during the transition
Execution phases:
- Validation: Verify source state is active and transition exists
- FromTransition: Execute actions to leave source state
- State Discovery: Determine all states to activate (including cascades)
- ToTransitions: Execute recognition for each target state
- Hidden States: Update hidden state relationships
- Exit States: Deactivate states marked for exit
- Verification: Confirm target state is now active
Key features:
- Cascading Support: States can trigger activation of additional states
- Hidden State Handling: Manages overlay relationships between states
- Probability Updates: Adjusts state existence probabilities for mock mode
- Cycle Prevention: Avoids infinite loops in mutually-activating states
- Partial Success: Core transition can succeed even if cascades fail
Complex transition scenarios:
- Multi-State Activation: Opening a dialog that shows multiple panels
- State Replacement: Tab switching where one state replaces another
- Overlay Management: Modal dialogs that hide but don't close underlying states
- Back Navigation: Returning to previously hidden states
Design philosophy:
- Transitions are atomic - either the core transition succeeds or fails
- Side effects (cascading transitions) don't affect core success
- Already-active states are not re-activated (prevents cycles)
- Hidden states are preserved for back navigation
In the model-based approach, TransitionExecutor embodies the framework's understanding of how GUI state changes occur. Rather than simple page-to-page navigation, it models the complex reality of modern GUIs where actions can trigger multiple state changes, overlays, and cascading effects.
- Since:
- 1.0
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionTransitionExecutor
(StateTransitionService stateTransitionsInProjectService, StateTransitionsJointTable stateTransitionsJointTable, StateVisibilityManager setHiddenStates, StateMemory stateMemory, StateService allStatesInProjectService, TransitionFetcher transitionFetcher, TransitionConditionPackager transitionBooleanSupplierPackager) -
Method Summary
-
Constructor Details
-
Method Details
-
go
Executes a complete state transition from source to target state.This is the primary entry point for state transitions, handling all aspects of moving from one state to another including action execution, state activation/deactivation, and cascade management.
Important notes:
- Source state must be currently active for transition to proceed
- PREVIOUS state references are resolved before reaching this method
- Success is determined by core transition, not cascading effects
- Logs success/failure to Report for debugging and monitoring
Side effects:
- Updates StateMemory with new active/inactive states
- Modifies state probabilities for mock mode
- Updates hidden state relationships
- Increments transition success counters
- Parameters:
fromStateId
- ID of the source state (must be active)toStateId
- ID of the target state to transition to- Returns:
- true if the transition succeeded, false otherwise
- See Also:
-