RE: [scxml] Flow Control Elements

 What you are asking for is not possible in SCXML because it's not
allowed in the underlying Harel semantics.  The executable content in
<onexit> handlers, transitions, and <onentry> handlers all run as a
single atomic operation before any events are processed or new
transitions taken. 

It is certainly possible to raise events inside these handlers, using
<send> but these events will not be processed until the <onentry>
handlers complete.  

The point behind this semantics is that you are guaranteed that <onexit>
and <onentry> handlers will execute whenever the relevant state is
exited or entered.  (Thus they are similar to pre- and post-conditions
in programming logics.)

You can get the kind of exception handling behavior you want using
normal state logic (e.g., null transitions with executable content,
<invoke>, etc.) - but you can't interrupt <onentry> or <onexit>

- Jim

-----Original Message-----
From: [] On
Behalf Of Nestor Urquiza
Sent: Tuesday, July 11, 2006 3:59 PM
Subject: [scxml] Flow Control Elements

Hello guys,

I have been wondering how SCXML handles the case in
which being in an onentry handler the application
logic needs to fire a particular event.

The above can be achieved using control elements "if",
"elseif" and "else" together with "var" elements to
collect the information and so just apply the
transitions to specific states while evaluating those

However, I am trying to find an alternative that
allows scxml to generate an internal event that is
supposed to take priority over the current execution.
Ideally that functionality would allow just to stop
the "onentry" handler flow and just execute the
"transition" associated to the internal thrown event.

Having if, else, elseif approach forces testing the
rest of the conditions which can contain executable
code as well. Think about this as a mean of a "break
onentry", "return", or even "exception handler" kind
of behavior.

I think the "send" datamodel operation can be used for
this purpose and what is not clear to me which would
be the syntax for the particular usecase I have been
describing above.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 

Received on Wednesday, 12 July 2006 13:44:24 UTC