SCXML—A New Language for Controlling Processes

By James A. Larson
Intel Corporation

Designers have long used state transition systems (STSs) to represent processes.  Basically, a STS consists of a set of states (usually represented as ovals) and transitions (represented by arcs) that connect pairs of states.  Each transition has a condition that, when satisfied, causes the process to proceed from the state at the tail of the arc to the state at the head of the arc. 

About 15 years ago logician David Harel extended STSs in three important ways1:

Software developers have used statecharts (as Harel’s notation came to be known) to represent software designs in UML (Universal Modeling Language2).  In July of 2005, the W3C Voice Browser Working Group published the first working draft of State Chart XML3 (SCXML).  This language is a candidate for representing various types of processes including:

<?xml version="1.0" encoding="us-ascii"?> 
<scxml version="1.0" xmlns="">   
  <state id="S1"> 
     <onentry> <!-- instructions to invoke VoiceXML Application 1 --> </onentry> 
     <transition event="Application_1_completed"> 
        <target next="S2"cond="age&gt;60"/> 
     <transition event="Application_1_completed"> 
        <target next="S3"cond ="age&lt;60"/> 
   <state id="S2"> 
      <onentry> <!-- instructions to invoke VoiceXML Application 2 --> </onentry> 
      <transition event="Application_2_completed"> 
         <target next="S3"/> 
   <state id="S3"> 

Figure 1. Example SCXML code fragments that invoke VoiceXML Application 1 and then, conditionally invokes VoiceXML Application 2. 

SCXML has a visual representation, so dialog designers can drag and drop ovals and arcs to represent control structures, and add annotation to represent conditions, named processes, and parameters.  A possible visual representation and the corresponding textual representation is shown in Figure 2. 


Figure 2. Graphical representation of SCXML code from Figure 1.

SCXML unifies the process control structures of several languages, including VoiceXML, CCXML, mulimodal user interfaces, metalanguages, as well as traditional high-level software design.  In the future, speech application designers may use SCXML to specify the control structures at various levels of speech and mutimodal applications.

1 Horel, David, “Statecharts: A Visual Formalism for Comlex Systems,”
2 Rumbaugh, James, Ivar Jacobson, and Grady Booch, Unified Modeling Language Reference Manual, 2nd Edition, Pearson Education, 2004.
3 W3C Voice Browser Working Group Web site
Dr. James A. Larson is manager of advanced human input/output at Intel Corporation and author of The VoiceXML Guide. He can be reached at and his Web site is