You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by Jorge Moratinos <jo...@hotmail.com> on 2010/06/23 14:11:36 UTC

FW: [SCXML] Some questions about the use of a state machine developed with SCXML


 Hi,

I've some questions about scxml, I'm developing an state machine, but in some cases I called from SCXML a Custom Action, and that Custom Action must be running undergroud and sending new events. My questions are:




How can i send new events to the same state machine from the custom Actions?

What are the derivedEvents?

It's posible call a custom action and let the state machine and the custom action running at the same time?

thanks,

Jorge Moratinos
jorgems101@hotmail.com
 		 	   		  
_________________________________________________________________
Sé el protagonista de GQ con Messenger y Vodafone Blackberry. ¡Y gana premios!
http://serviciosmoviles.es.msn.com/messenger/vodafone.aspx

RE: [SCXML] Some questions about the use of a state machine developed with SCXML

Posted by Jorge Moratinos <jo...@hotmail.com>.
Thanks Rahul!

 

Jorge Moratinos
 
> Date: Thu, 24 Jun 2010 16:35:34 -0400
> Subject: Re: FW: [SCXML] Some questions about the use of a state machine developed with SCXML
> From: rahul.akolkar@gmail.com
> To: user@commons.apache.org
> 
> On Wed, Jun 23, 2010 at 8:11 AM, Jorge Moratinos <jo...@hotmail.com> wrote:
> >
> >
> >  Hi,
> >
> > I've some questions about scxml, I'm developing an state machine, but in some cases I called from SCXML a Custom Action, and that Custom Action must be running undergroud and sending new events. My questions are:
> >
> >
> > How can i send new events to the same state machine from the custom Actions?
> >
> <snip/>
> 
> The easiest way is to add an event to the internal event queue (or
> derived events).
> 
> 
> > What are the derivedEvents?
> >
> <snap/>
> 
> As a side-effect of processing an external events, executable content
> may generate internal events to be handled in subsequent processing
> steps. Thus, they are said to be derived as part of the reactive
> behavior in response to other external events.
> 
> 
> > It's posible call a custom action and let the state machine and the custom action running at the same time?
> >
> <snip/>
> 
> Actions are supposed to execute fairly quickly (in theory, they must
> execute in negligible time). Therefore, it is not recommend to have
> long running custom actions. However, the significance of the time
> required to process actions on the "health" of the state machine
> execution depends on the usecase and expected frequency of external
> events.
> 
> While the execution of the action itself should be fairly quick, an
> action may initiate long running processing (for example, by spawning
> another thread). However, in general, in such cases, the semantics
> align more with "do while" rather than "on entry/exit/transition" and
> therefore, the SCXML <invoke> construct may be more appropriate than a
> custom action. The semantics of <invoke> are more aligned with an
> "activity" to be performed while in a state, rather than an action.
> 
> -Rahul
> 
> 
> > thanks,
> >
> > Jorge Moratinos
> > jorgems101@hotmail.com
> >
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
> For additional commands, e-mail: user-help@commons.apache.org
> 
 		 	   		  
_________________________________________________________________
Los cochazos de los famosos Patrick Dempsey, Tom Cruise o Michael Douglas presumen de automóvil
http://motor.es.msn.com/coches/galeria.aspx?cp-documentid=152634169

Re: FW: [SCXML] Some questions about the use of a state machine developed with SCXML

Posted by Rahul Akolkar <ra...@gmail.com>.
On Wed, Jun 23, 2010 at 8:11 AM, Jorge Moratinos <jo...@hotmail.com> wrote:
>
>
>  Hi,
>
> I've some questions about scxml, I'm developing an state machine, but in some cases I called from SCXML a Custom Action, and that Custom Action must be running undergroud and sending new events. My questions are:
>
>
> How can i send new events to the same state machine from the custom Actions?
>
<snip/>

The easiest way is to add an event to the internal event queue (or
derived events).


> What are the derivedEvents?
>
<snap/>

As a side-effect of processing an external events, executable content
may generate internal events to be handled in subsequent processing
steps. Thus, they are said to be derived as part of the reactive
behavior in response to other external events.


> It's posible call a custom action and let the state machine and the custom action running at the same time?
>
<snip/>

Actions are supposed to execute fairly quickly (in theory, they must
execute in negligible time). Therefore, it is not recommend to have
long running custom actions. However, the significance of the time
required to process actions on the "health" of the state machine
execution depends on the usecase and expected frequency of external
events.

While the execution of the action itself should be fairly quick, an
action may initiate long running processing (for example, by spawning
another thread). However, in general, in such cases, the semantics
align more with "do while" rather than "on entry/exit/transition" and
therefore, the SCXML <invoke> construct may be more appropriate than a
custom action. The semantics of <invoke> are more aligned with an
"activity" to be performed while in a state, rather than an action.

-Rahul


> thanks,
>
> Jorge Moratinos
> jorgems101@hotmail.com
>

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