1

How to show «include» and «extend» in activity diagram? And how can I show types in activity diagram. E.g. Vehicle is of 2 types i.e Bike and Car. So how can I show this in activity diagram?

Jim L.
  • 6,177
  • 3
  • 21
  • 47
  • 1
  • What do you mean by "types in AD"? In which context? – qwerty_so Apr 09 '16 at 11:23
  • @Pramodyadav, does this other answer cover what you want to know about "how can I show types in activity diagram"? http://stackoverflow.com/questions/36468356/linking-activity-diagram-to-entities-to-be-accessed/36478927#36478927 – Jim L. Apr 10 '16 at 03:28
  • 1
    If you have access to Enterprise Architect you should to model some use cases that include other use cases using the structured use case scenario's. If you can generate an Activity Diagram (choose for Activity with Action) based on this scenario you will see how EA will add an Action that calls the activity of the included use case. More or less how @JimL. explained it. – Geert Bellekens Apr 10 '16 at 05:54
  • Welcome to StackOverflow, @Pramodyadav. If you found an answer to your question, please consider [accepting it](http://meta.stackexchange.com/q/5234/179419) (by clicking the check-mark), and consider up-voting it (by clicking the up arrow). Accepting an answer indicates to the wider community that you've found a solution, gives yourself some reputation points, and gives some reputation points to the person who answered your question. If you did not find a satisfactory answer to your question, please leave a comment. – Jim L. Apr 10 '16 at 19:06

2 Answers2

1

(This answer is independent of whether or not you should use «include» or «extend».)

A use case can be specified any number of ways. For some examples, you can use natural language, tables, or activity diagrams.

It appears that you would like to specify use cases as activities. In that case, each use case is specified by one activity diagram. The one to one correspondence between a use case and an activity also holds true for included use cases and extending use cases.

The way you would specify an inclusion on a use case's activity diagram is as an action that calls the activity of another use case. It's that simple.

The way you would specify in extension is more complicated. The UML 2.5 specification says:

The specific manner in which the location of an ExtensionPoint is defined is intentionally unspecified.

An extending use case is one that composes one or more extension points. Each extension point may specify a condition that must hold in the extended use case. When that condition holds, the extending use case's behavior will activate. This extension point does not show up in the activity diagram of the extended use case.

Regarding your question about types, none of us really know what you're asking. Please let me know whether or not this other answer is what you need: Linking activity diagram to entities to be accessed.

Community
  • 1
  • 1
Jim L.
  • 6,177
  • 3
  • 21
  • 47
0

Simply speaking: you must no show it if you avoid it. I/E are bad constructs since they lead people to using functional decomposition during use case synthesis.

If, for what reason ever, you have a case with I/E you can place the Activity of the according use case as invocation action in your sequence of actions. That will simply represent the I/E. And depending on whether it's optional/mandatory will be clear by the flow of events.

I leave your type-question out until you clarify that.

qwerty_so
  • 35,448
  • 8
  • 62
  • 86