commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Akolkar" <>
Subject Re: [scxml] Handling exceptions thrown by custom actions
Date Tue, 16 May 2006 18:47:47 GMT
On 5/16/06, Nestor Urquiza <> wrote:
> I understand then you are talking about using:
> <transition event="application.error" target="error"/>
> and I assume that your approach is related to call
> from the exception catch block
> exec.triggerEvents(evts); whre evts contains
> "application.error" and I already did it ... and
> thanks it is a valid solution ...

I'd rather use derived events for that as mentioned earlier in the
thread (for reasons such as the ones you mention below). Conceptually,
you can think of the events as coming in via two FIFOs:

 * External events (the bridge is "feeding" the engine external
events, and is also responsible to synchronize the triggerEvent()
calls etc.)

 * Internal / derived events (populated via the "side-effects" of each
external event, such as outcomes of custom actions, and these must be
processed *before* the next external event)


>however I can see
> two problems:
> 1)You need to include a line managing errors in every
> single state that can as result of custom actions
> throw an exception.
> 2)In case of states that can result from two
> transitions comming from two different states then you
> cannot use a generic call "application.error" and so
> your "Bridges" would be doing decisions that ideally
> should be done by the SCXML Engine thru an EL.

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

View raw message