commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Linda Erlenhov <>
Subject Re: [SCXML] Timers in SCXML
Date Tue, 14 Apr 2009 12:19:15 GMT

This may be a stupid question but:
I have read through the code for the simple scheduler and I´m  not sure i
understand what happens.
We have written a simple scxml for a small statechart containing two states
with timers and used the simple scheduler as described in your previous
e-mail. As I understand the timers would make the machine just jump between
the two states. This doesn´t happen. Why?
<scxml version="1.0" initialstate="167" xmlns:cs="" xmlns="">
<state id = "167">
<transition target="StateA"/>
<state id ="StateA">
<log label="Renegade" expr="'Entering state: A'"/>
<send sendid="1" event="'ToB'" delay="'1000ms'">
<log label="Renegade" expr="'Timer starting...'"/>
<transition event="ToB" target="StateB"/>
<state id="StateB">
<log label="Renegade" expr="'Entering state: B'"/>
<send sendid="2" event="'ToA'" delay="'2000ms'">
<log label="Renegade" expr="'Timer starting...'"/>
<transition event="ToA" target="StateA"/>

The output when this is run is simply:
2009-apr-14 13:08:57 org.apache.commons.scxml.model.Log execute
INFO: Renegade: Entering state: A
2009-apr-14 13:08:57 org.apache.commons.scxml.env.SimpleScheduler send
INFO: send ( sendId: 1, target: null, targetType: scxml, event: ToB, params:
null, hints: null, delay: 1000)

best regards

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message