Monday 25 September 2023

How to Use If-Else Conditional Statements in PlantUML Activity Diagrams

Syntax

if (...) then (...)

 

Labels can be provided using parenthesis.

 

ifElse.txt

@startuml

title "User login flow"

start

:User enter username and password;

if (credentials are correct) then (yes)
	: Take user to the home page;
else (no)
    : Take user to the login page and **display error message**;
endif

stop

@enduml

 

Above snippet generate below diagram.

 


 

 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment