commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ingmar Kliche" <ingmar.kli...@googlemail.com>
Subject [SCXML] Bug on decision of transition?
Date Fri, 25 May 2007 14:40:25 GMT
I noticed that commons-scxml executes multiple transitions on one event as
soon as multiple transitions (i.e. multiple transitions exist for one event)
match. The SCXML spec instead says that only one transition has to be taken
(the first in document order) as long as it is not a parallel construct. To
illustrate this behavior I modified the state chart of the stop watch
example to

<scxml xmlns="http://www.w3.org/2005/07/scxml"
       version="1.0"
       initialstate="init">
...
 </state>
    <state id="reset">
*        <transition event="watch.start" target="running"/>
        <transition event="watch.start" target="stopped"/>
*        <transition event="watch.split">
         <assign name="foo" expr="3"/>
        </transition>
    </state>
....

I.e. the reset state contains two transitions for the event "watch.start".
According to the SCXML spec I would assume that the first transition in
document order will be taken, but commons-scxml executes both transitions
and ends up in two states. See the following log:


25.05.2007 16:27:01 org.apache.commons.scxml.env.SimpleErrorReporter onError
WARNUNG: NON_DETERMINISTIC (Multiple conflicting transitions enabled.):
[transition (event = watch.start, cond = null, from = /reset, to =
/stopped), transition (event = watch.start, cond = null, from = /reset, to =
/running)]
25.05.2007 16:27:01 org.apache.commons.scxml.env.SimpleErrorReporter onError
WARNUNG: ILLEGAL_CONFIG (Multiple top-level OR states active!): <SCXML> :
[/running, /stopped]
25.05.2007 16:27:01 org.apache.commons.scxml.env.SimpleErrorReporter onError
WARNUNG: ILLEGAL_CONFIG (Multiple top-level OR states active!): <SCXML> :
[/running, /stopped]
25.05.2007 16:27:01 org.apache.commons.scxml.SCXMLExecutor logState
INFO: Current States: [running, stopped]

Is this behaviour inteted?

Thanks and regards,
Ingmar

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