Use of actor inside class diagrams

0 votes
asked Aug 22, 2014 in Wanted features by eruffaldi (160 points)
I am interested in using actor inside a class diagram for supporting some types of SysML diagrams.

Is it possible to use the actor shape in class diagrams?

 

Best,

Emanuele

2 Answers

0 votes
answered Aug 24, 2014 by plantuml (182,820 points)
Hello,

No it's not possible today.

Component and Use Case diagrams have been already merged (meaning that you can mix component/actor/usecase in the same diagrams).

Howere, class diagrams have some features (like association class for example) that does not exist in component/actor/usecase diagrams. So merging all are not that easy...

Right now, do you want to use only actors in class diagrams ?
commented Aug 25, 2014 by eruffaldi (160 points)
Thanks for the answer. Indeed for the moment I used the Component Diagram.

Yes, I just need the Actor shape in the class diagram. It is useful for some Block Definition Diagram.

Anyway I am still exploring the best way of mapping a good part of SysML using PlantUML.
0 votes
answered Sep 30, 2014 by plantuml (182,820 points)

We have to use a new keywords to allow usecase/actor inside a class diagrams.

If you download the last beta (8009beta1) : https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

You can try:

@startuml
class foo1
mix_usecase foo2
mix_actor foo3
foo1 -- foo2
@enduml


We hope that adding new keywords is not a issue for users.

Any though?

commented Oct 1, 2014 by anonymous
Yes! Thanks. I will make great use of that

Best,
Emanuele Ruffaldi
commented Oct 1, 2014 by anonymous
It might be an issue. I'm using a lot the nice "!include" command (that's where I'd get my usecase from for example).But this will do the job for now ;-)
commented Oct 1, 2014 by plantuml (182,820 points)
Ok.
What about introducing yet another keyword "allow_mixing" that can be used to denotate that a class diagram can have actor/usecases...

We've built a new beta V8009beta2 https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

With this version, both solutions are working:

@startuml
allow_mixing
class foo1
usecase foo2
actor foo3
foo1 -- foo2
@enduml

@startuml
class foo1
mix_usecase foo2
mix_actor foo3
foo1 -- foo2
@enduml

It should help to manage your !include.

However, we don't know if we will have both allow_mixing and mix_usecase/mix_actor keywords in the official final release.

We should probably keep only one solution, maybe the "allow_mixing" one.
Any though (again)?

Regards,
...