Wednesday 22 February 2023

PlantUML: short arrows in a sequence diagram

We can specify short arrows using ?

 

shortArrows.txt

@startuml

client2 -> client1 : Hello
client1 -> A: Hello

== with short arrows ==

?-> A: Input 
activate A

A -> A: transform the data
A -> A: Apply business logic

A ->? : response to external device
deactivate A

==with out short arrows==

[-> A: Input
activate A

A -> A: transform the data
A -> A: Apply business logic

A ->] : response to external device
deactivate A

A -> B: Send response
B -> C: Send response

@enduml

Above snippet generates below diagram.

 


 

Previous                                                    Next                                                    Home

No comments:

Post a Comment