You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Javier Rodríguez Escolar <ja...@gmail.com> on 2008/06/24 10:10:26 UTC
SCXML Listeners
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. 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?
Thanks,
Javi.
RE: SCXML Listeners
Posted by "THOMAS, JAYANT (ATTSI)" <jt...@att.com>.
-----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 <ja...@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
Re: SCXML Listeners
Posted by Rahul Akolkar <ra...@gmail.com>.
On 6/24/08, Javier Rodríguez Escolar <ja...@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