Book a Demo

Author Topic: Sequence Diagram - Showing elements as links  (Read 3395 times)

AndyRich

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Sequence Diagram - Showing elements as links
« on: March 11, 2013, 11:56:48 pm »
Help required

I'm creating a sequence diagram and adding <<entity>> classes to it by dragging them in from the project browser. However they are being created as instances of the classes rather than added as a link to the existing class.

Can anyone advice how I add them as links as I don't want new elements created?

I know this has been done before as I have an example of a diagram that contains the classes and actors as links to existing elements.

Thanks

Andy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Sequence Diagram - Showing elements as links
« Reply #1 on: March 12, 2013, 01:35:36 am »
Press Ctrl-L when the lifeline is selected and choose the classifier.

Alternatively you can clrt-drag a class onto a seq. diagram to make an instance. That will create an object in the browser instead of a lifeline. However, the diagram looks the same.

q.

AndyRich

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: Sequence Diagram - Showing elements as links
« Reply #2 on: March 12, 2013, 01:59:20 am »
Thanks qwerty

It's actually the opposite of this that I'm looking to achieve. I need to link it to the existing class element. Using the Ctrl-L approach allows me to select a classifier, as suggested but it doesn't appear to change anything., possibly as the instance of that class has already been created at that point.

Using the Ctrl-drag approach doesn't appear to offer me the option of adding the class as a link as I would expect it to. A colleague suggested the same approach and it appears he has this option but I don't.

It may be something to do with my settings or that of the diagram. I'm on v10 of EA.

Andy

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Sequence Diagram - Showing elements as links
« Reply #3 on: March 12, 2013, 05:01:07 am »
Andy,
I have to correct you as what you want does not make sense. Not classes operate but rather their instances. For that reason a sequence diagram must contain instances, not classes. Further, if you're going to im-/export via XMI (e.g. for a VC system) your diagrams get clobbered when using classes. This is explained somewhere in the EA documentation. So a good advice: do not put classes into sequence diagrams!

q.

[edit] If you really want to place a class in a seq. diagram (I've warned you) ctrl-drag the class and choose "as Simple Link"
« Last Edit: March 12, 2013, 05:04:48 am by qwerty »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Sequence Diagram - Showing elements as links
« Reply #4 on: March 12, 2013, 07:39:22 pm »
Andy,

To change the default option you have to Ctrl-Drag a class on to a Class Diagram (not a sequence diagram) and check both option under the "Options" button.

Then try to drag (normal drag, without Ctrl) a class onto a sequence diagram.

Ctrl-Drag on Sequence diagram doesn't have the required options.

Geert