commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fabrizio Morbini <fmorb...@gmail.com>
Subject [scxml] call external actions
Date Wed, 12 May 2010 20:54:55 GMT
Hi, i need to associate some executable action to each scxml state.
These executable actions need to access objects available at the
moment the scxml executor is started.
I looked at the following options:
1) event (btw, i haven't found this in the scxml standard, why is it
in Apache commons scxml?), invoke, send and custom actions: i haven't
found a way to access the executor using these methods.
2) through a listener (SCXMLListener): this works (in a way similar to
the stopwatch example) but going this way i need to store a mapping
between actions and scxml states in the code (i.e. for every scxml
state, a corresponding java method is executed). So, in the listener,
every time the onEntry method is called, i need to check if for that
state there is an associated action and execute it.

to give a concrete example, is there a good way to associate to each
scxml state a method that sends some data (that is state specific)
through a network socket that had been opened when the scxml executor
was started?

is going through the SCXMLListener the best/only option?

thanks

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


Mime
View raw message