commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rahul Akolkar <>
Subject Re: [SCXML] getting set datats in the datamodel
Date Wed, 01 Apr 2009 19:24:00 GMT
On Tue, Mar 31, 2009 at 7:46 AM, Linda Erlenhov
<> wrote:
> Hello again!
> I have a problem with my datamodel. Or rather the fetching of datas that are
> used in the datamodel.
> I have my editor for building statemachines graphical, this is then
> "translated" into a corresponding SCXML document that then is run "normally"
> with Apache commons. The person that uses the editor shoul amongst other
> things be able select if she/he has want´s some data to be set (integers or
> strings) when entering states.
> The GUI that communicates with the machine does this via an interface wich
> is the thing I´m writing now. The GUI can send subscriptions requests for
> data wich basically means that it wants to subscribe certain data and wants
> the interface to send it when the data is changed.
> How I solved the part of saving checking the data is somewhat irrelevant,
> the problem is when I want to fetch the data that is saved. Since the model
> doesn´t "tell" when data has changed I check whenever entering a state
> (onEntry Listner) but where do I check this.
> Where is this, the data, saved?

This still is all quite vague to me -- for example, not clear where
you put the data in the first place.

If you want to listen to data changes, listening to state changes may
not be the way to proceed (so I wouldn't use SCXMLListener for this
purpose). I can think of multiple potential options:

 * Avoid the need for any data synchronization / subscriptions
altogether - Back the state machine's root context with the actual
data store

 * Declaratively add <transition>s guarded on specific *.change events
- Has the benefit of capturing the associated actions in the SCXML
document itself (use the appropriate executable content on transition)

 * Use a custom Context implementation - This will allow you to
intercept data changes, à la pointcut at
oacs.Context#set(String,Object), and get notifications that way


> best regards
> //Linda

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

View raw message