Monday 2 October 2023

How to insert an action in the loop return path of a PlantUML activity diagram?

We can insert an action in the loop return path of the activity using ‘backward’ command.

backward.txt

@startuml

title "Print the file data to console"

!pragma useVerticalIf on

start

repeat
	:read next 1024 bytes from file into the buffer;
	:print the buffer data to console;

	backward:clear the buffer;
repeat while (have more data?) is (yes)

->no;

stop

@enduml

 

Above snippet generate below diagram.

 


Previous                                                    Next                                                    Home

No comments:

Post a Comment