SCXML

From Wikipedia, the free encyclopedia
Jump to: navigation, search
State Chart XML
Filename extension .scxml
Developed by World Wide Web Consortium
Latest release Last Call Working Draft / Aug 1, 2013
Type of format Markup language
Extended from XML
Website http://www.w3.org/TR/scxml/

SCXML stands for State Chart XML: State Machine Notation for Control Abstraction. It is an XML-based markup language which provides a generic state-machine based execution environment based on Harel statecharts.

SCXML is able to describe complex state-machines. For example, it is possible to describe notations such as sub-states, parallel states, synchronization, or concurrency, in SCXML.

Goals[edit]

The objective of this standard is to generify state diagrams notations which are already used in other XML contexts. For example, it is expected that SCXML notations will replace the State machines notations used in the next CCXML 2.0 version (an XML standard designed to provide telephony support to VoiceXML). It could also be used as a multimodal control language in the Multimodal Interaction Activity.

One of the goals of this language is to make sure that the language is compatible with CCXML and that there is an easy path for existing CCXML scripts to be converted to SCXML without major changes to the programming model or document structure (for example, by using an XSL Transformation).

The last call working draft of the specification was released by the W3C in August 2013.[1]

Examples[edit]

According to the W3C State Chart XML (SCXML): State Machine Notation for Control Abstraction specification, SCXML is a general-purpose event-based state machine language that can be used in many ways, including:

  • As a high-level dialog language controlling VoiceXML 3.0's encapsulated speech modules (voice form, voice picklist, etc.)
  • As a voice application metalanguage, where in addition to VoiceXML 3.0 functionality, it may also control database access and business logic modules.
  • As a multimodal control language in the MultiModal Interaction framework, combining VoiceXML 3.0 dialogs with dialogs in other modalities including keyboard and mouse, ink, vision, haptics, etc. It may also control combined modalities such as lipreading (combined speech recognition and vision) speech input with keyboard as fallback, and multiple keyboards for multi-user editing.
  • As the state machine framework for a future version of CCXML.
  • As an extended call center management language, combining CCXML call control functionality with computer-telephony integration for call centers that integrate telephone calls with computer screen pops, as well as other types of message exchange such as chats, instant messaging, etc.
  • As a general process control language in other contexts not involving speech processing.

The W3C Voice Extensible Markup Language (VoiceXML) 3.0 specification includes State Chart and SCXML Representation to define functionality.


Truly multimodal applications should allow the user to communicate through the interface most suitable for the context of the interaction. Consider an application that has voice as well as the mobile phones display and keyboard as interfaces. The user will favor the most effective interface and can make a voice request to avoid excessive typing and then “click” on a list or map on the display instead of listening to long descriptions of available options. SCXML makes it easy to do several things in parallel, and the Interaction Manager SCXML application will maintain the synchronization between Voice and Visual dialogues.

A multimodal configuration

The W3C document Authoring Applications for the Multimodal Architecture describes a multimodal system which implements the W3C Multimodal Architecture and gives an example of a simple multimodal application authored using various W3C markup languages, including SCXML, CCXML, VoiceXML 2.1 and HTML.


Here is the state chart diagram which describes the behavior of a stopwatch: A state chart diagram which describes the behavior of a SCXML stopwatch

The SCXML file describing the transitions in this diagram is:

<?xml version="1.0" encoding="UTF-8"?>
<scxml xmlns="http://www.w3.org/2005/07/scxml" version="1.0" initial="ready">
    <state id="ready">
        <transition event="watch.start" target="running"/>
    </state>
    <state id="running">
        <transition event="watch.split" target="paused"/>
        <transition event="watch.stop" target="stopped"/>
    </state>
    <state id="paused">
        <transition event="watch.unsplit" target="running"/>
        <transition event="watch.stop" target="stopped"/>
    </state>
    <state id="stopped">
        <transition event="watch.reset" target="ready"/>
    </state>
</scxml>

(Apache Licenced, see on this page)

Implementations[edit]

See also[edit]

References[edit]

  1. ^ "Last Call: State Chart XML (SCXML)". World Wide Web Consortium. August 1, 2013. Retrieved 2014-02-06. 

External links[edit]