Hi Wouter,
Now I understand the use of <<FrontEndException>>. Before using bpm4struts
I've being using a "RecoverableException" class, so it is easy to continue
using the same exception class.
I will change some things in my way of thinking...
let's suppose a login process. I designed a login process with a decision
"Is username and password correct ?" with the guarded transitions "yes"
and "no". The "yes" transition goes to a final state and the "no"
transition goes back to the user/password form with an error message. Now,
I will change the decision to an action state "Check username and
password" with one "normal" transition to the final state and one
<<FrontEndException>> transition back to user/password form. It looks good
to me, but is that the "correct" way ?
About the wiki documentation: it is very helpful, I think the approach is
correct, and yes, I have an application running with the following use
cases: Login (!), Main menu, Author record insertion and a book CRUD. The
CRUD is not working yet since many forms are being created in the same
page. As I need very much (and soon) this feature working, I think I will
work now in a <<FrontEndMultiActionView>> like template to support this.
Thanks,
Walter
>documentation on the wiki helpful
<[EMAIL PROTECTED]> grava:
>Hi Walter,
>
>This tagged value can be applied only to transitions marked with the
><<FrontEndEvent>> stereotype, therefore only on transitions coming out
>of a 'page' (an action state with the <<FrontEndView>> stereotype).
>
>
>
>The value should be a boolean ("true" or "false"), in MagicDraw you can
>define this tagged value to be of a boolean type, it will render a
>checkbox instead of a plain textfield. Highly recommended.
>
>The success message indicates that when the action succesfully finishes,
>the target page will display a specific message to indicate this.
>
>There will be a specific message loaded from the resource bundle, while
>there is a default message available, you will probably want to change
>it.
>
>
>
>For errors there is a different approach, each action state NOT having
>the <<FrontEndView>> stereotype represents something being processed on
>the server, during this process an exception may occur and you will want
>to handle that.
>
>In struts exceptions are handled declaratively, so the only thing you'll
>need to do is add a transition from the action state to a 'page' action
>state (<<FrontEndView>>) and mark this transition with
><<FrontEndException>>.
>
>Doing so will mean any java.lang.Exception occurring during the
>processing of that action will be handled accordingly and the error
>message will be rendered in the target page (the target of the
>transition)
>
>You may choose to give such <<FrontEndException>> transition a tagged
>value, for example:
>@andromda.struts.exception.type =
>java.lang.OperationNotSupportedException
>
>This will make the exception handler only handle exception that are
>descendants of the specified type.
>
>This way you can have different exceptions report to different pages (so
>this also means different transitions)
>
>Most of the time you'll just want to keep the default transition
>(without the tagged value) to handle all exceptions
>
>
>Many times I have thought about other tagged values than just the one
>for the 'success.message' but I'm not yet convinced it is needed; if you
>want you can give an example to illustrate a case where you would really
>need something which cannot be done already ...
>
>
>Thanks
>c-ya
>Wouter.
>
>
>Ps: Walter, did you already do an application using the new bpm4struts ?
>Is it working for you ? Is the documentation on the wiki helpful or do
>you think it would be better to take a different approach ?
>
>
>
>> -----Original Message-----
>> From: Walter Mour�o [mailto:[EMAIL PROTECTED]
>> Sent: Thursday, April 01, 2004 7:01 PM
>> To: Wouter Zoons
>> Cc: [EMAIL PROTECTED]
>> Subject: bpm4struts - message question
>>
>> Hi Wouter,
>>
>> How to use "@andromda.struts.action.success.message" ?
>>
>> Is there an "error message" or "general message" transition ? could be
>a
>> good thing...
>>
>>
>> Cheers,
>>
>>
>------------------------------------------------------------------------
>--
>> -
>> Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A
>> www.arcadian.com.br
>
---------------------------------------------------------------------------
Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A
www.arcadian.com.br
-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
Andromda-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel