Author Topic: Child Diagrams for Use Cases -Sequence, Activity  (Read 2462 times)

A.Russell

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Child Diagrams for Use Cases -Sequence, Activity
« on: August 02, 2007, 07:12:47 pm »
How do you position child diagrams under use cases so that when the use case is clicked on the child will show?

In the manual, I found:

Quote
A Sequence diagram is often attached directly under the Use Case to which it refers. This helps keep elements together, both in the model and when documentation is produced. To do this, right-click the Use Case on the diagram and select Composite Element. Alternatively, from the Project Browser window, right-click on the Use Case and select New Child Diagram.


There is no "Composite Element" or "New Child Diagram" option either on the use case or from the Project Browser. There is a "Add Diagram" option, which places a diagram under the use case, but it isn't linked.

I am using Enterprise Architect 7.0



----------------------
Software Consultant
Analyst Programmer/ PM

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #1 on: August 02, 2007, 09:23:55 pm »
I have got the feature under Advanced|Composite element in the context menu.  
Jan 'Bary' Glas

A.Russell

  • EA User
  • **
  • Posts: 28
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #2 on: August 03, 2007, 01:46:45 am »
Thanks.

To do this, right click on the use case in the project window and add the diagram you want. Then, right click on the use case in the diagram view and do as Jan said -select Advanced->Composite Element. The use case will be linked to the diagram you created in the project window under the use case.

Not exactly intuitive, but works.
« Last Edit: August 03, 2007, 01:47:42 am by A.Russell »
----------------------
Software Consultant
Analyst Programmer/ PM

Jan ´Bary´ Glas

  • EA User
  • **
  • Posts: 408
  • Karma: +0/-0
  • Bary
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #3 on: August 03, 2007, 02:03:58 am »
Just a little footnote.
---
"Composite element" feature add a link to first owned diagram. If you want to change the link to another diagram, make the element non-composite, remove all diagrams but the right one and make it composite again.
« Last Edit: August 03, 2007, 02:04:17 am by Bary »
Jan 'Bary' Glas

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #4 on: August 03, 2007, 02:39:36 am »
Here's a neat (IMHO) trick that you can do with composite elements. When you set an element to composite EA will choose the diagram type of the linked 'child' diagram. Before you add anything to the diagram - probably at any time, but I'm trying to avoid complications - you can change the diagram type.

Click on the diagram - this is not necessary, but it will make sure that the correct diagram is both shown and current. Then from the main menu (this is not available on the diagram context menu for some reason) choose Diagram | Change Diagram Type. You'll get the same diagram type dialog as you would when you create a new diagram.

Now you've got your own choice of linked composite diagram, which will work just like the EA default.

David
No, you can't have it!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #5 on: August 03, 2007, 05:22:51 am »
It would seem to me that if one wanted to have a composite activity diagram for a Use Case, it would make sense to have such a diagram for each Use Case senario.

Not only would I consider activity & sequence diagrams, but Protocol Statecharts as well.

I'm considering the question of how would one extend the diagramming approach in this thread to support multiple parallel diagrams.  I guess I'm asking what this community feels would be the Best Practice approach?
« Last Edit: August 03, 2007, 05:23:41 am by jeshaw2 »
Verbal Use Cases aren't worth the paper they are written upon.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #6 on: August 03, 2007, 06:51:55 am »
Hi Jim,

Quote
It would seem to me that if one wanted to have a composite activity diagram for a Use Case, it would make sense to have such a diagram for each Use Case senario.

Not only would I consider activity & sequence diagrams, but Protocol Statecharts as well.

I'm considering the question of how would one extend the diagramming approach in this thread to support multiple parallel diagrams.  I guess I'm asking what this community feels would be the Best Practice approach?


Now that's a really good idea!

Please put this forward as a suggestion via our 'usual' protocol. I'll vote for it for sure.

David
No, you can't have it!

jeshaw2

  • EA User
  • **
  • Posts: 701
  • Karma: +0/-0
  • I'm a Singleton, what pattern are you?
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #7 on: August 03, 2007, 08:27:02 am »
Interesting thought David, but I was headed in a different direction....

I was thinking that when one clicks on a composite use case, the displayed component diagram might be a class diagram with package elements that are linked to yet more underlying diagrams.  Kinda like a tree structure...?

Not sure which of the appropriate diagram and element types would be most appropriate to pull this off.
Verbal Use Cases aren't worth the paper they are written upon.

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #8 on: August 03, 2007, 11:01:59 am »
I think it would take a bit more than just a tweak Jim.

However, this would be a great new (major) feature. At the same time it would go a long way towards addressing some of the current EA (and UML) limits in this area.

David
No, you can't have it!

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #9 on: August 03, 2007, 01:09:31 pm »
Well.. right now we do put (if applicable )all diagrams (and diagrams types) as links under the relevant use case.
This allows both having a list of diagrams by diagram type and  work on diagram by use case.
I'm not sure it is strict UML, but the fact the EA doesn't force it is one of the reasons we use it.
« Last Edit: August 03, 2007, 01:11:25 pm by MartinT »
Recursion definition:
If you don’t understand the definition read "Recursion definition".

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #10 on: August 03, 2007, 01:42:05 pm »
Which makes sense Martin.

What I liked about Jim's suggestion was the link between diagrams and scenarios (or more to the point, a specific diagram to a specific scenario). This could take us to a whole new level.

Of course, the whole range of options currently available would remain undisturbed. Making use of this feature would be entirely optional. It would be there if it fit well with the local methodology or needs.

David
No, you can't have it!

Martin Terreni

  • EA User
  • **
  • Posts: 672
  • Karma: +0/-0
  • Sorry, I can't write
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #11 on: August 04, 2007, 11:29:19 am »
I think I didn't understand what Jim wrote. but now explained it does sound like a very good idea.
Recursion definition:
If you don’t understand the definition read "Recursion definition".

sargasso

  • EA Practitioner
  • ***
  • Posts: 1406
  • Karma: +1/-2
  • 10 COMFROM 30; 20 HALT; 30 ONSUB(50,90,10)
    • View Profile
Re: Child Diagrams for Use Cases -Sequence, Activi
« Reply #12 on: August 05, 2007, 11:32:07 pm »
Hi Jim,

I've been doing this for yonks - just make the first diagram a structure diagram, fill it with objects sterotyped as <<scenario>>, make them composite and treat the child diagram according to whim.

... but...

1) I tend not to go from usecase to sequence, prefer usecase to (what us oldies called a) collaboration diagram.
2) I can't really see the connection between scenario and sequence, surely all that changes is the outcomes?  Hence, collaborations.

bruce
"It is not so expressed, but what of that?
'Twere good you do so much for charity."

Oh I forgot, we aren't doing him are we.