Conditional Transitions
A conditional transition is a connection between states that only fires if a specific condition is true. It’s the foundation of branching training flows — different paths based on learner choices, scores, or tracked data.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

Select a state and go to the Transitions tab
Click a state, then open the Transitions tab in the Properties panel.
Create or select a transition
Click Add Transition or expand an existing one. Each transition shows Events, Conditions, Actions, and Destination Step.
Add an event to the transition
Click the + button next to Events to choose what triggers this transition (Tap, Move, Rotate, etc.).
Expand the Conditions section and write your expression
Enter an AXL expression like
Score > 60. Use Insert Variables to reference available variables.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
| Action | Purpose | Example |
|---|---|---|
| Set Variable | Save or update a value before entering the next state | Set completedQuiz to true, or set score to score + 10 to increment |
| Play Audio | Play a sound during the transition | Play “correct answer” ding |
| Show Text / Show Panel | Display feedback before the next state begins | Show Panel with body “Nice work!” |
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
Make sure every conditional transition works. Try different values for each condition.
Test boundary values
Test boundary values
If a condition is
score >= 80, test with score = 79 and score = 80 to verify the boundary.Test fallback transitions
Test fallback transitions
Verify that unconditional (fallback) transitions fire when expected.
Test action execution
Test action execution
Make sure transition actions (like setting variables) actually happen. Check values in the Variable Inspector after transitions.
Test complex logic
Test complex logic
If you use
&& / ||, 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
Put your most specific conditions first, then broader ones, then a fallback. This prevents unintended paths.
Always provide a fallback
Always provide a fallback
Add an unconditional transition at the end to catch unexpected cases. Prevents learners from getting stuck.
Keep conditions readable
Keep conditions readable
Avoid overly complex AXL expressions. If a condition is hard to understand, break it into smaller pieces using variables.
Use meaningful variable names
Use meaningful variable names
Instead of
v1 or temp, use score, correctAnswers, isComplete. Makes conditions self-documenting.Document your branching logic
Document your branching logic
Add state descriptions or comments explaining why transitions exist and what conditions control them.
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

