활동 다이어그램 (Activity Diagram) 이란?
- 이름 그대로 어떠한 활동(Activity)의 흐름을 표현하는것을 목적으로 함
- 업무처리 프로세스를 단계적으로 표현할때 사용
- 객체간 인터페이스 보다는 프로세스를 중심으로 작성한다
- 순서도(Flow Chart)와 기능/목적 등이 유사. 다만, UML에는 Flow Chart 가 없기 때문에, Activity Diagram이 그 역할을 대신함
PlantUML으로 Activity Diagram 그리기
그럼 plantUML으로 Activity Diagram을 그리는 방법에 대해서 알아보자.
간단한 문법만 익히면 손쉽게 작성할 수 있으며, 사용/설치방법을 모른다면, 이전글을 참고하자.
Basic
- @startuml, @enduml 로 작성의 시작/종료를 알리고,
- start/stop으로 시작/종료 노드를 추가하고
- :[Node 이름]; 으로 노드를 추가한다.
@startuml
start
:1st Node;
:2nd Node;
stop
@enduml
Conditional
- if~endif 으로 yes/no 에 따라 조건에 따라 실행되는 프로세스를 추가
@startuml
start
:1st Node;
if (is it True?) then (yes)
:2nd Node;
else (no)
:3rd Node;
endif
:4th Node;
stop
@enduml
While
- repeat~repeat while 으로 반복 프로세스를 추가
@startuml
start
:1st Node;
repeat :2nd Node;
:3rd Node;
backward: Backward Node;
repeat while (is it True?) is (yes)
->no;
:5th Node;
stop
@enduml
기타
- partition [그룹명] 으로 그룹을 추가하고
- note [위치]: [내용] 으로 주석을 추가할 수 있다
@startuml
start
partition Group1 {
:1st Node;
:2nd Node;
}
:3nd Node;
note right: This is Note
stop
@enduml
위 내용은 자주사용하는 기본 사용법만 작성하였고, 자세한 내용은 PlantUML 홈페이지를 참고하자
반응형
'IT > PlantUML' 카테고리의 다른 글
PlantUML Viewer 설치하고 사용하기 (MAC + Visual Studio Code 환경) (0) | 2021.01.11 |
---|