Hi Wouter,

I double checked everything and now it works fine!.

Thanks again.

Stefan




|--------+------------------------>
|        |          [EMAIL PROTECTED]|
|        |          tscape.net    |
|        |                        |
|        |          14.06.2004    |
|        |          16:46         |
|        |                        |
|--------+------------------------>
  
>------------------------------------------------------------------------------------------------------------------------|
  |                                                                                    
                                    |
  |       An:     [EMAIL PROTECTED], [EMAIL PROTECTED]                                 
 |
  |       Kopie:                                                                       
                                    |
  |       Thema:  RE: [Andromda-user] bpm4struts: problem with guard outcome           
                                    |
  
>------------------------------------------------------------------------------------------------------------------------|




yeah that's annoying in MagicDraw (you're using MagicDraw, right ?)

you need to set both the name and the condition in a guard, bpm4struts is
taking the conditionif I am not mistaken (I don't really remember and
cannot check from here)

can you make sure all of that is okay ? just take a look at how I named the
guard in the animal quiz.

-- Wouter

[EMAIL PROTECTED] wrote:

>Hello,
>
>I'm still trying to get my bpm4struts (andromda 3.0m1) sample working (the
>basic functionality allready works quite well...) and now I'm running in a
>problem with guard outcomes.
>I'm not sure if this issue was allready discussed here (please forgive me
>in that case...), but I haven't found anything in the archive...
>
>I have a transition going into a decision point, having a trigger call
>event referencing a controller class method "ticketsVerfuegbar" (german
for
>"ticketsAvailable") that returns a primitive boolean.
>I have to outgoing transitions with guards, which have name and condition
>text "true" and "false".
>
>Unfortunatly in the corresponding Action Class the following code is
>generated:
>
>    private ActionForward ticketsVerfuegbar(ActionMapping mapping,
>ActionForm form, HttpServletRequest request, HttpServletResponse response)
>throws Exception
>    {
>        final String value =
>String.valueOf(ReservierungController.getInstance
>().ticketsVerfuegbar(mapping, (ReservierungForm)form, request, response));
>
>        if (value.equals("$outcome.guardName")) return
>zeigeHinweis(mapping, form, request, response);
>        if (value.equals("$outcome.guardName")) return
>reserviereTickets(mapping, form, request, response);
>
>        // we take the last action in case we have an invalid return value
>from the controller
>        return reserviereTickets(mapping, form, request, response);
>    }
>
>Instead of "$outcome.guardName" it should be "true" and "false".
>
>In StrutsAction.vsl the velocity script the generates the code is this:
>
>
>#foreach ($decisionTransition in $decisionTransitions)
>#set ($controllerMethodName
>= $decisionTransition.decisionTrigger.controllerCall.name)
>#set ($decisionMethodName = $controllerMethodName)
>    /**
>$decisionTransition.getDocumentation("     * ")
>     */
>    private ActionForward ${decisionMethodName}(ActionMapping mapping,
>ActionForm form, HttpServletRequest request, HttpServletResponse response)
>throws Exception
>    {
>        final String value = String.valueOf
>(${controllerClass.name}.getInstance().${controllerMethodName}(mapping,
>($formBeanClassName)form, request, response));
>
>#foreach ($outcome in $decisionTransition.target.outgoing)
>        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)
>    }
>
>#end
>
>
>I allready patched that part of the code with the current CVS revision of
>StrutsAction.vsl, so now it looks like this:
>
>    private ActionForward ${decisionMethodName}(ActionMapping mapping,
>ActionForm form, HttpServletRequest request, HttpServletResponse response)
>throws Exception
>    {
>        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($defaultOutcome)
>    }
>
>but the problem remains.
>
>Is it a modelling mistake or a bug in bpm4struts. (unlikely, because
almost
>the same is done in animal quiz...)
>
>Any help would be welcome.
>
>Regards
>Stefan
>
>
>
>
>-------------------------------------------------------
>This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
>one installation-authoring solution that does it all. Learn more and
>evaluate today! http://www.installshield.com/Dev2Dev/0504
>_______________________________________________
>Andromda-user mailing list
>[EMAIL PROTECTED]
>https://lists.sourceforge.net/lists/listinfo/andromda-user
>

__________________________________________________________________
Introducing the New Netscape Internet Service.
Only $9.95 a month -- Sign up today at http://isp.netscape.com/register

Netscape. Just the Net You Need.

New! Netscape Toolbar for Internet Explorer
Search from anywhere on the Web and block those annoying pop-ups.
Download now at http://channels.netscape.com/ns/search/install.jsp






-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Andromda-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-user

Reply via email to