SCXML

From Wikipedia, the free encyclopedia

State Chart XML
File name extension .scxml
Developed by World Wide Web Consortium
Latest release 4th Public working draft / May 15, 2008
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.

Contents

[edit] 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 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 working draft of the specification was released by the W3C in May 2008.[1]

[edit] Example

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:

<scxml xmlns="http://www.w3.org/2005/07/SCXML"
       version="1.0"
       initialstate="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)

[edit] Implementations

[edit] See also

[edit] References

[edit] External links