commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "THOMAS, JAYANT (ATTSI)" <jt8...@att.com>
Subject RE: SCXML Listeners
Date Wed, 25 Jun 2008 19:41:04 GMT


-----Original Message-----
From: Rahul Akolkar [mailto:rahul.akolkar@gmail.com] 
Sent: Wednesday, June 25, 2008 12:24 PM
To: Commons Users List
Subject: Re: SCXML Listeners


On 6/24/08, Javier Rodríguez Escolar <javiescolar@gmail.com> wrote:
> Hello,
>
>  I was just starting to use your SCXML implementation and I have noticed that
>  if I use a SCXMLListener to perform some actions whenever some concrete
>  states are entered, the onEntry method is called after all the actions
>  specified on the <onentry/> element have been done.
<snip/>

Yup, by design, all callbacks in SCXMLListener are after the
corresponding actions (for entry, transition or exit).


> Due to the nature of my
>  specific use case I would prefer the onEntry method on the Listener to be
>  called before executing the onentry actions, so my questions are: is there
>  any reason for this behavior? is there any way to put my code when a state
>  is entered and before to the execution of the onentry actions?
<snap/>

Model it in a custom action:

<onentry>
  <my:action ... />
  ... other actions ...
</onentry>

See:
  http://commons.apache.org/scxml/guide/custom-actions.html

More generally, for those just starting with Commons SCXML:
  http://commons.apache.org/scxml/guide.html
  http://commons.apache.org/scxml/usecases.html

-Rahul


>
>  Thanks,
>
>  Javi.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message