Friday, 6 January 2023

PlantUML: Reverse arrows to improve readability in sequence diagram

We can also use the reverse arrows (<-, <--) to improve the readability of interactions in the diagram.

 

For example, Following two snippets convey the same interaction.

 

Snippet 1

ADServer -> LoginServer: Login Successful
LoginServer -> Client: Login Successful

 

Snippet 2

LoginServer <- ADServer: Login Successful
Client <- LoginServer: Login Successful

 

Find the below complete snippet.

reverseArrow.txt

@startuml
Client -> LoginServer: Enter user name
Client -> LoginServer: Enter password
Client -> LoginServer: Submit the form 
LoginServer -> ADServer: Check the credentials
LoginServer <- ADServer: Login Successful
Client <- LoginServer: Login Successful

 

Above snippet generates below diagram.

 


 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment