Sunday 4 February 2024

PlantUML: entry and exit points in state diagram

<<entryPoint>> and <<exitPoint>> stereotypes are used to define entry and exit points.

 

Example

state entry1 <<entryPoint>>

state exit1 <<exitPoint>>

 

entryAndExitPoints.txt

@startuml

left to right direction

state MyState{
	state state1
	state state2
	state state3
    state entry1 <<entryPoint>>
	state entry2 <<entryPoint>>
	state exit1 <<exitPoint>>
}

[*] --> entry1
start --> entry2
entry1 --> state1
entry2 --> state2
state1 --> state3
state2 --> state3
state3 --> exit1
exit1 --> [*]

@enduml

Above snippet generate below diagram.



  

Previous                                                    Next                                                    Home

No comments:

Post a Comment