Improve text on arrows in activity diagram

0 votes
asked Aug 29, 2018 in Bug by Pander (780 points)

In activity diagrams, the text on arrows in not working properly. See the folowing example:

@startuml
start

if (A) then (yes)
        -[#black]-> aa1;
        :AA;
        -[#black]-> aa2;
    elseif (B) then (yes)
        :BB;
        -[#black]-> bb2;
    elseif (C) then (yes)
        -[#black]-> cc1;
        :CC;
    elseif (D) then (yes)
        :DD;
    else (no)
        -[#black]-> ee1;
    :EE;
        -[#black]-> ee2;
    endif

stop
@enduml

The output is:

The text replaces certain text from the if or is not shown. The following changes in the output would fix this bug:

- Place text on arrow directly after an if, while, etc. on the head of the arrow (where the point is) and on the tail of the arrow where the label from the if, while, etc. is, so that those are no longer replaces. This concerns not only the 'yes' but also the 'no' in the example. See aa1, cc1 and ee1.

- Place text on arrow of a last activity in an if, while, etc. In the example, text aa2 and bb2 would appear after AA and BB respectively. Note that the color is properly changed.

commented Sep 21, 2018 by Pander (780 points)
Thanks. However, there are some minor regression. Please see https://i.imgur.com/J0doiNC.png

a) The arrows leaving AA, BB and EE are not black anymore.

Related questions:

b) How to use these -[#color]-> arrows without using a color (so the default color is used) if one only want to add a label? Can e.g. -[]-> be used for that? If yes and implemented, could that be also added to the documentation?

c) The yes labels from the if are not shown for A and C and the no label is not shown for D. Can these be inserted in the custom labels? Then the arrow leaving e.g. A will be yes\laa1 or yes\naa1

1 Answer

0 votes
answered Sep 19, 2018 by plantuml (295,000 points)
Thanks for the report.

This should be fixed in last beta http://beta.plantuml.net/plantuml.jar

Tell us if it's not working for you!
...