Sunday 8 October 2023

How to Model Split Processing in Activity Diagrams with PlantUML

Using split, split again, end split keywords, we can define split processing.

splitProcess.txt

@startuml

start

split
	:Task1;
split again
	:Task2;
split again
	:Task2;
end split

:Merge Task1, Task2 and Task3 results;

stop

@enduml

 

Above snippet generate below diagram.

 


  

We can use hidden arrows to draw multi-start split.

 

multiStartSplit.txt

@startuml

split
	-[hidden]->
	:Task1;
split again
	-[hidden]->
	:Task2;
split again
	-[hidden]->
	:Task2;
end split

:Merge Task1, Task2 and Task3 results;

end

@enduml

 Above snippet generate below diagram.


We can use kill, detach, end, stop to draw multi end splits.

 

multiEndSplit.txt

@startuml

start

split
	:Task1;
	kill
split again
	:Task2;
	detach
split again
	:Task3;
	stop
split again
	:Task4;
	end
end split


@enduml

Above snippet generate below diagram.




  

Previous                                                    Next                                                    Home

No comments:

Post a Comment