SCXML
Encyclopedia
SCXML stands for State Chart XML: State Machine Notation for Control Abstraction. It is an XML
XML
Extensible Markup Language is a set of rules for encoding documents in machine-readable form. It is defined in the XML 1.0 Specification produced by the W3C, and several other related specifications, all gratis open standards....

-based markup language
Markup language
A markup language is a modern system for annotating a text in a way that is syntactically distinguishable from that text. The idea and terminology evolved from the "marking up" of manuscripts, i.e. the revision instructions by editors, traditionally written with a blue pencil on authors' manuscripts...

 which provides a generic state-machine based execution environment based on Harel statecharts.

SCXML is able to describe complex state-machines
Finite state machine
A finite-state machine or finite-state automaton , or simply a state machine, is a mathematical model used to design computer programs and digital logic circuits. It is conceived as an abstract machine that can be in one of a finite number of states...

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

Goals

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
State diagram
A state diagram is a type of diagram used in computer science and related fields to describe the behavior of systems. State diagrams require that the system described is composed of a finite number of states; sometimes, this is indeed the case, while at other times this is a reasonable abstraction...

 notations used in the next CCXML 2.0 version (an XML standard designed to provide telephony
Telephony
In telecommunications, telephony encompasses the general use of equipment to provide communication over distances, specifically by connecting telephones to each other....

 support to VoiceXML). It could also be used as a multimodal control language in the Multimodal Interaction Activity
W3C MMI
The Multimodal Interaction Activity is an initiative from W3C aiming to provide means to support Multimodal interaction scenarios on the Web.This activity was launched in 2002...

.

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
XSL Transformations
XSLT is a declarative, XML-based language used for the transformation of XML documents. The original document is not changed; rather, a new document is created based on the content of an existing one. The new document may be serialized by the processor in standard XML syntax or in another format,...

).

The last working draft of the specification was released by the W3C in April 2011.

Examples

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.



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:


The SCXML file describing the transitions in this diagram is:





















(Apache Licenced, see on this page)

Implementations

  • Intervoice Media Exchange and Intervoice Voice Portal contain orchestration engines that have been designed to initiate and manage media interactions. Media Exchange and Voice Portal are the industry's first commercially available products that have implemented the World Wide Web Consortium (W3C) State Chart eXtensible Markup Language (SCXML) as the framework for building complex multi-modal interactions.
  • Intervoice Interaction Composer is a graphical, Eclipse-based Integrated Development Environment (IDE) for building, deploying, and managing complex voice or multi-modal applications. Interaction Composer enables the development of applications that allow callers to perform tasks simultaneously or interrupt tasks with new requests, and then resume tasks where they left off. Interaction Composer leverages the W3C specification for State Chart eXtensible Markup Language (SCXML).
  • Apache Commons SCXML, a pure Java library to parse and execute SCXML diagrams
  • Web interface to an experimental SCXML implementation in the Oz programming language
  • Simple State Chart XML provided the first publicly available SCXML C++ implementation.
  • Qt SCXML Engine implemented in C++ as well and tightly integrated with their Signals and Slots
    Signals and slots
    Signals and slots is a language construct introduced in Qt, which makes it easy to implement the Observer pattern while avoiding boilerplate code. The concept is that controls can send signals containing event information Signals and slots is a language construct introduced in Qt, which makes it...

    concept.
  • PySCXML a Python-implementation under active development. Supports a wide range of technologies, including websockets and SOAP. Highly standards-compliant. Also supports the ECMAScript datamodel.
  • The PySCXML Console a web-based interactive SCXML console for running and interacting with SCXML documents. Supports the ECMAScript datamodel.
  • SCXML4Flex ActionScript/Flex partial port of PySCXML.
  • EclipseSCXML Eclipse Based Visual SCXML Editor.
  • SCXMLgui Java Visual Editor for SCXML.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK