SCXML: Difference between revisions

Content deleted Content added
Tag: possible conflict of interest
m compound modifier
 
(32 intermediate revisions by 25 users not shown)
Line 1:
{{Short description|XML-based markup language}}
{{Use mdy dates|date=June 2013}}
{{Infobox file format
Line 12 ⟶ 13:
| owner = [[World Wide Web Consortium]]
| genre = [[Markup language]]
| latest release version = Last Call Working Draft1.0
| latest release date = MaySeptember 291, 20142015
| container for =
| contained by =
Line 20 ⟶ 21:
| url = [http://www.w3.org/TR/scxml/ 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 statechart]]s.
 
'''SCXML''' stands for State Chart XML: State Machine Notation for Control Abstraction. It is an [[XML]]-based [[markup language]] whichthat provides a generic [[state-machine ]]-based execution environment based on [[Harel statechart]]s.
SCXML is able to describe complex [[Finite state machine|state-machines]]. For example, it is possible to describe notations such as sub-states, parallel states, synchronization, or concurrency, in SCXML.
 
SCXML is able to describe complex [[Finite finite-state machine|state-machines]]s. 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 generifygenericize [[state diagramsdiagram]] notations whichthat are already used in other XML contexts. For example, it is expected that SCXML notations will replace the [[State diagram|State machines]] notations]] used in the next [[CCXML]] 2.0 version (an XML standard designed to provide [[telephony]] support to [[VXML|VoiceXML]]). It could also be used as a multimodal control language in the [[W3C MMI|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 Transformations|XSL Transformation]]).
 
The lastcurrent call working draftversion of the specification was released by the W3C in AugustSeptember 20132015.<ref>{{cite web
| url=httphttps://www.w3.org/NewsTR/scxml/2013.html#entry-9906
| title=Last Call: State Chart XML (SCXML): State Machine Notation for Control Abstraction
| publisher=[[World Wide Web Consortium]]
| date=August September 1, 20132015
| accessdate=20142016-0203-0602}}</ref>
 
==ExamplesApplications==
 
According to the W3C SCXML specification,<ref>[http://www.w3.org/TR/scxml/ State Chart XML (SCXML): State Machine Notation for Control Abstraction specification],</ref> 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 draft W3C [[VoiceXML]] 3.0 specification<ref>[http://www.w3.org/TR/voicexml30/ Voice Extensible Markup Language (VoiceXML) 3.0 specification]</ref> includes State Chart and SCXML Representation to define functionality.
 
===Multimodal applications===
----
 
TrulyMultimodal multimodalapplication applicationsdesigns shouldcan allowuse thedifferent usermodalities to(for communicateexample, throughvoice thevs. interfacetouchscreen mostvs. keyboard and suitablemouse) for thedifferent contextparts of thea interaction.communication Considerbest ansuited applicationto thatit. hasFor example, voice asinput wellcan asbe theused mobileto phonesavoid displayhaving andto keyboardtype ason interfaces.the Thesmall userscreen willof favora themobile mostphone, effectivebut interfacethe andscreen canmay makebe a voicefaster requestway toof avoid excessive typing and then “click” oncommunicating a list or map, oncompared the display instead ofto 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.
 
[[File:Multimodal2.png|A multimodal configuration]]
 
The W3C document Authoring Applications for the Multimodal Architecture<ref>[http://www.w3.org/TR/mmi-auth/ Authoring Applications for the Multimodal Architecture]</ref> describes a multimodal system whichthat 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:
[[File:SCXML stopwatch.jpg|A state chart diagram which describes the behavior of a SCXML stopwatch]]
 
The SCXML file describing the transitions in this diagram is:
 
<source lang="xml">
<?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>
</source>
 
(Apache Licenced, see on [http://jakarta.apache.org/commons/scxml/usecases/scxml-stopwatch.html this page])
 
==Implementations==
*[http://scxmlcc.org scxmlcc] An efficient scxml to C++ compiler.
*[http://jakarta.apache.org/commons/scxml/ Apache Commons SCXML], a pure Java library to parse and execute SCXML diagrams
*[httphttps://code.googlegithub.com/pfmorbini/scxmlgui/ SCXMLgui] Java Visual Editor for SCXML.
*[https://githubscion.com/jbeard4/SCIONscxml.io SCION] SCXML implemented in portable JavaScript.
*[httphttps://github.com/Touffy/JSSCxml JSSCxml] a Web browser implementation under active development. Highly conformant, with good support for DOM Events. Only supports the ECMAScript datamodel.
*[https://github.com/tklab-tud/uscxml uSCXML] C/C++ interpreter and transformer/compiler with language bindings for Java and C#. Full ECMAScript support via JavaScriptCore or Google's v8, additional LUA and Prolog datamodels, only rudimentary support for XPath datamodel. PROMELA datamodel for formal verification with the SPIN model-checker.
*[https://github.com/Phrogz/LXSC LXSC] Lua XML StateChart interpreter - parses and executes SCXML state machines with a Lua data model.
*[http://code.qt.gitorious.orgio/cgit/qt-labs/scxmlqtscxml.git Qt SCXML Engine] implemented in C++ as well and tightly integrated with their [[Signals and slots|Signals and Slots]] concept, with a visual editor integrated in [[Qt Creator]].
*[https://xstate.js.org XState] implemented in TypeScript.
 
== Inactive implementations ==
The following implementations are inactive, i.e., the last change to their source code was made more than two years ago:
*[http://www.ling.gu.se/~lager/Labs/SCXML-Lab/ Web interface to an experimental SCXML implementation in the Oz programming language]
*[https://github.com/pelatimtt/Legian Legian] An SCXML engine implemented in Java using Rhino as a Javascript engine. It also supports some additional features such as custom tag libraries and includes. It is not fully W3C compliant.
*[httphttps://github.com/jroxendal/PySCXML 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. (last push 2013)
*[http://qt.gitorious.org/qt-labs/scxml Qt SCXML Engine] implemented in C++ as well and tightly integrated with their [[Signals and slots|Signals and Slots]] concept.
*[http://github.com/jroxendal/PySCXML 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.
*[http://pyscxml.spyderbrain.com The PySCXML Console] a web-based interactive SCXML console for running and interacting with SCXML documents. Supports the ECMAScript datamodel.
*[httphttps://code.google.com/archive/p/scxml4flex/ SCXML4Flex] ActionScript/Flex partial port of [httphttps://github.com/jroxendal/PySCXML PySCXML].
*[http://commons.apache.org/sandbox/gsoc/2010/scxml-eclipse EclipseSCXML] Eclipse Based Visual SCXML Editor.
*[http://code.google.com/p/scxmlgui/ SCXMLgui] Java Visual Editor for SCXML.
*[https://github.com/jbeard4/SCION SCION] SCXML implemented in portable JavaScript.
*[http://github.com/Touffy/JSSCxml JSSCxml] a Web browser implementation under active development. Highly conformant, with good support for DOM Events. Only supports the ECMAScript datamodel.
 
==See also==
Line 107 ⟶ 86:
 
==External links==
*[http://www.w3.org/TR/scxml/ W3C SCXML lastspecification working draft1.0]
(Apache Licenced, see on *[http://jakarta.apache.org/commons/scxml/usecases/scxml-stopwatch.html thisSCXML Commons Usecases - Stopwatch pageexample])
 
{{W3C standards}}