@startuml
!pragma layout smetana
set separator none
hide empty description
hide stereotype
skinparam state {
  BackgroundColor white
  BorderColor #94a3b8
  BorderThickness 1
  FontName Inter
  FontSize 9
  FontStyle bold
  RoundCorner 20
  Padding 1
}
skinparam shadowing false
skinparam ArrowFontName JetBrains Mono
skinparam ArrowFontSize 8
skinparam ArrowColor #cbd5e1
skinparam ArrowThickness 1
skinparam dpi 110
skinparam svgLinkTarget _self

[*] --> OrderStates.SUBMITTED

state OrderStates.PAID1 <<choice>>

OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID <<external>> : OrderEvents.PAY
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.FULFILLED <<external>> : OrderEvents.FULFILL
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL [λ]
OrderStates.PAID -[#1E90FF,bold]-> OrderStates.CANCELED <<external>> : OrderEvents.CANCEL
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.SUBMITTED <<external>> : OrderEvents.ABCD
OrderStates.SUBMITTED -[#1E90FF,bold]-> OrderStates.PAID1 <<external>> : OrderEvents.ABCD
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID2 <<choice_type>> : [λ] (order=0)
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.PAID3 <<choice_type>> : [guard1] (order=1)
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.HAPPEN <<choice_type>> : [λ] (order=2)
OrderStates.PAID1 -[#FF6347,bold]-> OrderStates.CANCELED <<choice_type>> : (order=3)
OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
OrderStates.PAID3 -[#1E90FF,bold]-> OrderStates.CANCELED <<external>>
OrderStates.PAID2 -[#1E90FF,bold]-> OrderStates.PAID2 <<external>> : OrderEvents.ABCD / λ, action2

OrderStates.CANCELED --> [*]
OrderStates.FULFILLED --> [*]
@enduml

