From: Wouter Z. <dra...@us...> - 2004-05-27 22:55:33
|
User: draftdog Date: 04/05/27 15:55:26 Modified: andromda-bpm4struts/src/templates StrutsAction.vsl Log: the last $outcome seems to get lost when it targets a final state or jsp page, this has been solved by using a more global variable to keep track of it Revision Changes Path 1.11 +5 -3 cartridges/andromda-bpm4struts/src/templates/StrutsAction.vsl Index: StrutsAction.vsl =================================================================== RCS file: /cvsroot/andromda/cartridges/andromda-bpm4struts/src/templates/StrutsAction.vsl,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -r1.10 -r1.11 --- StrutsAction.vsl 7 Apr 2004 20:39:40 -0000 1.10 +++ StrutsAction.vsl 27 May 2004 22:55:25 -0000 1.11 @@ -107,12 +107,14 @@ { final String value = String.valueOf(${controllerClass.name}.getInstance().${controllerMethodName}(mapping, ($formBeanClassName)form, request, response)); +#set ($defaultOutcome = false)## keeps track of the last transition #foreach ($outcome in $decisionTransition.target.outgoing) +#set ($defaultOutcome = $outcome) if (value.equals("$outcome.guardName")) return #processTransition($outcome) #end // we take the last action in case we have an invalid return value from the controller - return #processTransition($outcome) + return #processTransition($defaultOutcome) } #end |