commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ingmar Kliche <>
Subject Re: [SCXML] Entry Action
Date Fri, 01 May 2009 12:54:01 GMT
Hi Landon,
the latter is the case. A state machine will process only one event at a
time. The specification [1] defines the concept of an internal and external
event queue.

Here is a (simplified) description of how an event gets processed: Assuming
the state machine has reached a certain state (or states) and finished
execution of <onentry>('s), it will wait for external events (for Apache
commons SCXML this means an event needs to be triggered using
SCXMLExecutor::triggerEvents()). Ones an external event arrives (i.e.
triggerEvents() is called), the state machine will process it (decide on
which <transistion>('s) to take, execute <onexit>('s), execute executable
content of the selected <transition>('s) and execute <onentry>'s). If
another external event arrives while the previous event is processed, it
needs to be queued (in other words put into the external event queue and
must not be triggered in parallel)!

If you use the Apache commons SCXML library in a multithreaded environment
it is important to make sure, that only one thread is executing an event at
any point in time (i.e. executing triggerEvents() method).

Does this help?


2009/5/1 Ouyang, Landon - ES/RDR -Gil <>

> I cannot find the documentation (I thought I had previously read) on this
> topic.
> A state is executing an entry action, if an event (that causes a
> transition) is received, will the state machine take that transition?  Or
> does the entry action have to be completed before the state machine can
> process or take that transition?
> Can anyone point me to that documentation?
> --
> Landon Ouyang
> Senior Design Engineer
> ITT Electronics Systems, Radar Systems - Gilfillan
> 7821 Orion Ave,
> Van Nuys, CA 91406
> (818) 901-2982
> ________________________________
> This e-mail and any files transmitted with it may be proprietary and are
> intended solely for the use of the individual or entity to whom they are
> addressed. If you have received this e-mail in error please notify the
> sender.
> Please note that any views or opinions presented in this e-mail are solely
> those of the author and do not necessarily represent those of ITT
> Corporation. The recipient should check this e-mail and any attachments for
> the presence of viruses. ITT accepts no liability for any damage caused by
> any virus transmitted by this e-mail.

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