commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] two scxml questions
Date Wed, 02 Jul 2008 22:02:59 GMT
On 7/2/08, Wolfgang Rabl <> 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.

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?

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
> ,  b) should map to "Listening to state machine progress".


> 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.

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.



>  Thank you,
>  Wolfgang

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message