Can a state have multiple loops arranged around the state.

+1 vote
asked Oct 15, 2014 in Wanted features by anonymous
Currently loops are nested withing the edges of other loops.  This makes diagrams wide and hard to read.
commented Oct 15, 2014 by anonymous
Example of a library with books......
NB
the Borrowable --> Borrowable loops are contained inside each other when drawn rather arranged around the Borrowable state.


@startuml

state LibraryBook{
LibraryBook : owns=0
state "Not Borrowable" as notb
[*] --> notb
notb --> Borrowable : add book /count in library=1;owns=++
Borrowable --> Borrowable : add book /count in library++;owns++
notb : on entry / count in library =0
notb : on exit / count in library=1
Borrowable --> notb : Borrowed [count in library==1]
Borrowable --> Borrowable : Borrowed [count in library>1]/count in library --
Borrowable --> Borrowable : Unconditionally returned / count in library++
Borrowable --> Borrowable : Returned / count in library++
notb --> Borrowable : Returned
}
[*] --> LibraryBook
LibraryBook -->[*]
@enduml

2 Answers

0 votes
answered Oct 15, 2014 by plantuml (294,960 points)
Hello,

Could you post a (simple) example ?

This would help us to fix it.

Thanks,
commented Dec 3, 2014 by Sardtok (180 points)
I think this is pretty much what I'm looking for in my question:
http://plantuml.sourceforge.net/qa/?qa=2820/move-transition-arrow-to-self-in-state-diagram

Double or triple loops become very wide, very quickly. So being able to specify which side of the node they should be on, with for instance -left-> would be nice. Or increasing the height of the box and placing the loops below one another, although I'm not sure that's at all possible in Graphviz, could work.
0 votes
answered Aug 19, 2022 by Fuhrmanator (1,700 points)

Until a solution is found, the workaround I have is to combine multiple self transitions onto the same arrow, separated with line breaks.

...