Sparx Systems Forum

Enterprise Architect => General Board => Topic started by: A DC User on October 22, 2013, 01:37:40 am

Title: Hyperlink to activity diagram creates new activity
Post by: A DC User on October 22, 2013, 01:37:40 am
Hi All,

I'm creating an activity diagram, and I want to insert an activity (i.e. a sub-activity). I'd like the icon in the parent diagram to open the activity diagram for the sub-activity. However, if I mark an action in the parent diagram as a CallBehavior to get the sub-activity trident indicator, that doesn't automatically link to the sub-activity or any related diagram, and if I drag the sub-activity diagram onto the parent diagram and create a hyperlink, a new and unwanted activity is create in the project browser. If I delete the new, superfluous, activity, the link disappears in my parents diagram.

Is there any way to get the linking behavior I'm looking for without the unneeded activity element?

Thanks!
Title: Re: Hyperlink to activity diagram creates new acti
Post by: qwerty on October 22, 2013, 03:11:25 am
You're after the Make Composite feature. Check the New Diagram/(Select) Composite context menu.

q.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: A DC User on October 22, 2013, 05:04:42 am
Thanks, that's likely to be helpful. I remember seeing the Make Composite option when I used EA at another job, but my current installation only offers Advanced > Use Rectangle Notation and Tagged Values... when I right-click an action in a diagram. Is this something that needs to be enabled somewhere? I'm using the Corporate version at this point.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: A DC User on October 22, 2013, 05:32:06 am
I think I have this figured out now. There is (as my EA 10 is current configured) no Advanced > Make Composite option. However, if you select an Activity element (not an Action) in either a diagram or the Project Browser and right click, you get the New Diagram > Select Composite Diagram option. If you select a diagram, then the Activity infinity symbol-like identifier appears in the lower right of the Activity's box, and when it is double-clicked, the selected diagram, rather than the Properties window, opens. Once it is selected, the New Diagram > Composite option appears and is selected, and unselecting it removes the diagram association and the Activity is no longer a composite.

It took some experimentation since it's not clearly covered in the help anywhere I could find, but it is in fact what I was looking for. Thanks.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: qwerty on October 22, 2013, 08:30:09 am
In pre 10 the option was Advanced/Make Composite. Now it's moved to New Diagram/... Sparx likes to change the menu structures each major release. Funny now that removing the composition is located under New Diagram/... Now, that's intuitive  :(

q.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: Hermelin on November 14, 2013, 12:11:07 am
Is it possible to make EA create another kind of diagram than the standard CompositeStructure (either directly or through MDG)?

I want to use another kind of diagrams, and it's tedious, in a large model, to create one yourself and then go through the Select composite menu.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: qwerty on November 14, 2013, 03:48:58 am
Via MDG you can create your own kind of diagram. However, there are actually only two really different ones: sequence and non-sequence. The only different flavor is the associated toolbox. So, what do you actually mean by "another kind of diagram"?

q.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: Hermelin on November 14, 2013, 08:32:00 pm
I meant that I want to create a composite diagram that is connected with another Toolbox, than the default.

In my MDG I have defined a CompositeStructure diagram with certain Toolboxes. When I then make a composite diagram I would like to pick my custom diagram straight away. Even more slick, to be able to in the MDG define that when creating a composite of a certain stereotype the corresponding composite diagram would be a certain custom type.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: qwerty on November 14, 2013, 09:49:20 pm
IIRC there is a way to create a composite diagram along with an element from a MDG. Unfortunately I currently do not remember how to achieve that. Maybe our MDG guru Phil Chudley has an idea?

The connection diagram/toolbox is however not bound to the composite state. The latter is some flag which links an element with a single diagram. So you can set any diagram you want to be an element's composite.

q.
Title: Re: Hyperlink to activity diagram creates new acti
Post by: Hermelin on November 14, 2013, 11:49:51 pm
I found it.

By adding _defaultDiagramType on the metaclass you can determine the diagramtype to use for composite, can also make them composite by default with the attribute _makeComposite :: true.

http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/defining_child_diagram_types.html

http://www.sparxsystems.com/enterprise_architect_user_guide/10/extending_uml_models/creating_composite_elements.html

Not sure what they mean by: "... the attribute prefix is not a direct reference to the technology name" since the attribute value must be MDG::DiagramName

Rejoice, EA provides!
Title: Re: Hyperlink to activity diagram creates new acti
Post by: KP on November 15, 2013, 09:10:06 am
Quote
Not sure what they mean by: "... the attribute prefix is not a direct reference to the technology name" since the attribute value must be MDG::DiagramName
It's DiagramProfile::DiagramName. If you name your diagram profile the same as your technology, it isn't an issue.