Notes on conditionnal elements

+1 vote
asked Jun 25, 2016 in Bug by legz (300 points)

Hi,

I'm not sure if I should put this report in "Bugs" or "Wanted features", but here are some observations concerning the notes on conditionnal elements :

@startuml

start
note: note #1
:Activity #1;
note: note #2

if (foo?) then (yes)
note: note #3
  :Activity #2;
  :Activity #3;
  note: note #4

else (no)
  :Activity #4;
endif
note: note #5
stop

@enduml

 

  • "note #3" is not directly on the decision item. Is it possible to put notes on a "if" item? It would be very usefull IHMO. (wanted feature?)
  • "note #5" is linked to the "Activity #4" item, although the note declaration is after the "endif". Looks like a bug to me.

Thanks!

commented Jun 29, 2016 by legz (300 points)
Same bug with a note after a fork :
@startuml
start
fork
    :Activity 1;
fork again
    :Activity 2;
end fork
note:my note
@enduml

Image here: http://www.plantuml.com/plantuml/img/SoWkIImgAStDuG8p5BZIyekokHI0mCenkIIpBBEaKi7G6Yoga9YUc9c79cTapPMQbw80rfMNNv9gbLkf0AAv783286C1

2 Answers

+1 vote
answered Jul 1, 2016 by plantuml (295,000 points)
Thanks for your report.

Those bugs have been partially solved in last beta.
https://dl.dropboxusercontent.com/u/13064071/plantuml.jar

The issue that remains is: how to connect some note to a "if" or a "fork" ?

We are looking for a nice way of connecting the note to either the starting diamond of the "if",
the ending diamond of the "if" or the synchronized black bar of a "fork".

It's both a question about graphical design and about our internal Java code design.

So we're still working on the question...

Regards,
commented Jul 2, 2016 by legz (300 points)
Thanks!

Do you prefer that I open a new 'wanted feature' ticket for the remaining point or I leave this one open?
commented Jul 4, 2016 by legz (300 points)
Oups, this fix breaks the forks notes, see the more complete answer.
0 votes
answered Jul 4, 2016 by legz (300 points)

@PlantUML team : I think there is a regression with this beta :

@startuml
start
fork
    :Activity A;
    note:note on activity A
fork again
    :Activity B;
    note:note on activity B
    :Activity C;
end fork
stop
@enduml
 
Stable :
Beta :
 
Notes on "fork again" branch are considered as global notes.
commented Jul 4, 2016 by plantuml (295,000 points)
Ok, thanks for the report!
We've just publised V8045 which should fix this.
Do not hesitate to post if you find issues!
Regards,
commented Jul 5, 2016 by legz (300 points)
Thanks for the fix.
By the way, there is still a little bug with notes on "fork": http://www.plantuml.com/plantuml/uml/Aov9B2hXIiilokRAooz9jG8H2lbv2c0H1I2mSamkoIpBBAbKSBG62w0eIuHBWirGI4nFpCn3q-U4JvyJcc9dQwxKl1I8zSKb-GK0

The note is in the flow instead of being on the left of the fork flow.
commented Jul 5, 2016 by plantuml (295,000 points)
The idea is to put the note after "end fork" command:

@startuml
start
fork
    :Activity A;
    note:note on activity A
fork again
    :Activity B;
    note:note on activity B
    :Activity C;
end fork
note:note on fork
stop
@enduml

http://www.plantuml.com/plantuml/uml/Aov9B2hXIiilokPI008hn-IIpBBCaae5HskmG5v-IQeLY538prD8X4k2TIWafYTcvg7fSyAdpmbDiRCrLsfUYWBOUXGTO97Yalm20000

We still have the issue of connecting the note to the fork itself.
commented Jul 5, 2016 by legz (300 points)
Ok, thanks for the tip. I will correct my diagrams.
commented Jul 20, 2023 by LuWa

Still not fixed 7 years later crying

commented Jul 20, 2023 by plantuml (295,000 points)
Well, some issues have been fixed.

Since this thread is quite long, it would be nice if you could show a short example that shows the remaining issue(s).

Thanks for your help!
commented Jul 20, 2023 by LuWa
First thanks for the super fast reaction. :impressed:

Well how to make a note on a choice/if:

http://www.plantuml.com/plantuml/uml/Aov9B2hXIiilokPI008hn-IIpBBCaae5HskmG5v-IQeLY538prD8X4k2TIWafYTcvg7fSyAdpmbDiRCrLsfUYWBOUXGTO97Yalm20000

or am i missing something?
commented Jul 20, 2023 by plantuml (295,000 points)

For a note on choice/if, you can have this:

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuG8pk3BJ53HAKejBx3KLIZ9IyxYiagovKdEAKxciae6Cl9JCDAwy_99KAuMGZCnY1H1J0KZdvm5L0rbfG5Fo2xWSW0g1HW80

Now I agree that it is not very clear whether the note is on the "if" or on "b".

Is this what you are looking for?

commented Jul 20, 2023 by LuWa
edited Jul 20, 2023
Jep that's exactly it.

Especially with a second condition that contains multiple steps this gets pretty unintentional i think (:

http://www.plantuml.com/plantuml/uml/SoWkIImgAStDuG8pk3BJ53HAKejBx3KLIZ9Iy-1y8vY0LPA1DP0m1156rbofESMfN5R985PUIcOQLrv-IQgLGaX6Ph42YAa0fFFpW3g1hBoyr2A5p3IO5Y9qf04TbL_0vG1K27GX0000
commented Jul 21, 2023 by plantuml (295,000 points)

We have slightly changed the drawing on the online server.

Does it look better ?

We should probably add a link between the node and the diamond...

Any comment is welcome :-)

commented Jul 24, 2023 by LuWa

Oh yes this looks much better smiley yes


Yeah maybe a dotted line or the current spike , but it's already a big improvement i think!


You could also keep this current solution as the "floating note" https://plantuml.com/de/activity-diagram-beta#f4c6f851b00d5518 and add a non floating note.

...