We can use the ‘stop’ keyword in if condition.
stopOnAction.txt
@startuml
!pragma useVerticalIf on
start
if (database credentials configured) then (no)
#pink :Print 'no database credentias found and exit';
stop
else (yes)
if (port 8080 is available) (no)
#pink : Print 'Port 8080 is not available and exit';
stop
else (yes)
#palegreen : Print 'Initializing the application';
endif
endif
stop
@endumlAbove snippet generate below diagram.
But, if you want to stop at a precise action, you can use either kill or detach keywords.
killOrDetach.txt
@startuml
!pragma useVerticalIf on
start
if (database credentials configured) then (no)
#pink :Print 'no database credentias found and exit';
kill
else (yes)
if (port 8080 is available) (no)
#pink : Print 'Port 8080 is not available and exit';
detach
else (yes)
#palegreen : Print 'Initializing the application';
endif
endif
stop
@enduml
Above snippet generate below diagram.
Previous Next Home


No comments:
Post a Comment