SCXML
S tate C hard XML (SCXML) is an XML standard of the W3C for a general description language for state transition diagrams . SCXML can describe complex state machines including sub-states, nested and parallel states.
The standard has been developed by the W3C since 2005 and received recommendation status on September 1, 2015. SCXML is based on CCXML and Harel Statecharts.
example
The following example illustrates the modeling of a stopwatch with SCXML.
<?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"/>
<transition event="watch.reset" target="stopped"/>
</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">
</state>
</scxml>