Book a Demo

Author Topic: Multiple instances of the same element  (Read 4068 times)

AndrewR

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Multiple instances of the same element
« on: June 02, 2010, 05:46:16 am »
Hi there,

I am wondering if there is any way to have more than one instance of the same element on one diagram.  For example:
- the same activity occurring more than once in a process
- the same use case being invoked by multiple services on a distributed use case diagram.

I get the message "Currently only one instance is allowed...".

Wondering if there's a setting I'm missing?

Thanks!  

Till

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Multiple instances of the same element
« Reply #1 on: June 02, 2010, 05:59:11 am »
Yes, this is possible, although it is semantically different from adding the same "activity" multiple times.

An activity can only be defined once, however, you can add multiple "invocations" of that activity to the diagram.

To do this, hold the CTRL key while dragging the activity from the Project Browser to the diagram. In the dialog, select "as Invocation of an Activity (Action)" under "Paste Element into Diagram".

Cheers,

Till


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13471
  • Karma: +571/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Multiple instances of the same element
« Reply #2 on: June 02, 2010, 03:40:20 pm »
Andrew,

The issue you are facing stems from a common misunderstanding about activity diagrams.
In fact Activities should never be used on Activity Diagram, they should only be used a parent of such a diagram. The diagram then becomes the implementation of the Activity.
The diagram itself should only show Actions, some of which can be CallBehaviorActions that can invoke the execution of a Behavior (e.g. an Activity)

Geert

AndrewR

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Multiple instances of the same element
« Reply #3 on: June 03, 2010, 01:53:35 am »
I was only using the Activity as an example of what I would like to accomplish. Let me try again.
In our distributed use case diagram, we have a use case "Create Account" being used by different services.  What I would like to see, if possible, is three Use Case Ellipses Named "Create Account" on the same diagram without having to create three use case elements named "Create Account"

For the sake of reporting, we are not writing scripts or attaching tagged values to these.

Makulik

  • EA User
  • **
  • Posts: 400
  • Karma: +0/-0
    • View Profile
Re: Multiple instances of the same element
« Reply #4 on: June 03, 2010, 02:41:17 am »
Hi Andrew,

Re-use of use-cases is done by using <<includes>> or <<extends>> relationships. I can't remember any semantical meaning in a use case diagram that is accomplished in the way you describe.

HTH
g.

Till

  • EA Novice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Multiple instances of the same element
« Reply #5 on: June 03, 2010, 04:38:58 am »
Andrew,

if you have a scenario where one use case is used by different "services", you would model these services as actors. Then you utilise the "use" association and link all actors to the same use case. That's the normal way of doing it, and you wouldn't need different instances of the same use case at all. If one of these actors uses some additional functionality not included in the original use case, you create a new use case denoting the extended functionality and associate it with the original use case using an <<extends>> relationship.

Cheers,

Till