How can I have in 'use cases' two same named 'actors'

Dear all,

I want to create a ‘“Summary” use case diagram’ and a few ‘user level use case diagrams’.
On both I need actors named like ‘mediator’ ‘practitioner’ and ‘consultant’.

However when I create on ‘“User Level” use case diagrams’ those actor’s, and want to create the same named actor’s they get connected and are referencing to/with each other. Also the connection from an Actor to a ‘use case’ got copied. I do get a dialog to accept that, but I don’t want that.

However, I need several different actors with the same name in different ‘use case’ diagrams.

Is there a way to accomplish that? Couldn’t find an answer of my question, but maybe is there an explanation.

Thank you.

Wow, active forum today! :slight_smile:

Welcome to the forum by the way, always nice to see new people show up.

Use different views. Unless you have really compelling reasons to create new model elements the best way is to re-use what you already have. For the full guide on this please check out this guide I wrote a while ago.

But for now: you can re-use model elements within different diagrams. This can become really important once you start adding meta-data into your diagrams because when something changes for your model element then you don’t have to edit every single diagram in which you used the element, but you’d simply edit the element and the rest is done automagically.

Example:

What are we looking at: in another Use Case diagram I defined an actor called ‘Main user’. Now I want to use that same actor again in this diagram. So I double click the canvas to bring up the resource catalog, add an actor but instead of typing in the name I press control-space. This allows me to select other actor model elements which I defined elsewhere (use the arrow keys).

The result is a new actor with the same name but also a little ‘a’ indicator in the top left corner, this indicates that we’ve created an auxiliary view. Meaning that if I were to apply changes to the actor then those changes happen everywhere (in both use case diagrams).

This is by far the best way to create new model elements with the same name. Don’t worry about the indicators; they don’t copy over when you export your work.

Hope this helps!

2 Likes

Aaaaha an a. :wink:
Control-Space.

VP not open right now, but I saw, if I recall it is otherwise a M.
Nice tip.

But, after better reading, is not what I looking for. I just want two distinct actor’s with the same name.

Again thank you.

BTW, I did read your article some time ago, Nice and clear writing.

1 Like

You can also start typing its name to filter the candidates. Sometimes that’s faster than the arrow keys. You can even use * as a wildcard there. Comes in very handy when you literally have hundreds of elements just waiting to be dropped on the canvas. Which might not be the case with Use Case diagrams but happens frequently with eg. Entity Relationship diagrams.

Thank you also.

But maybe it get lost in my text, but I wan to have actors with the same name but not connected.

Let say f.e. I have a situation that have several consultants, whom doing their own specialism with their own use cases. If I use the same actor then I get in some trouble.
So I should rename the consultant like consultant_with_speciality_X and consultant_with_speciality_Y and so on. But there are also use cases where I need two or more type of consultants/actors.
To generalize this in a summary use case I wan to call them Consultants, but I use already Consultants in a use case where there are Generic Consultants.

At the moment I call my actors like the way as above, but it gives many actors in both levels ‘Summary use case diagram’ and ‘User lever use case diagrams’.

To keep it at this example, is that the way to go?

My thought, I would rather use a generic term/actor with a Note and use the term Consultant/Actor again somewhere else. Seems much more neet to read the Diagrams.

Any suggestions?

Please note that the use of different views doesn’t really ‘connect’ the model elements, what is happening is that you’re simply re-using the same model element within different diagrams.

Within UML this is more or less mandatory because the specifications set up by the OMG mandate specific rules for a model elements name, and Visual Paradigm enforces those. The usual way to create a new model element with the same name is to copy your model element (control-c) and then use the “Paste model element” option:

You can also find this option in the context menu (right click on your canvas).

However: this won’t easily work with UML diagrams because of the restrictions I mentioned earlier. But Visual Paradigm provides a way around this by using different models:

Go to your project browser by either clicking the option in the view menu or using control-shift-b. Select the model structure tab (click on the name) and then you’ll probably see all your diagrams in the root folder of your project.

Right click on your projects name (in my example this is ‘untitled’) and select the ‘Model’ option which allows you to create new models. A model is basically a virtual folder which you can use to keep your diagrams somewhat separated depending on what they are for. An example can be seen in my screenshot: analysis & implementation.

Now you can have model element types which have the same name. This is a screenshot of my ‘Use Case Diagram2’:

image

The auxiliary view (small a) is actually a re-use of the model element in the first Use Case diagram; you can clearly see that the master is not the ShelLuser actor in this diagram (it doesn’t have the M indicator).

This is by far the best way to have multiple copies of the same model element.

Another way to set this up is by using the ‘Model explorer’ pane, you can open it by using the ‘Panes’ option in the view menu:

As you can see I have 2 Use Case actors with the same name by placing them into different models.

But I must stress this out: re-using a model element is a far better idea; it saves resources, it helps you to keep track of its usage and if you need to suddenly change a model element (its name for example) you only have to do this once.

Unless you create a new view.

You can also use the model explorer pane which I showed you above and then simply drag in the actor(s) which you want to re-use and let Visual Paradigm handle the rest. If those indicators bother you then simply turn them off (see the ‘Model Indicator’ option in my screenshots above).

But if you really want a new setup with new model elements then using a different model is definitely the way to go.

I hope this can give you some new ideas, and don’t hesitate to post if you have more questions or comments!

HI Rvamerongen,

The answer is yes and no. You cannot have two actors with the same name in the same level (i.e. under the same parent, or both under the root of project), but you can if the actors are located in different levels.

So you can first create a container (I used Model in this example, but you can use model element of any kind) for each actor in the Model Explorer first, and then create an actor under each.

image

And you can drag and drop the actor from Model Explorer to diagram to create the shape to visualize it.

Hope this would help,

Antony.