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] Help with sending events
Date Fri, 24 Mar 2006 21:15:49 GMT
On 3/24/06, Mike Sparr - www.goomzee.com <mike@goomzee.com> 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.
>
<snip/>

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

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

-Rahul


> 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) };
>
>
<snap/>

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


Mime
View raw message