I wouldn't chain actions, but tasks executed by actions. Francesco
-----Messaggio originale----- Da: PILGRIM, Peter, FM [mailto:[EMAIL PROTECTED] Inviato: luned� 13 ottobre 2003 12.39 A: 'Struts Developers List' Oggetto: RE: Struts-chain Behavior Discussion > -----Original Message----- > From: Craig R. McClanahan [mailto:[EMAIL PROTECTED] > Sent: 06 October 2003 17:25 > To: Struts Developers List > Subject: Re: Struts-chain Behavior Discussion > > > Paul Speed wrote: > > >I haven't looked at the implementation yet (I intend to when I have > >more than 2 seconds free) but I have been lurking in this > >discussion. > > > >It seems to me that if a command could nest a chain then all things > >are possible. In fact, you wouldn't even need the "jump to last > >command" logic since that step would be part of the master chain. > > > >Craig's example might then be like: > >(1) LookupCommand > >(2) ExceptionCatcher > >(3) SelectLocale > >(4) SelectAction > >(5) Process Form > > (a) CreateActionForm > > (b) PopulateActionForm > > (c) ValidateActionForm > >(6) CreateAction > >(7) ExecuteAction > >(8) PerformForward > > > > > >I don't know how easy it would be to run a chain from a command, so > >it may not be feasible. From a processing perspective, it seems > >clearer to me. > > > > > Running a command from a chain is trivial. In fact, that's what the > ValidateActionForm code (quoted below) already does. In this > case, it's > done for conditional behavior, but that is not required. You can > actually nest chains inside other chains (remember that Chain > *extends* > Command) for arbitrarily complex straight through processing flows. > Yes you multi-dimensional chains of responsibilities. One dimension for default chain, and another axis for a fork. *Question of Architecture* Does this mean that we have solved the hideous Action Chaining debate? In theory an Struts Action could be refactored to be a type of ``Command'' and therefor Actions could be chained. Or is the recommendation. Do not make Actions chainable whatsoever, but instead write (chains of modular commands) that are called from singular monolithic Actions? -- Peter Pilgrim, Struts/J2EE Consultant, RBoS FM, Risk IT Tel: +44 (0)207-375-4923 *********************************************************************************** This e-mail is intended only for the addressee named above. As this e-mail may contain confidential or privileged information, if you are not the named addressee, you are not authorised to retain, read, copy or disseminate this message or any part of it. The Royal Bank of Scotland plc is registered in Scotland No 90312 Registered Office: 36 St Andrew Square, Edinburgh EH2 2YB Regulated by the Financial Services Authority Visit our website at http://www.rbs.co.uk/CBFM/ *********************************************************************************** --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Questo messaggio di posta elettronica contiene informazioni di carattere confidenziale rivolte esclusivamente al destinatario sopra indicato. E' vietato l'uso, la diffusione, distribuzione o riproduzione da parte di ogni altra persona. Nel caso aveste ricevuto questo messaggio di posta elettronica per errore, siete pregati di segnalarlo immediatamente al mittente e distruggere quanto ricevuto (compresi i file allegati) senza farne copia. Qualsivoglia utilizzo non autorizzato del contenuto di questo messaggio costituisce violazione dell'obbligo di non prendere cognizione della corrispondenza tra altri soggetti, salvo pi� grave illecito, ed espone il responsabile alle relative conseguenze. Confidentially notice. This e-mail transmission may contain legally privileged and/or confidential information. Please do not read it if you are not the intended recipient(S). Any use, distribution, reproduction or disclosure by any other person is strictly prohibited. If you have received this e-mail in error, please notify the sender and destroy the original transmission and its attachments without reading or saving it in any manner.
