Hi, Rahul:

Your suggestion does the trick and now it is transitioning correctly. Many 
thanks.

Vance

On Tue, May 17, 2011 at 3:44 PM, Vance huang <[email protected]> wrote: > 
Hi, 
Rahul: > Thanks for taking a look. In further testing, I found the probable 
cause of this > issue is that when the custom action in test2 is executing, 
sometimes it injects > the actionComplete event right back to the scxml engine 
(in the same thread). > When that occurs, the state transition is messed up and 
stayed in test2-init > state though in the log it went into active state. If 
the 
custom action is not > doing that, and later another thread sends the 
actionComplete to the engine, > then it transitions fine. Is this a bug or 
something should not be done based on > the spec? Thanks. > <snip/>  You should 
inject events from within a custom action by adding to the set of derived 
events 
(param of execute method) which will be processed in a subsequent microstep, 
rather than triggering another event on the executor (if thats what you're 
doing).  -Rahul

Reply via email to