Hi This is definitly inline with what I was thinking about with: http://issues.apache.org/struts/browse/SHALE-175, actually more elegant. Beeing able to define the action/transition for a given exception definitly is the way to go.
Hermod -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of Craig McClanahan Sent: Tuesday, August 29, 2006 6:27 AM To: [email protected] Subject: Re: [dialog] Requirement: Uncaught exception ends dialog? On 8/28/06, Paul Spencer <[EMAIL PROTECTED]> wrote: > > Craig McClanahan wrote: > > On 8/28/06, Paul Spencer <[EMAIL PROTECTED]> wrote: > > > <snip> > > > >> o Is exception management needed in the dialog state management? > > > > > > Seems like it should be. What do you think *should* happen with respect > to > > exceptions here? > > Treat an exception like a transition. Thus allowing then next state to be > a view, action, subdialog or end. A dialog default also can be > configured. > > <dialog name="EnterCustomer" > start="enterCustomer" > defaultException="displayException" ...> > <transition exception="SqlException" target="pleaseCallTheDBA"/> > <view name="enterCustomer"...> > <tranistion outcome="success" target="saveCustomer"/> > </view> > <action name="saveCustomer"> > <transition exception="CustomerAlreadyExists" target="editCustomer"/> > <transition outcome="success" target="done"/> > </action> > <view name="editCustomer".../> > <end name="done".../> > <end name="pleaseCallTheDBA".../> > <end name="displayException".../> > </dialog> Now *that* is definitely clever -- and we can even couple it with the behavior of a servlet container (exception declarations work for that exception or any subclass of that exception) to be even more consistent with the overall platform. It's pretty clear what to do with our classic syntax for dialog configs. It'll be interesting to see how we might be able to model this idea when we can't change the schema for the state machine configuration (i.e. such as SCXML). > > > >> Paul Spencer > >> > > Craig > > Craig * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * This email with attachments is solely for the use of the individual or entity to whom it is addressed. Please also be aware that DnB NOR cannot accept any payment orders or other legally binding correspondence with customers as a part of an email. This email message has been virus checked by the anti virus programs used in the DnB NOR Group. * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
