Thread View: borland.public.together.modeling
2 messages
2 total messages
Started by Lukas Schneider
Tue, 24 Apr 2007 20:34
Create UML Classes from Activities
Author: Lukas Schneider
Date: Tue, 24 Apr 2007 20:34
Date: Tue, 24 Apr 2007 20:34
12 lines
1232 bytes
1232 bytes
Hi, I am just trying to create a class diagram from an activity diagram using QVT an Together Architect 2006. Since I am doing this for the first time I have some difficulties creating a transformation. What I intend to do is: -Create a package for each action -Create a class within these packages for each input pin. Respectively for each object node connected to those input pins. Can anybody tell me how to do that?
Re: Create UML Classes from Activities
Author: ElenaA
Date: Wed, 25 Apr 2007 10:05
Date: Wed, 25 Apr 2007 10:05
73 lines
2519 bytes
2519 bytes
you can try smth like this:
transformation Activity_To_Model;
import library together.uml;
metamodel 'http://www.borland.com/together/uml';
metamodel 'http://www.borland.com/together/uml20';
mapping main(in model: uml20::activities::Activity): uml::together::Model {
object {
nestedPackages :=
model.nodes.oclAsType(uml20::activities::Action)->collect(act |
act.action2package())->asOrderedSet();
}
}
mapping
uml20::activities::Action::action2package():uml::kernel::packages::Package {
init {
var linkedObjects :=
self.inputs.getIncomingLinks().oclAsType(uml20::activities::ObjectFlow).client.oclAsType(uml20::activities::AnonymousObjectNode);
}
name:= self.name;
ownedMembers+= self.inputs.pins2classes();
ownedMembers += linkedObjects.objects2classes();
}
mapping uml20::activities::InputPin::pins2classes():uml20::classes::Class{
name:= self.name;
}
mapping
uml20::activities::AnonymousObjectNode::objects2classes():uml20::classes::Class{
name:= self.name;
}
"Lukas Schneider" <lukas.schneider@hotmail.com> wrote in message
news:462e6a35@newsgroups.borland.com...
> Hi,
>
> I am just trying to create a class diagram from an activity diagram
> using QVT an Together Architect 2006.
>
> Since I am doing this for the first time I have some difficulties
> creating a transformation. What I intend to do is:
> -Create a package for each action
> -Create a class within these packages for each input pin.
> Respectively for each object node connected to those input pins.
>
> Can anybody tell me how to do that?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads