Scenario: a refund request at the fictional Belgavi's Book Store waits in review while three guards decide where it goes. Synthetic inputs; every calculation stays in this page and nothing is sent anywhere.
Experiment workspace
Decision trace
What this lab models
One state of a refund workflow at the fictional Belgavi's Book Store. A request waits in review and three facts decide where it goes: verified (identity check passed), over_limit (amount above the automated limit) and confident (the agent that read the conversation is confident the item qualifies). Three transitions leave the state. The lab evaluates every guard for all eight combinations of the facts and counts gaps (no guard true) and overlaps (two or more true). Strict routing refuses a machine with any gap or overlap. Priority routing takes the first true guard in the listed order, which is how SCXML selects among enabled transitions. All arithmetic runs in this page.
How to experiment
Start with the complete fixture: zero gaps, zero overlaps, and the default request (verified, not over the limit, confident) goes to auto_refund. Switch to the gap fixture: one gap appears at verified, not over the limit, not confident, and strict mode refuses the machine. Turn the fallback on and the strict check accepts it. Switch to the overlap fixture with priority routing, then set verified to No: the unverified request goes to auto_refund. Reverse the order and the same request goes to verify_identity.
Expected outcomes to check
Complete: 0 gaps, 0 overlaps, accepted. Gap: 1 gap, refused; with fallback accepted, and the request verified=T, over_limit=F, confident=F goes to escalate_to_person. Overlap: 1 overlap at verified=F, over_limit=F, confident=T; strict refuses even with the fallback on; priority sends that request to auto_refund in listed order and to verify_identity reversed. The same numbers come from the companion Python example.
Trace, reset and export
The decision trace lists the setup and guards, one line for each of the eight combinations, the analysis verdict, the routing of the chosen request and the outcome. Start trace hides every step, Next step reveals one, Show all restores the list and the slider selects how many are visible; none of these change the result. Reset inputs restores the defaults. Export JSON saves the inputs, the table, the verdict and the trace.
Limits
Boolean facts only. Guards on numbers, strings or times need their boundary values enumerated, or a solver, before a coverage check is complete. Event names, parallel states and history states are not modelled, and the guards are fixed fixtures rather than an editor.
Original lab by Sandeep Belgavi. Views are my own and do not represent any employer, past or present.