Book a Demo

Author Topic: include and extend in activity diagrams ?  (Read 8204 times)

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
include and extend in activity diagrams ?
« on: July 30, 2007, 08:56:56 am »
Hello,

does UML allow the inclusion of UseCases calls inside Activity Diagrams ? I have about 50 UseCases (partly with include and extend behaviour) and while describing their single Main scenarios, I need to cope with the situation that some of them are calling (include/extend) each other.  

As far as I understand, this is a kind of question how to model "include" or "extend" UseCase situations within activity diagrams.  

Of course, I could unfold all included UseCases inside an acitivty diagram, but I would prefer using a UML compliant linkage symbol. Is there any ?

What do you suggest ?

Regards
Bernd

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: include and extend in activity diagrams ?
« Reply #1 on: July 30, 2007, 11:44:12 am »
If I understand what you're looking for - I might have it backwards, so I'll leave you to think this through - you should start by taking a look at Composite Elements.

[Bernd, I know some of this is old hat to you, but bear with me. I want to cover the basics in case someone else reads this.]

[Note that the following can be used with a variety of element types, not just use cases. Depending on the element you start with, you'll get different options, or possibly none.]

Right-click a Use Case on one of your diagrams. From the context menu choose Advanced | Composite Element. You'll end up with a new Use Case diagram, owned by the Use Case you right-clicked. This new diagram could be used to elaborate (or whatever you prefer) on your original use case.

Next, you can do this with Activity diagrams etc. Once again, right-click a Use Case. Choose Add, then look at the diagram types offered at the bottom of the next context menu level. Choose one of these and something like what you saw above will occur. One major difference is that you don't have the same automatic navigation by double clicking the composite element in future, but you can get around this with a hyperlink or something.

Now, the sweet spot. Create the composite element as above. But, before you enter anything in the 'inner' use case, click (not right-click) the diagram. From the main menu choose Diagram | Change Diagram Type. From the resulting dialog, change the 'inner' use case diagram to an activity diagram.

Now you've got the composite element, with automatic navigation to an 'inner' activity diagram.

David

PS: This could be done in reverse. You could also use trace relations on a higher level diagram to associate use cases and activities. There are lots of variations.
No, you can't have it!

JohnDoe

  • EA User
  • **
  • Posts: 191
  • Karma: +0/-0
  • EA rocks !
    • View Profile
Re: include and extend in activity diagrams ?
« Reply #2 on: July 30, 2007, 09:26:42 pm »
Hello Midnight,

thanks.  ;D


Regards
Bernd
« Last Edit: July 30, 2007, 11:46:19 pm by BerndWill »

megashanna

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: include and extend in activity diagrams ?
« Reply #3 on: August 20, 2007, 12:17:28 pm »
I am reading thru the answer and I would like to verify if this is the same issue I am having.  I have 3 different use cases that all need to link to one use case of exception flows.  Would I be able to use this same process?  Is there a way to link activity diagrams?  

«Midnight»

  • EA Guru
  • *****
  • Posts: 5651
  • Karma: +0/-0
  • That nice Mister Grey
    • View Profile
Re: include and extend in activity diagrams ?
« Reply #4 on: August 20, 2007, 12:54:00 pm »
Quote
I am reading thru the answer and I would like to verify if this is the same issue I am having.  I have 3 different use cases that all need to link to one use case of exception flows.  Would I be able to use this same process?  Is there a way to link activity diagrams?  

I may be way off base here, but take a look at the EAExample project (I am assuming without proof that it has not changed radically since EA 6.1). They provide an interesting way of linking requirement elements. If your use cases each realize (in the sense of a UML realizes link) a separate requirement - or if you can effectively phrase your situation in this way - then you could perhaps relate these by realizing a requirement for each use case, then using the higher level use case to realize a general requirement, as described in EAExample.

Note that there is some variation in opinions about this way of going about things. Personally, I'd not likely do it this way. Still, this might (partly) solve your problem.

As to linking activity diagrams, look at hyperlinks. This might not be quite what you have in mind, but perhaps it would be good enough.

David
No, you can't have it!

megashanna

  • EA Novice
  • *
  • Posts: 2
  • Karma: +0/-0
  • I love YaBB 1G - SP1!
    • View Profile
Re: include and extend in activity diagrams ?
« Reply #5 on: August 30, 2007, 08:45:23 am »
Thanks for the tip.  I actually found what I was looking for from a link from your tip.  It is called a Structured Activity. Thanks, it worked perfect.