SCXML
From Wikipedia, the free encyclopedia
SCXML stands for State Chart XML : State Machine Notation for Control Abstraction. It is an XML language that 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 notions 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 that 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 XSLT transformation).
[edit] Example
Here is the state chart diagram that describes the behavior of a stopwatch:
The SCXML file describing the transitions in this diagram is :
<scxml xmlns="http://www.w3.org/2005/07/SCXML" version="1.0" initialstate="reset"> <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="reset"/> </state> </scxml>
(Apache Licenced, see on this page)
[edit] Implementations
- Apache Java library to parse and execute SCXML diagrams
- Web interface to an experimental SCXML implementation in the Oz programming language