How Conditional Transitions Work
Here’s the sequence:- Event occurs (learner taps, moves, chooses, etc.)
- Condition is evaluated (e.g., “score >= 80”, “selectedOption == ‘correct’”)
- If condition is TRUE: Transition fires, moving to the next state
- If condition is FALSE: Transition is skipped; the system checks the next transition
- Actions run during the transition and in onEntry/onExit of states
Setting Up a Conditional Transition

A conditional transition — the Conditions field contains an AXL expression (Score > 60) with Insert Variables and Actions sections below
Select a state and go to the Transitions tab
Create or select a transition
Add an event to the transition
Expand the Conditions section and write your expression
Score > 60. Use Insert Variables to reference available variables.Set the Destination Step
Optional: Add transition actions
Transition Priority: Multiple Conditions
When multiple transitions exist from the same state for the same event, they are checked in order (from top to bottom, or as defined in your UI). The first transition whose condition evaluates to TRUE fires. Important: All other transitions are skipped once one fires.Example: Multiple Choice Paths
State: “Safety Quiz” → Event: Choice- Transition 1’s condition is true → fire to “Correct Answer State”
- Transitions 2 and 3 are never checked
- Transition 1’s condition is false → skip
- Transition 2’s condition is true → fire to “Incorrect Answer State”
- Transition 3 is never checked
Unconditional Fallback Transitions
A transition with no condition (or an empty condition field) always fires. Use this as a default path. Best practice: Place specific conditions first, then add an unconditional fallback at the end.Example: Fallback for Unexpected Input
Transition Actions
In addition to onEntry and onExit actions, transitions themselves can have actions — things that run during the move from one state to another. Execution order:Common Transition Actions
Example: Transition Actions
Scenario: Learner taps the correct object. Before moving to “Success” state, increment the score.- onExit of current state runs (if any)
- Transition actions run (score increases)
- onEntry of “Success State” runs (plays congratulatory audio)
Branching Example: Score-Based Paths
Here’s a realistic multi-state branching flow: State 1: “Safety Quiz”- Correct answers give points and move forward
- Incorrect answers allow retries (up to 3 attempts)
- After 3 incorrect attempts, show a different ending
Complex Conditions in Transitions
Use the Altoura Expression Language (AXL) to build sophisticated conditions:Example: Time-Based Branching
Example: Multi-Variable Conditions
Example: State Tracking
Testing Conditional Transitions
Before launching, test all your branches:Test each path
Test each path
Test boundary values
Test boundary values
score >= 80, test with score = 79 and score = 80 to verify the boundary.Test fallback transitions
Test fallback transitions
Test action execution
Test action execution
Test complex logic
Test complex logic
&& / ||, test all combinations. For example, if the condition is (A && B) || C, test when only A is true, only B is true, only C is true, etc.Best Practices for Conditional Transitions
Order conditions from specific to general
Order conditions from specific to general
Always provide a fallback
Always provide a fallback
Keep conditions readable
Keep conditions readable
Use meaningful variable names
Use meaningful variable names
v1 or temp, use score, correctAnswers, isComplete. Makes conditions self-documenting.Document your branching logic
Document your branching logic
Common Mistakes to Avoid
Next Steps
Learn how to:- Use Conditions — Build the logical expressions your transitions need
- Create Variables — Store the data your conditions check
- Entry & Exit Actions — Coordinate what happens before and after transitions

