commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [SCXML] Help with sending events
Date Fri, 24 Mar 2006 21:15:49 GMT
On 3/24/06, Mike Sparr - <> wrote:
> Hey,
> I see you got that far.  You will create your own implementation of the
> EventDispatcher interface and within, capture the event and place in object
> stored in session (in memory hashmap).  That object that contains the event
> can be accesses from your controller and you can fire an event based on the
> event captured from the Send object.

Hi Mike,

This will indeed work. We can also get this done without the
bi-directional association implied below (so the EventDispatcher
doesn't need a "handle" back to the SCXMLExecutor -- either directly
or via some other intermediary). We can short-circuit the
EventDispatcher for the specific usecase Shylaja points out, simply by
adding the event to the derived events in Send#execute(), and avoiding
the callback on the EventDispatcher altogether (from where we'd only
have to figure out our way back). The derived events get "triggered"

Thanks, as always, for your input. Nice to know your (gomzee's?)
system is up and running.


> Class that implements EventDispatcher
> XXX implements EventDispatcher {
> ....
>    public void send(String sendId, String target, String targetType,
>            String event, Map params, Object hints, long delay,
>            List externalNodes) {
>         get event from here, place in object that your controller can
> access, then call TriggerEvent from within there.
>     }
> ...
> }
> ========
> Your controller class can TriggerEvent:
>            TriggerEvent[] te = { new
> TriggerEvent(someStoredObject.getEvent(),
>                    TriggerEvent.SIGNAL_EVENT) };

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

View raw message