(问题,转自:argouml用户邮件列表)
Date: Wed, 15 Mar 2006 15:58:51 +0530
From: ashikali.abdulkhader@wipro.com  Add to Address Book  Add Mobile Alert 
To: users@argouml.tigris.org
Subject: RE: [argouml-users] How to assign an activity diagram to a controller class.
    
Yeah. It works fine now. !!!
Thank you all.
-Ashik
-----Original Message-----
From: Ludovic Maitre [mailto:ludovic.maitre@free.fr]
Sent: Wednesday, March 15, 2006 1:36 AM
To: users@argouml.tigris.org
Subject: Re: [argouml-users] How to assign an activity diagram to a
controller class.
Hi Dashing and Abdulkhader,
See issue http://argouml.tigris.org/issues/show_bug.cgi?id=4005 for
assigning the context of an activity diagram. Should this issue answer
to your question ?
Dashing Meng wrote:
> He,
> A interesting question,I am happy to hear any reply for it too.
>
> Dashing
>
> */ashikali.abdulkhader@wipro.com/* wrote:
>
>     Hi All,
>    
>     I am currently facing the following problem while building the
>     Online-Store application that comes with AndroMDA.
>    
>     My model is developed using ArgoUML. Currently I face two
>     inter-related problems in building the Online-Store model using
>     the Maven plug-in.
>
>     1) Initially I've created the Activity-Graph in the Use-case's
>     namespace. But there is no way in ArgoUML by which I can assign
>     the activity graph to a controller class (As it is there in
>     Magicdraw) for calling deferrable call events in action states.
>     Hence this resulted in Validation Error during model validation
>     process.
>
>     2) The solution provided is to create the activity graph in the
>     namespace of a Class. Hence I created the activity graph in the
>     controller class's namespace and now am getting the validation
>     error that says "A use case should have one and only one activity
>     graph associated with it".
>
>     Kindly help me how I should design my model in ArgoUML (Associate
>     an Activity Graph with a Controller Class as expected by
AndroMDA)
>     so that I would be able to integrate the model with AndroMDA for
>     code generation.
>    
>     -Ashik
>
------------------------------------------------------------------------
>     *From:* Dashing Meng [mailto:learndiary_dashing@yahoo.com]
>     *Sent:* Monday, March 13, 2006 4:51 PM
>     *To:* users@argouml.tigris.org
>     *Subject:* RE: [argouml-users] How to assign an activity diagram
>     to a controller class.
>
>     I think an activity graph can be in the namespace of a operation
>     of the class or a usecase's namespace.can't be in the namespace
of
>     a class.
>    
>     Dashing
>
>     */ashikali.abdulkhader@wipro.com/* wrote:
>
>         Dashing,
>        
>         Thanks for your information..
>        
>         In my case the activity graph is already in a use-case's
>         namespace.
>        
>         Now how do I map it to a class's namespace..Wouldn't it be
>         redundant.
>        
>         If my understanding is right the behavior is for a usecase
and
>         not for a class right?
>        
>         Pls corr ect me if I am wrong.
>        
>         Regards,
>         Ashik
>
------------------------------------------------------------------------
>         *From:* Dashing Meng [mailto:learndiary_dashing@yahoo.com]
>         *Sent:* Monday, March 13, 2006 4:32 PM
>         *To:* users@argouml.tigris.org
>         *Subject:* Re: [argouml-users] How to assign an activity
>         diagram to a controller class.
>
>         Draw the state graph under class's namespace. It is: click a
>         class at left side of window, then choose "create-> new
>         statechart diagram" on the menu.
>         It seems an operation can't be synchronized between the class
>         diagram and the statechart diagram in both two directions?I
>         don't know it very clear.
>        
>         Dashing
>
>         */ashikali.abdulkhader@wipro.com/* wrote:
>
>             Hi all,
>             Does ArgoUML has the feature of assigning a
state/activity
>             graph to a class so that action states can defer
>             operations to the class?< /DIV>
>             This is required for running my model built in AndroMDA.
>             Regards,
>             Ashik
答案:转自argouml问题跟踪系统:http://argouml.tigris.org/issues/long_list.cgi?issuelist=4005
Make activity graph context assignment easier
Issue #: 4005  Component: argouml  Version: 0.20  Platform: PC 
OS/Version: Windows XP  Status: STARTED  Issue type: ENHANCEMENT  Priority: P3 
Resolution:  Assigned to: rastaman  Reporter: waiyung 
Subcomponent: Diagrams  Target milestone:---     
URL:  
Summary: Make activity graph context assignment easier 
Status whiteboard:
Description:  
I am using the Argouml with Andromda extension.
One thing required by Andromda is to assign a controller class as the context of
an activity graph by adding a tag like these, as quote from Andromda's guide:
-----------
 Add a tagged value to the controller, pointing to the use-case, like this:
@andromda.presentation.controller.usecase=My UseCase  (the value is the name of
the use-case).
-----------
I noticed with or without setting this tag, the exported xmi file from argouml
has the following tag within the activity tag:
-----------
   <UML:StateMachine.context>
                    <UML:UseCase xmi.idref = '.:0000000000000EB9'/>
   </UML:StateMachine.context>
--------
where it references the Use Case.
Is there a way to change the context to point to the controller class?
Thanks,
wai yung------- Additional comments from Ludovic Maître Mon Feb 27 10:38:51 -0800 2006 -------
Hi Wai,
To assign an object as the context of an activty diagram i usually do the
following :
- create an use case
- create a class
- create an activity diagram for the use case
- select the activty GRAPH,
- in the property panel use the dropdown list named "Represented Modelelement"
to assign the context of the graph.
Is it what you want to do ?
 ------- Additional comments from Bob Tarling Mon Feb 27 12:11:28 -0800 2006 -------
Is it worth adding context menus to help with this?
Right click on diagram background or explorer element?------- Additional comments from wai yung Tue Feb 28 07:54:39 -0800 2006 -------
Yes. This is exactly what I want.
Thanks------- Additional comments from Ludovic Maître Tue Mar 14 14:07:23 -0800 2006 -------
*** Issue 4090 has been marked as a duplicate of this issue. ***
--------------------------------------------------------------------------------