commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vance huang <vancehu...@yahoo.com>
Subject Re: Re: [scxml]
Date Mon, 16 May 2011 16:26:55 GMT
On Fri, May 13, 2011 at 6:54 PM, Vance huang <vancehuang@yahoo.com> wrote: > Hi, 
> > I am using scxml 0.9 release and encountered a weird issue. When I am > 
transitioning between 2 states, it worked fine sometimes but in other times, it 
> failed to transition to the next state. I put logging in <onexit> and 
<onentry> > and here is what happened: > State 1 transition to State 2. > State

2 processes some events and transition back to State 1 > I put logging in 
<onexit> of State 1 and <onentry> of State 2. I saw both logs. > Then after
few 
seconds an event fired but caught in State 2!! > Is it a known issue in 0.9 
release? Any workaround? <snip/>  Doesn't ring a bell. We'll need a concrete 
test case. Post the smallest possible SCXML snippet exhibiting the behavior you 
think is unexpected with a reason why you think its unexpected (if not obvious).  
-Rahul   > Thanks. > > Vance 


Hi, Rahul:

Here is the trimmed down snippet:

<state id="active">
<onentry>
    <log expr="'active State." />
</onentry><transition event="test2" target="test2"/>
<transition event="*">
    <log expr="'active State handling unexpected event'" />
<custom action here/>
</transition>
    </state>

<state id="test2" initial="test2-init">
<state id="test2-init">
<onentry>
   <log expr="'test2-init State." />
<assign name="keepGoing" expr="true"/>
    </onentry>
<transition cond="keepGoing == true">
    <log expr="'test2-keepGoing'" />
<"calling a custom action here/>
</transition>
<transition event="actionComplete" target="test2-final">
    <log expr="'test2-actionComplete.'" />
</transition>
<transition event="*">
<log expr="'test2 State handling unexpected event'" />
<custom action here/>
</transition>
   </state>
    
<state id="test2-final">
<onentry>
    <log expr="'test2-final State'" />
    </onentry>
<transition target="active">
    <log expr="'test2-final State exiting'" />
</transition>
    </state>
    
<onexit>
<custom action here/>
</onexit>
    </state>


What happen was that sometimes going from active to test2 and back to active 
works fine. But other times though it seems to coming back from test2 to active 
state is fine (based on the onentry logging) but when test2 event fired, it was 
caught in test2 state not active state. I am not sure what else can I do to 
provide more information on this. Thanks.


Vance




________________________________
From: Vance huang <vancehuang@yahoo.com>
To: user@commons.apache.org
Sent: Fri, May 13, 2011 5:54:44 PM
Subject: [scxml]


Hi, 

I am using scxml 0.9 release and encountered a weird issue. When I am 
transitioning between 2 states, it worked fine sometimes but in other times, it 
failed to transition to the next state. I put logging in <onexit> and <onentry>

and here is what happened:
State 1 transition to State 2.
State 2 processes some events and transition back to State 1
I put logging in <onexit> of State 1 and <onentry> of State 2. I saw both logs.
Then after few seconds an event fired but caught in State 2!!
Is it a known issue in 0.9 release? Any workaround? 
Thanks.

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