shale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Craig McClanahan" <craig...@apache.org>
Subject Re: [dialog] Requirement: Uncaught exception ends dialog?
Date Tue, 29 Aug 2006 04:27:30 GMT
On 8/28/06, Paul Spencer <paulsp@apache.org> wrote:
>
> Craig McClanahan wrote:
> > On 8/28/06, Paul Spencer <paulsp@apache.org> 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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message