How to make it render less "scrambled"?

0 votes
asked Mar 19, 2020 in Wanted features by msdobrescu (120 points)

Hi, I have the following activity diagram (work in progress...):

@startuml

/''''''' Params '''''''/

skinparam defaultTextAlignment center

/''''''' Definitions '''''''/

|O|
|G|
|P|
|PP|

/'#D52B1E|'/
|O|
if ( exists) then (yes)
    if ( exists in D) then (yes)
        if ( status) then (yes)
        (A)
        detach
        else (no)
            |PP|
            :Verify <
            |P|
            if ( result) then (is yes)
                (A)
                detach
            else (is not yes)
                
            endif
            |O|
        endif
    else (no)
    endif
else (no)
    :Create;
    :Set status to 1]
    :Select option;
    
    |P|
    :Create ;
    :Set status to 1]
endif

/'#78C383|'/
|PP|
: attempt<
:Verify <

|P|
if ( result) then (succeeded)
    :Set status to 2]
    (A)
    detach

    (A)
    |O|
    partition "Mark as done" {        
        :Set info;
        if (has customization) then (yes)
            :Set status to 8;
        else (no)
            :Set status to 2;
            |G|
            :Set status\nfrom 1 to 2;
        endif
    }
    |O|
    if (type) then (T1)
    else (T2)
        :Set status to 3;
        |G|
        partition "Mark as done" {
            :Set info;
            :Set status to 4;
        }
        |O|
        if (Is Part) then (Yes)
        partition "Part" {
            :Set info;
            :Set status to 3;
        }
        else (No)
        endif
    endif
else (cancelled\ndenied)
    |P|
    :Set status to 3]
endif

@enduml

I can't make it more legible due to the arrows going through actions' shapes or over other lines, when there is free space on a side and should bypass certain actions and arrows, like, close to the top, "Set status 1", the branch "no" of "exists in D", ro the T1 branch.

What could I do to make it less overlapped?

Thank you.

commented Mar 19, 2020 by msdobrescu (120 points)
My opinion is, for the beta/new activity diagrams, that we need direction attributes to arrows/if branches. Also vertical and horizontal spacing support in therms of actions or other elements, in other words, to be able to specify to place an action, for example, as in the case of having a number of actions on its in connector, that allowing to have it rendered n places below/above/to left/to right to the position it is rendered now (by default). Otherwise, it's ever unmanageable, or is there some "magical" syntax that would do some of above already?

1 Answer

0 votes
answered Apr 2, 2020 by plantuml (294,960 points)
The real issue is that our layout engine has some issues with swimlanes management.

We've slightly improved it in last beta http://beta.plantuml.net/plantuml.jar

We still have some path to improve it. We are going to use your example as input data :-)

We really want the layout to work without any hint from the user...
commented Apr 2, 2020 by msdobrescu (120 points)
Hello, first off all, I wish everybody to be healthy and well.

I really appreciate your work.

I have used PlantUML sparsely these years, I see the differences in time, some new versions being better, some less.

I am a generic person, I love the automation, so I understand your view.

However, regardless the standards and the automation, there are times when somebody needs to control the display and layout of the diagram, so you should consider adding hints too.

There are always decisions to take and can not always guess the users need.

This is fine tuning.

Just my two cents.
...