A use case diagram
is a visual representation used in software engineering to depict the interactions between system actors
and the system itself
. It captures the dynamic behavior of a system by illustrating its use cases
and the roles that interact with them. These diagrams are essential in specifying the system's functional requirements
and understanding how users will interact with the system. By providing a high-level view, use case diagrams help stakeholders understand the system's functionality and its potential value. PlantUML
offers a unique approach to creating use case diagrams through its text-based language. One of the primary advantages of using PlantUML is its simplicity and efficiency
. Instead of manually drawing shapes and connections, users can define their diagrams using intuitive and concise textual descriptions. This not only speeds up the diagram creation process but also ensures consistency and accuracy
. The ability to integrate with various documentation platforms and its wide range of supported output formats make PlantUML a versatile tool for both developers and non-developers. Lastly, being open-source
, PlantUML boasts a strong community
that continually contributes to its improvement and offers a wealth of resources for users at all levels.
유즈케이스는 (두개의 괄호는 원으로 보이기 때문에) 괄호로 싸서 표현합니다.
키워를 이용하여 정의할 수 있습니다. 그리고
키워드를 이용하여 별칭을 정의 할 수 있습니다. 별칭은 관계를 정의할 때 사용됩니다.
액터를 정의하는 이름은 콜론 사이에 있습니다.
Actor 키워드를 사용하여 액터를 정의할 수도 있습니다.
별칭은 as 키워드로 할당될 수 있으며, 나중에 관계를 정의할 때 액터 이름 대신 사용될 수 있습니다.
다음 예에서 액터 정의는 선택 사항임을 알 수 있습니다.
You can change the actor style from stick man (by default)
- an awesome man with the
skinparam actorStyle awesome command;
- a hollow man with the
skinparam actorStyle hollow command.
Stick man (by default)
Awesome man [Ref. QA-10493]
Hollow man [Ref. PR#396]
If you want to have description on several lines, you can use quotes.
You can also use the following separators:
. And you can put titles within the separators.
You can use packages to group actors or use cases.
You can use
to change the display of the package.
To link actors and use cases, the arrow
The more dashes
in the arrow, the longer the arrow. You can add a label on the arrow, by adding a
character in the arrow definition.
In this example, you see that User
has not been defined before, and is used as an actor.
If one actor/use case extends another one, you can use the symbol
You can use the
note left of
note right of
note top of
note bottom of
keywords to define notes related to a single object.
A note can be also define alone with the
keywords, then linked to other objects using the
You can add stereotypes while defining actors and use cases using
기본적으로, 클래스간의 링크는 대쉬2개
로 표시하고 수직방향이다. 다음 처럼 대쉬1개 (혹은 점)을 넣어서 수평방향 링크를 사용할 수 있다:
You can also change directions by reversing the link:
It is also possible to change arrow direction by adding
keywords inside the arrow:
You can shorten the arrow by using only the first character of the direction (for example,
) or the two first characters (
Please note that you should not abuse this functionality : Graphviz
gives usually good results without tweaking.
keywords to split your diagram into several pages or images.
The general default behavior when building diagram is top to bottom
You may change to left to right using the
left to right direction command. The result is often better with this direction.
You can use the skinparam
command to change colors and fonts for the drawing.
You can use this command :
You can define specific color and fonts for stereotyped actors and usecases.
You can add
to make Business Use Case.
Business Actor[Ref. QA-12179]
You can change the color
or style of individual arrows using the inline following notation:
[Ref. QA-3770 and QA-3816][See similar feature on deployment-diagram or class diagram]
You can change the color
or style of individual element using the following notation:
[Ref. QA-5340 and adapted from QA-6852]
Simple example[Ref. QA-15481]
For another example, see on JSON page