commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <rahul.akol...@gmail.com>
Subject Re: [SCXML] two scxml questions
Date Wed, 02 Jul 2008 22:02:59 GMT
On 7/2/08, Wolfgang Rabl <wolfgang.rabl@maven.at> wrote:
> Thank you for your quick reply!
>
>  well, i would be particular interested in b)
>
>  I allready tried using the event listeners and they work quite well, but my
> problem here is the lack of information within the listener
> functions(i.e.onEntry). I would like to pass over additional data from the
> SCXML engine, not only the id of the current state.
>
<snip/>

Custom actions are convenient for this, i.e. option (a).


>  It is possible to get access to the datamodel by using the TransitionTarget
> Object that is passed into the function, but i have got a problem here: This
> datamodel contains all the data specified in the scxml file, but only the
> initial values. Even if something changes the values of the datamodel within
> the scxml engine i can only get the old values in the listener functions.
> Why is that so? Am I doing something wrong here? Whats the right way to get
> access to the datamodel from the listener?
>
<snap/>

That gives you the model (the state machine definition as it was
authored), not the live instance (which needs to be accessed via the
corresponding Context, a custom action will allow for that). There are
Javadoc notes about this in some places, but clearly not all.


>  One more question:
>  When i take a look at the interaction patterns statet in
> http://commons.apache.org/scxml/guide/using-commons-scxml.html
> ,  b) should map to "Listening to state machine progress".
<snip/>

Yes.


> Now i am not
> quite sure about the first patter, the "Mapping states to activities". May
> it be possible to explain this in other words than on that page?
> Unfortunately i am not able to understand that explanation there.
>
<snap/>

I don't have much email time today, but the RDC usecase [1] uses this
pattern. Its open source, so all details are available if you want to
look. The first two patterns are "lightweight" and don't really work
too well for involved usecases IMO.

-Rahul

[1] http://commons.apache.org/scxml/usecases/scxml-in-rdc-group.html


>  Thank you,
>  Wolfgang
>
>

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


Mime
View raw message