I don't know why, but the use case names (useCase.getName()) are in the
format "toJavaClassName" (without the whitespaces) in the following
comparison:

...
        final String name = getName();

        if (name != null)
        {
            final Collection useCases = getModel().getAllUseCases();
                        for (Iterator iterator = useCases.iterator(); 
(useCaseObject==null &&
iterator.hasNext());)
            {
                UseCaseFacade useCase = (UseCaseFacade) iterator.next();
                if (useCase instanceof StrutsUseCase)
                {
                    if (name.equalsIgnoreCase(useCase.getName()))
                        useCaseObject = useCase;
                }
            }
        }
...


so, to make the things work I changed the function to
    protected Object handleGetTargetUseCase()
    {
        Object useCaseObject = null;
        final String name =
org.andromda.core.common.StringUtilsHelper.toJavaClassName( getName() );
//walter

        if (name != null)
        {
            final Collection useCases = getModel().getAllUseCases();
                        for (Iterator iterator = useCases.iterator(); 
(useCaseObject==null &&
iterator.hasNext());)
            {
                UseCaseFacade useCase = (UseCaseFacade) iterator.next();
                if (useCase instanceof StrutsUseCase)
                {
                    if (name.equalsIgnoreCase(useCase.getName()))
                        useCaseObject = useCase;
                }
            }
        }

                if(useCaseObject == null){ //walter
                        
                        final Collection allUseCases = getModel().getAllUseCases();
                        for (Iterator iterator = allUseCases.iterator(); 
(useCaseObject==null
&& iterator.hasNext());)
                        {
                                ModelElementFacade facade = (ModelElementFacade) 
iterator.next();
                                if 
(facade.hasStereotype(Bpm4StrutsProfile.STEREOTYPE_APPLICATION))
                                        useCaseObject = facade;
                        }
                }

        return useCaseObject;
    }


And now the links between the use cases are working. FYI: the "quick menu"
on the right bottom of the application generated with the standard
bpm4struts template does not work too, so I think it is a related problem.

Walter



[EMAIL PROTECTED] grava:
>hi Walter,
>
>I can't tell for sure what is the problem, but I cann tell you this:
>
>by default your final states must each have a name (the name of the
>use-case to which they will forward control), if a name is missing the
>first use-case found having the FrontEndApplication stereotype is assumed
>(there should be only one)
>
>transitions do not need names, only their triggers (when outgoing from a
>FrontEndView)
>
>hth
>
>-- Wouter
>
>>Hi Wouter,
>>
>>Some of my transitions targeting final states are not going to the (same
>>name) use cases. It looks some trouble with blanks inside the names, but
>>I'm not sure. 
>>
>>Cheers,
>>
>>Walter
>>
>>
>>---------------------------------------------------------------------------
>>Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A
>>www.arcadian.com.br
>>
>>
>>
>>-------------------------------------------------------
>>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-devel mailing list
>>[EMAIL PROTECTED]
>>https://lists.sourceforge.net/lists/listinfo/andromda-devel
>>
>
>__________________________________________________________________
>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




---------------------------------------------------------------------------
Walter Itamar Mour�o - Diretor de Tecnologia e Projetos - Arcadian S/A
www.arcadian.com.br



-------------------------------------------------------
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-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/andromda-devel

Reply via email to