~8 minute read

Design Flight Simulator

Execute architectural diagrams before writing code. Test flows, validate logic, and detect issues early.

Execute your architectural diagrams before writing code to identify logic gaps and validate request paths.

What is the Design Flight Simulator?

The Design Flight Simulator allows you to simulate request flows through your Flow and Architecture views, identifying potential issues during the design phase rather than during implementation.

Key Benefits:

  • Catch circular paths and infinite loops before coding
  • Validate decision logic with mock data
  • Identify unreachable nodes and dead ends
  • Test different scenarios with configurable payloads
  • Visual execution highlighting on the canvas

Getting Started

1. Create a Flow

Start by creating a flow in either Unified View or Planning Graph view:

  1. Add a START node as your entry point
  2. Connect nodes with edges to create execution paths
  3. Add DECISION nodes for conditional branching
  4. End with END nodes

2. Configure Your Simulation

Before running:

  1. Select a START node on the canvas
  2. In the Properties panel, click "Run Simulation"
  3. Or open the Simulation tab in the sidebar

3. Set Up Mock Data

In the Payload tab, define JSON data to test your flow:

Tip: The Simulation tab uses the currently selected START node. If no START node is selected, use the START node Properties panel Run Simulation button.

{
  "userId": "123",
  "isGuest": true,
  "orderTotal": 150.0,
  "items": ["item1", "item2"],
  "user": { "profile": { "theme": "dark" } }
}

This payload is used when evaluating DECISION node conditions.

Using the Simulator

Playback Controls

The simulation toolbar provides:

  • Play ▶️ - Start automatic execution
  • Pause ⏸️ - Pause execution
  • Step ⏭️ - Execute one step at a time
  • Reset 🔄 - Clear and start over
  • Speed ⚡ - Adjust playback (Slow/Normal/Fast)

Understanding the Console

The Console tab shows:

  • Step-by-step log of each node visited
  • Timestamps for each execution step
  • Node type icons (START, STEP, DECISION, etc.)
  • Error messages highlighted in red

Visual Feedback

While simulating, watch the canvas:

  • Primary glow + full-node tint - Currently executing node
  • Subtle full-node tint - Already visited nodes (persists until reset)
  • Animated arrow - Active execution path

Decision Logic

DECISION nodes evaluate outgoing-edge conditions against the mock payload. Use the payload property path directly (without a payload. prefix); nested properties use dot notation.

Supported condition syntax

Write one condition on an edge using these forms:

SyntaxBehavior
field == valueExact match
field != valueNot equal
field > numberNumeric greater-than comparison
field < numberNumeric less-than comparison
field contains valueString substring or array-item match
field existsProperty value is present (not null or undefined)

Quote string values with single or double quotes; booleans, null, and numbers are parsed as values.

Examples for this payload:

isGuest == true
orderTotal > 100
items contains "item1"
user.profile.theme == "dark"

For a DECISION node with multiple outgoing edges, the first matching condition is followed. An edge without a condition is the default path when no conditional edge matches.

Simulation Runtime

Playback Step advances execution one node at a time. The simulator also stops after 100 executed steps, and detects a repeated node during execution as a circular path. A DECISION node with no matching conditional or default edge produces an invalid-decision error.

Design Validation

Design validation is separate from running the simulator. It analyzes the graph from the selected START node and reports unreachable nodes, circular paths, non-END nodes with no outgoing edges, and orphaned nodes. These are design-analysis findings, not a simulation step-limit result.

Review validation results in the START node's Properties panel and connect or remove unintended unreachable/orphaned nodes, address cycles, and add an END node to terminate intended paths.

Supported Node Types

The simulator handles these node types:

TypeBehaviorExample Use
STARTEntry point"User Login"
ENDTerminates flow"Process Complete"
STEPGeneric processing"Validate Input"
DECISIONConditional branching"Is User Guest?"
SERVICE_CALLExternal API call"Payment API"
ENTITY_OPERATIONDatabase operation"Save Order"
QUEUE_PUBLISHSend message"Notify Shipping"
QUEUE_CONSUMEReceive message"Process Payment"

Examples

E-commerce Checkout

START (User Checkout)
  ↓
STEP (Validate Cart)
  ↓
DECISION (Cart Value > $100?)
  ├─ Yes ──> STEP (Apply Discount)
  └─ No  ──> STEP (Calculate Total)
  ↓
SERVICE_CALL (Payment API)
  ↓
DECISION (Payment Success?)
  ├─ Yes ──> STEP (Send Confirmation)
  └─ No  ──> STEP (Show Error)
  ↓
END (Complete)

User Registration

START (Register User)
  ↓
STEP (Validate Email)
  ↓
DECISION (Email Valid?)
  ├─ No  ──> STEP (Show Error) ──> END (Failed)
  └─ Yes ──> STEP (Check Existing)
            ↓
            DECISION (User Exists?)
              ├─ Yes ──> STEP (Show Login) ──> END (Redirect)
              └─ No  ──> STEP (Create Account)
                        ↓
                        STEP (Send Welcome Email)
                          ↓
                          END (Success)

Tips & Best Practices

  1. Start Simple - Build basic flows first, then add complexity
  2. Test Edge Cases - Use different payloads to test error paths
  3. Validate Often - Run design validation after major changes
  4. Use Meaningful Names - Node names appear in console logs
  5. Add END Nodes - Every path should terminate
  6. Check for Loops - Ensure DECISION nodes have exit conditions

Keyboard Shortcuts

  • Space - Play/Pause simulation
  • → - Step forward
  • Esc - Reset simulation

Troubleshooting

Simulation won't start:

  • Ensure a START node is selected
  • Check that nodes are connected with edges
  • Verify your mock payload is valid JSON

Circular path detected:

  • Review edges for unintended loops
  • Add END nodes or DECISION nodes to create exits

Decision not working:

  • Check condition syntax
  • Verify payload property names
  • Ensure correct operator for data type

Related Features

Next Steps

  1. Create your first flow with START and END nodes
  2. Add a DECISION node with conditions
  3. Configure a mock payload
  4. Run your first simulation!

We use cookies to understand how Nexus is used, via Google Analytics. Questions? Visit our contact page.