Skip to content

Instantly share code, notes, and snippets.

@jbeard4
Created December 3, 2012 14:49
Show Gist options
  • Save jbeard4/4195449 to your computer and use it in GitHub Desktop.
Save jbeard4/4195449 to your computer and use it in GitHub Desktop.
SCXML with an explicit notion of timeout events
<scxml>
<state id="a">
<transition target="b" cc:timeout="1s"/>
</state>
<state id="b"/>
</scxml>
@jbeard4
Copy link
Author

jbeard4 commented Dec 3, 2012

Can be transformed to:

<scxml>
    <state id="a">
        <onentry>
            <send after="1s" event="$timeout_1" id="$timeout_1"/>
        </onentry>
        <onexit>
            <cancel sendid="$timeout_1"/>
        </onexit>

        <transition target="b" event="$timeout_1"/>
    </state>
    <state id="b"/>
</scxml>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment